Skip to content

fix(nimbus): populate config_slug on mobile#7367

Open
moibra05 wants to merge 1 commit into
mozilla:mainfrom
moibra05:bugfix/missing_conflig_slug_for_mobile
Open

fix(nimbus): populate config_slug on mobile#7367
moibra05 wants to merge 1 commit into
mozilla:mainfrom
moibra05:bugfix/missing_conflig_slug_for_mobile

Conversation

@moibra05
Copy link
Copy Markdown
Contributor

Added a proper value for conflict_slug when constructing the EnrollmentStatusExtraDef taken by pulling out the actual feature slug which caused the conflict

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

Copy link
Copy Markdown
Member

@freshstrangemusic freshstrangemusic left a comment

Choose a reason for hiding this comment

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

All changes to types that are serialized to the database require tests and (in this case) a migration

"slug": "secure-gold",
"status": {"NotEnrolled": {
"reason": "FeatureConflict",
"reason": { "FeatureConflict": { "conflict_slug": Some("conflicting-feature") } },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is a line above this that says:

// ⚠️ Warning : Do not change the JSON data used by this test. ⚠️

This test as written is not very useful. It should instead be re-written (with the original JSON) to

  • write the original JSON to the database
  • set the database version to v3
  • load the database
  • read the enrollment for "secure-gold"
  • validate that it parses with conflict_slug == None

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.

2 participants