Skip to content

Create experimentRules array directly instead of from Map Values #444

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

Merged
merged 2 commits into from
Aug 25, 2021

Conversation

The-inside-man
Copy link
Contributor

Summary

  • Build ExperimentRules array instead of from Map.values()

Causing an order issue with Android-SDK

Test plan

FSC

Issues

  • N/A

@coveralls
Copy link

coveralls commented Aug 25, 2021

Pull Request Test Coverage Report for Build 1827

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 90.512%

Totals Coverage Status
Change from base Build 1818: 0.002%
Covered Lines: 4722
Relevant Lines: 5217

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1820

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 90.514%

Totals Coverage Status
Change from base Build 1818: 0.004%
Covered Lines: 4723
Relevant Lines: 5218

💛 - Coveralls

@The-inside-man The-inside-man removed their assignment Aug 25, 2021
@The-inside-man The-inside-man marked this pull request as ready for review August 25, 2021 12:53
@The-inside-man The-inside-man requested a review from a team as a code owner August 25, 2021 12:53
@The-inside-man The-inside-man requested review from jaeopt and msohailhussain and removed request for a team August 25, 2021 12:53
Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

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

Looks good. A clean up suggested.

if (experimentIds == null) {
return Collections.emptyMap();
}

List<OptimizelyExperiment> experimentRulesList = new ArrayList<>();

Map<String, OptimizelyExperiment> optimizelyExperimentKeyMap = new HashMap<>();
for (String experimentId : experimentIds) {
Experiment experiment = projectConfig.getExperimentIdMapping().get(experimentId);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this line can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed and checking if still passes FSC. I feel this may have been added to get around an ID issue not being present in the experimentId's list but will know after FSC runs.

Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

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

LGTM

@jaeopt jaeopt merged commit 6107eb9 into master Aug 25, 2021
@jaeopt jaeopt deleted the jbrown/experimentRules-order branch August 25, 2021 17:43
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