Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components/dynamic domains #4450

Merged
merged 4 commits into from
Jan 2, 2025
Merged

Conversation

NelsonVides
Copy link
Collaborator

As described in commits:

Support dynamic domains for components:

Note that components might register any domain, even one not
necessarily provided by a static config or a dynamically configured one.
Hence it makes no sense to use the subdomains registration API as it was
described in a TODO in mod_disco:get_external_components/2.

Furthermore, when it comes to discovery, we want to leave all components
as discoverable, regardless of whether the component is a subdomain of a
static domain as it was previously done. The code filtering out
unrelated parent domains comes from long before MongooseIM 1.0.0, as
well as the option to set extra_domains to reenable visibility.

Remove mod_disco extra_domains config key:

This option was used to make discoverable components that for a user
might not have been discoverable given the domain was unrelated. This
was so decided over a decade ago before MongooseIM 1.0.0, but I'd judge
a better solution is to leave components as either entirely discoverable
or entirely hidden by default, as components are usually dynamic and at
the same time fully controllable at the deployment, and we can now have
an infinite amount of domains for which a component can become a
subdomain and hard-coding "extra_domains" for each static or dynamic
domain is not feasible.

Note that components might register _any_ domain, even one not
necessarily provided by a static config or a dynamically configured one.
Hence it makes no sense to use the subdomains registration API as it was
described in a TODO in `mod_disco:get_external_components/2`.

Furthermore, when it comes to discovery, we want to leave all components
as discoverable, regardless of whether the component is a subdomain of a
static domain as it was previously done. The code filtering out
unrelated parent domains comes from long before MongooseIM 1.0.0, as
well as the option to set `extra_domains` to reenable visibility.
This option was used to make discoverable components that for a user
might not have been discoverable given the domain was unrelated. This
was so decided over a decade ago before MongooseIM 1.0.0, but I'd judge
a better solution is to leave components as either entirely discoverable
or entirely hidden by default, as components are usually dynamic and at
the same time fully controllable at the deployment, and we can now have
an infinite amount of domains for which a component can become a
subdomain and hard-coding "extra_domains" for each static or dynamic
domain is not feasible.
@NelsonVides NelsonVides force-pushed the components/dynamic_domains branch from 60da145 to 9afc32c Compare December 31, 2024 15:08
@mongoose-im
Copy link
Collaborator

mongoose-im commented Dec 31, 2024

elasticsearch_and_cassandra_27 / elasticsearch_and_cassandra_mnesia / 60da145
Reports root/ big
OK: 472 / Failed: 0 / User-skipped: 49 / Auto-skipped: 0


small_tests_27 / small_tests / 60da145
Reports root / small


small_tests_26 / small_tests / 60da145
Reports root / small


small_tests_27_arm64 / small_tests / 60da145
Reports root / small


ldap_mnesia_26 / ldap_mnesia / 60da145
Reports root/ big
OK: 2350 / Failed: 0 / User-skipped: 912 / Auto-skipped: 0


ldap_mnesia_27 / ldap_mnesia / 60da145
Reports root/ big
OK: 2350 / Failed: 0 / User-skipped: 912 / Auto-skipped: 0


internal_mnesia_27 / internal_mnesia / 60da145
Reports root/ big
OK: 2492 / Failed: 0 / User-skipped: 770 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 60da145
Reports root/ big
OK: 4771 / Failed: 0 / User-skipped: 119 / Auto-skipped: 0


dynamic_domains_mysql_redis_27 / mysql_redis / 60da145
Reports root/ big
OK: 4736 / Failed: 0 / User-skipped: 154 / Auto-skipped: 0


pgsql_cets_27 / pgsql_cets / 60da145
Reports root/ big
OK: 4847 / Failed: 0 / User-skipped: 188 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_27 / pgsql_mnesia / 60da145
Reports root/ big
OK: 4771 / Failed: 0 / User-skipped: 119 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_27 / odbc_mssql_mnesia / 60da145
Reports root/ big
OK: 4766 / Failed: 0 / User-skipped: 124 / Auto-skipped: 0


mysql_redis_27 / mysql_redis / 60da145
Reports root/ big
OK: 5127 / Failed: 0 / User-skipped: 149 / Auto-skipped: 0


cockroachdb_cets_27 / cockroachdb_cets / 60da145
Reports root/ big
OK: 4847 / Failed: 0 / User-skipped: 188 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 60da145
Reports root/ big
OK: 5148 / Failed: 0 / User-skipped: 128 / Auto-skipped: 0


mssql_mnesia_27 / odbc_mssql_mnesia / 60da145
Reports root/ big
OK: 5143 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


pgsql_mnesia_27 / pgsql_mnesia / 60da145
Reports root/ big
OK: 5148 / Failed: 0 / User-skipped: 128 / Auto-skipped: 0

@mongoose-im
Copy link
Collaborator

mongoose-im commented Dec 31, 2024

elasticsearch_and_cassandra_27 / elasticsearch_and_cassandra_mnesia / 9afc32c
Reports root/ big
OK: 472 / Failed: 0 / User-skipped: 49 / Auto-skipped: 0


small_tests_26 / small_tests / 9afc32c
Reports root / small


small_tests_27 / small_tests / 9afc32c
Reports root / small


small_tests_27_arm64 / small_tests / 9afc32c
Reports root / small


ldap_mnesia_26 / ldap_mnesia / 9afc32c
Reports root/ big
OK: 2350 / Failed: 0 / User-skipped: 912 / Auto-skipped: 0


ldap_mnesia_27 / ldap_mnesia / 9afc32c
Reports root/ big
OK: 2350 / Failed: 0 / User-skipped: 912 / Auto-skipped: 0


dynamic_domains_mysql_redis_27 / mysql_redis / 9afc32c
Reports root/ big
OK: 4736 / Failed: 0 / User-skipped: 154 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 9afc32c
Reports root/ big
OK: 4771 / Failed: 0 / User-skipped: 119 / Auto-skipped: 0


internal_mnesia_27 / internal_mnesia / 9afc32c
Reports root/ big
OK: 2492 / Failed: 0 / User-skipped: 770 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_27 / pgsql_mnesia / 9afc32c
Reports root/ big
OK: 4771 / Failed: 0 / User-skipped: 119 / Auto-skipped: 0


pgsql_cets_27 / pgsql_cets / 9afc32c
Reports root/ big
OK: 4847 / Failed: 0 / User-skipped: 188 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_27 / odbc_mssql_mnesia / 9afc32c
Reports root/ big
OK: 4766 / Failed: 0 / User-skipped: 124 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 9afc32c
Reports root/ big
OK: 5148 / Failed: 0 / User-skipped: 128 / Auto-skipped: 0


cockroachdb_cets_27 / cockroachdb_cets / 9afc32c
Reports root/ big
OK: 4847 / Failed: 0 / User-skipped: 188 / Auto-skipped: 0


mssql_mnesia_27 / odbc_mssql_mnesia / 9afc32c
Reports root/ big
OK: 5143 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


pgsql_mnesia_27 / pgsql_mnesia / 9afc32c
Reports root/ big
OK: 5148 / Failed: 0 / User-skipped: 128 / Auto-skipped: 0


mysql_redis_27 / mysql_redis / 9afc32c
Reports root/ big
OK: 5127 / Failed: 0 / User-skipped: 149 / Auto-skipped: 0

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.41%. Comparing base (284bd1c) to head (9afc32c).
Report is 6 commits behind head on feature/listeners.

Additional details and impacted files
@@                Coverage Diff                 @@
##           feature/listeners    #4450   +/-   ##
==================================================
  Coverage              85.40%   85.41%           
==================================================
  Files                    553      553           
  Lines                  33955    33948    -7     
==================================================
- Hits                   29000    28996    -4     
+ Misses                  4955     4952    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from xmpp_services to feature/listeners January 2, 2025 14:00
@NelsonVides NelsonVides marked this pull request as ready for review January 2, 2025 14:01
@telezynski telezynski merged commit 09f5365 into feature/listeners Jan 2, 2025
4 checks passed
@telezynski telezynski deleted the components/dynamic_domains branch January 2, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants