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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUMM-2381 Add internal proxy API for customising app version #973

Merged

Conversation

ncreated
Copy link
Collaborator

@ncreated ncreated commented Aug 17, 2022

What and why?

馃摝 This PR adds set(customVersion:) API to internal proxy available in cross-platform SDKs. This is to unlock OTA use cases in RN, where version can change without restarting the app.

How?

I added AppVersionProvider, which reads initial version from configuration (supporting _dd.version override) and accepts its updates through _InternalProxy.configuration proxy.

Cross-platform SDKs can now customize version in 2 ways:

  • on SDK init, by passing "_dd.version" in additionalConfiguration;
  • later at runtime by using Datadog._internal._configuration.set(customVersion:).

Aware of architectural changes made in #947, notably the removal of FeatureCommonDependencies container, this new provider is added directly to DatadogCore - in the same way as done on V2 branch.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes

Custom CI job configuration (optional)

  • Run unit tests
  • Run integration tests
  • Run smoke tests

@ncreated ncreated self-assigned this Aug 17, 2022
@ncreated ncreated marked this pull request as ready for review August 17, 2022 15:08
@ncreated ncreated requested a review from a team as a code owner August 17, 2022 15:08
Copy link
Member

@maxep maxep left a comment

Choose a reason for hiding this comment

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

Perfect! It will be easy to migrate this to v2 馃憣

@ncreated ncreated merged commit 927e1f0 into develop Aug 18, 2022
@ncreated ncreated deleted the ncreated/RUMM-2381-customize-app-version-from-cp-sdks branch August 18, 2022 08:02
This was referenced Sep 16, 2022
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.

None yet

2 participants