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

fix: feature update api not validating required fields before saving #1527

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

cre8ivejp
Copy link
Member

@cre8ivejp cre8ivejp commented Feb 21, 2025

Part of #893

Things done

  • Fixed feature update API replacing fields without validating them
  • Implemented granular changes for the scheduled change feature

This pull request includes significant updates to the api-description YAML files and various Go files to support new feature change types and granular change operations. The most important changes are grouped into updates to the API descriptions and updates to the Go codebase.

Updates to API descriptions:

  • Added descriptions for deprecated fields and introduced new fields such as resetSamplingSeed, variationChanges, ruleChanges, prerequisiteChanges, targetChanges, and tagChanges in api-description/apidocs.swagger.yaml.
  • Introduced a new featureChangeType enumeration to specify the type of changes (e.g., CREATE, UPDATE, DELETE) in api-description/apidocs.swagger.yaml and api-description/web-api.swagger.yaml. [1] [2]
  • Added new object definitions for featurePrerequisiteChange, featureRuleChange, featureTagChange, featureTargetChange, and featureVariationChange in api-description/apidocs.swagger.yaml and api-description/web-api.swagger.yaml. [1] [2]

Updates to Go codebase:

  • Updated the ExecuteProgressiveRollout method in pkg/autoops/api/progressive_rollout.go and the UpdateFeature method in pkg/feature/api/feature.go to handle new change types and fields. [1] [2]
  • Added new error definitions and validation logic for rules, variations, and prerequisites in pkg/feature/domain/feature.go. [1] [2] [3]
  • Introduced new methods for changing and removing rules and variations, and validating prerequisites in pkg/feature/domain/feature.go. [1] [2] [3]

@cre8ivejp cre8ivejp force-pushed the fix-feature-update-validations branch from 6ad6068 to a81d345 Compare February 21, 2025 03:47
@cre8ivejp cre8ivejp force-pushed the fix-feature-update-validations branch from a81d345 to e5b54a5 Compare February 21, 2025 11:30
@cre8ivejp cre8ivejp marked this pull request as ready for review February 26, 2025 03:41
Copy link
Contributor

@hvn2k1 hvn2k1 left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Collaborator

@Ubisoft-potato Ubisoft-potato left a comment

Choose a reason for hiding this comment

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

Great work! 👍

@cre8ivejp cre8ivejp merged commit 5ce2051 into main Feb 26, 2025
18 checks passed
@cre8ivejp cre8ivejp deleted the fix-feature-update-validations branch February 26, 2025 05:51
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