Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Add withExperiment extension method to Nimbus #16926

Merged

Conversation

jhugman
Copy link
Contributor

@jhugman jhugman commented Dec 8, 2020

Fixes #16925.

Adds extension method, then re-implements the existing experiments in the terms of those extension methods.

@jhugman jhugman requested review from a team as code owners December 8, 2020 19:37
@jhugman jhugman force-pushed the jhugman/16925-sdk-99-add-withExperiment-extension-method branch from a309c47 to c2df473 Compare December 9, 2020 17:30
Copy link
Contributor

@pocmo pocmo left a comment

Choose a reason for hiding this comment

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

LGTM.

* Short-hand for `mozilla.components.service.nimbus.NimbusApi.getExperimentBranch`.
*/
fun NimbusApi.withExperiment(experimentId: String) =
this.getExperimentBranch(experimentId)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would those extension be something we could ship with the nimbus library?

@pocmo pocmo self-assigned this Dec 10, 2020
@pocmo pocmo added the pr:approved PR that has been approved label Dec 10, 2020
@jhugman jhugman force-pushed the jhugman/16925-sdk-99-add-withExperiment-extension-method branch from c2df473 to b64ec17 Compare December 10, 2020 15:58
@codecov-io
Copy link

codecov-io commented Dec 10, 2020

Codecov Report

Merging #16926 (28522d5) into master (ca605d8) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #16926      +/-   ##
============================================
- Coverage     30.89%   30.88%   -0.02%     
  Complexity     1240     1240              
============================================
  Files           453      454       +1     
  Lines         18519    18527       +8     
  Branches       2583     2584       +1     
============================================
  Hits           5722     5722              
- Misses        12338    12346       +8     
  Partials        459      459              
Impacted Files Coverage Δ Complexity Δ
app/src/main/java/org/mozilla/fenix/ext/Nimbus.kt 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...p/src/main/java/org/mozilla/fenix/home/HomeMenu.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca605d8...28522d5. Read the comment docs.

@jhugman jhugman force-pushed the jhugman/16925-sdk-99-add-withExperiment-extension-method branch from b64ec17 to 28522d5 Compare December 10, 2020 17:02
Copy link
Contributor

@csadilek csadilek left a comment

Choose a reason for hiding this comment

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

👍

@jhugman jhugman merged commit 9a984f1 into master Dec 10, 2020
@bors bors bot deleted the jhugman/16925-sdk-99-add-withExperiment-extension-method branch December 10, 2020 17:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:approved PR that has been approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Nimbus extension methods
4 participants