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

[RKOTLIN-1023] Add support for changing App Services base URL #1733

Merged
merged 8 commits into from
May 1, 2024

Conversation

clementetb
Copy link
Contributor

@clementetb clementetb commented Apr 30, 2024

With this PR we add support for changing the App Services URL allowing roaming between Atlas and Edge server.

Closes #1659

@clementetb clementetb self-assigned this Apr 30, 2024
@cla-bot cla-bot bot added the cla: yes label Apr 30, 2024
* @param baseUrl The new App Services base url. Use [AppConfiguration.DEFAULT_BASE_URL] to set it
* to the default value.
*/
public suspend fun updateBaseUrl(baseUrl: String)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing an empty string to updateBaseUrl would result in the base URL being set to a default value set in core.

Because the default URL is already set in core, we could replace the actual URL value in the SDK with an empty string. This way we could avoid maintaining the URL on the SDK.

AppConfiguration.DEFAULT_BASE_URL = ""

We would address this on a different PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also make baseUrl optional and allow users to supply null here to the same effect of supplying empty string. I feel this is a bit more obvious and the C API already works that way.

CHANGELOG.md Outdated
@@ -7,7 +7,7 @@ This release will bump the Realm file format from version 23 to 24. Opening a fi
* None.

### Enhancements
* None.
* Add support for changing the App Services base URL. It allows to roam between Atlas and Edge Server. Changing the url would trigger a client reset. ([JIRA]https://jira.mongodb.org/browse/RKOTLIN-1023)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably continue linking to the github issues.

* @param baseUrl The new App Services base url. Use [AppConfiguration.DEFAULT_BASE_URL] to set it
* to the default value.
*/
public suspend fun updateBaseUrl(baseUrl: String)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also make baseUrl optional and allow users to supply null here to the same effect of supplying empty string. I feel this is a bit more obvious and the C API already works that way.

Copy link
Contributor

@rorbech rorbech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the scope the updateBaseUrl API should be guarded by an @ExperimentalEdgeServerApi

@rorbech rorbech merged commit 8704401 into releases May 1, 2024
6 checks passed
@rorbech rorbech deleted the ct/base-url branch May 1, 2024 14:10
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants