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

Use endpoint as default connection option (ADR-119) #441

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

surminus
Copy link

This implements ADR-119[1], which specifies the client connection options to update requests to the endpoints implemented as part of ADR-042[2].

The endpoint may be one of the following:

  • a routing policy name (such as main)
  • a nonprod routing policy name (such as nonprod:sandbox)
  • a FQDN such as foo.example.com

The endpoint option is not valid with any of environment, restHost or realtimeHost, but we still intend to support the legacy options.

If the client has been configured to use any of these legacy options, then they should continue to work in the same way, using the same primary and fallback hostnames.

If the client has not been explicitly configured, then the hostnames will change to the new ably.net domain when the package is upgraded.

Notes on implementation

This is still a work in progress, I'm opening a PR to allow tests to run.

I've tried to change as little as possible, but we already had a method named endpoint so I've switched that to uri (open to better naming suggestions).

I haven't yet added any explicit tests for using endpoint, and tried to limit changes to the existing to the updated hostname.

[1] https://ably.atlassian.net/wiki/spaces/ENG/pages/3428810778/ADR-119+ClientOptions+for+new+DNS+structure
[2] https://ably.atlassian.net/wiki/spaces/ENG/pages/1791754276/ADR-042+DNS+Restructure

Rubocop needs to be configured for this repository, but is currently
quite a bit of work to get it up to standards[1].

While we get to actually enabling Rubocop, it would be nice to be
explicit that it's not something that my editor should bother me with
when working in this repository.

[1] #139
@github-actions github-actions bot temporarily deployed to staging/pull/441/features January 31, 2025 13:15 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/441/docs January 31, 2025 13:16 Inactive
This implements ADR-119[1], which specifies the client connection
options to update requests to the endpoints implemented as part of
ADR-042[2].

The endpoint may be one of the following:

* a routing policy name (such as `main`)
* a nonprod routing policy name (such as `nonprod:sandbox`)
* a FQDN such as `foo.example.com`

The endpoint option is not valid with any of environment, restHost or
realtimeHost, but we still intend to support the legacy options.

If the client has been configured to use any of these legacy options,
then they should continue to work in the same way, using the same
primary and fallback hostnames.

If the client has not been explicitly configured, then the hostnames
will change to the new `ably.net` domain when the package is upgraded.

[1] https://ably.atlassian.net/wiki/spaces/ENG/pages/3428810778/ADR-119+ClientOptions+for+new+DNS+structure
[2] https://ably.atlassian.net/wiki/spaces/ENG/pages/1791754276/ADR-042+DNS+Restructure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant