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: add logic to set segment to lowest priority if not set #4381

Merged

Conversation

matthewelwell
Copy link
Contributor

Changes

Fix behaviour when creating a segment override to add the segment override as the lowest (i.e.. biggest number) priority when a specific priority is not provided.

The specific use case for this is to ensure that, when 2 separate change requests are created on a new feature to add 2 different segment overrides, the second one that gets published, correctly has the priority set, and doesn't conflict with the first one.

How did you test this code?

Added a new unit test.

@matthewelwell matthewelwell requested a review from a team as a code owner July 24, 2024 13:57
@matthewelwell matthewelwell requested review from khvn26 and removed request for a team July 24, 2024 13:57
Copy link

vercel bot commented Jul 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Jul 24, 2024 1:57pm
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Jul 24, 2024 1:57pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Jul 24, 2024 1:57pm

@github-actions github-actions bot added api Issue related to the REST API fix labels Jul 24, 2024
Copy link
Contributor

github-actions bot commented Jul 24, 2024

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-4381 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-4381 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-4381 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-4381 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-4381 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-4381 Finished ✅ Results

Copy link
Contributor

github-actions bot commented Jul 24, 2024

Uffizzi Preview deployment-54586 was deleted.

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.82%. Comparing base (369acbe) to head (e9ffe03).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4381   +/-   ##
=======================================
  Coverage   96.82%   96.82%           
=======================================
  Files        1165     1165           
  Lines       38561    38568    +7     
=======================================
+ Hits        37338    37345    +7     
  Misses       1223     1223           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewelwell matthewelwell added this pull request to the merge queue Jul 24, 2024
Merged via the queue into main with commit a78b284 Jul 24, 2024
34 checks passed
@matthewelwell matthewelwell deleted the fix/versioning-change-request-feature-segment-priority branch July 24, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants