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 reverse sql to versioning migration #4491

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

matthewelwell
Copy link
Contributor

Changes

This fixes a previously added migration to include a reverse script to ensure that duplicate segments are not shown after a rollback due to the versioning system added past this point.

How did you test this code?

Added 2 new migration tests and tested the sql script manually on my local database.

@matthewelwell matthewelwell requested a review from a team as a code owner August 13, 2024 15:07
@matthewelwell matthewelwell requested review from khvn26 and removed request for a team August 13, 2024 15:07
Copy link

vercel bot commented Aug 13, 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) Visit Preview Aug 13, 2024 3:16pm
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Aug 13, 2024 3:16pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Aug 13, 2024 3:16pm

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

github-actions bot commented Aug 13, 2024

Docker builds report

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

test_settings.SKIP_MIGRATION_TESTS is True,
reason="Skip migration tests to speed up tests where necessary",
)
def test_create_whitelisted_segments_migration(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm... this test was not modified. The diff is showing that a file was deleted / created vs the renaming action that actually happened. This test function does not need to be reviewed.

Copy link
Contributor

github-actions bot commented Aug 13, 2024

Uffizzi Preview deployment-55214 was deleted.

@github-actions github-actions bot added fix and removed fix labels Aug 13, 2024
@matthewelwell matthewelwell added this pull request to the merge queue Aug 13, 2024
Merged via the queue into main with commit a6a0f91 Aug 13, 2024
33 checks passed
@matthewelwell matthewelwell deleted the fix/add-rollback-to-segment-versioning branch August 13, 2024 15:26
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.91%. Comparing base (36e634c) to head (af0432c).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4491   +/-   ##
=======================================
  Coverage   96.91%   96.91%           
=======================================
  Files        1176     1176           
  Lines       39349    39403   +54     
=======================================
+ Hits        38135    38189   +54     
  Misses       1214     1214           

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

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