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(versioning): ensure that audit log record is created when committing versions via CR #4091

Merged

Conversation

matthewelwell
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

This PR ensures that the correct environment_feature_version_published signal is sent when we publish a ChangeRequest that includes EnvironmentFeatureVersion objects.

How did you test this code?

Added new test

@matthewelwell matthewelwell requested review from a team and gagantrivedi and removed request for a team June 3, 2024 19:32
Copy link

vercel bot commented Jun 3, 2024

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

Name Status Preview Comments Updated (UTC)
docs 🛑 Canceled (Inspect) Jun 3, 2024 7:41pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2024 7:41pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2024 7:41pm

@github-actions github-actions bot added the api Issue related to the REST API label Jun 3, 2024
@vercel vercel bot temporarily deployed to Preview – flagsmith-frontend-staging June 3, 2024 19:33 Inactive
Copy link
Contributor

github-actions bot commented Jun 3, 2024

Uffizzi Preview deployment-52585 was deleted.

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.44%. Comparing base (60c0748) to head (7073ed7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4091   +/-   ##
=======================================
  Coverage   96.44%   96.44%           
=======================================
  Files        1149     1149           
  Lines       37589    37596    +7     
=======================================
+ Hits        36252    36259    +7     
  Misses       1337     1337           

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

Copy link
Contributor

@zachaysan zachaysan left a comment

Choose a reason for hiding this comment

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

The testing code looks good but I'm not sure about the variable noted below

Comment on lines +173 to +175
environment_feature_version_published.send(
EnvironmentFeatureVersion, instance=environment_feature_version
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't see from this review where environment_feature_version_published is actually coming from.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a signal defined here and consumed here.

I kind of hate using signals because it can be a bit hard to track the execution stack, but I seem to remember having no choice in this case.

@matthewelwell matthewelwell added this pull request to the merge queue Jun 3, 2024
Merged via the queue into main with commit 8246dca Jun 3, 2024
22 of 24 checks passed
@matthewelwell matthewelwell deleted the fix(versioning)/ensure-publish-signal-sent-on-cr-commit branch June 3, 2024 19:46
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants