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: facilitate FE display of environment version from audit log #4077

Merged
merged 4 commits into from
Jun 3, 2024

Conversation

matthewelwell
Copy link
Contributor

@matthewelwell matthewelwell commented Jun 3, 2024

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 addresses 2 issues found by the FE in the integration as per this issue:

  1. Adds related_object_uuid to the response when retrieving audit log records from the API
  2. Adds a new endpoint to retrieve an EnvironmentFeatureVersion without the need for the environment and feature args in the URL path. This is due to the need from the FE to retrieve the version directly from the audit log which does not have the id of the feature directly available.

Note that, based on this, I have removed the RetrieveModelMixin from the EnvironmentFeatureVersionViewSet since it is not needed. Technically this is a breaking API change but, since the versioning feature has not been released anywhere yet, I don't see that this is an issue.

How did you test this code?

Added a bunch of new tests.

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 11:27am
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2024 11:27am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2024 11:27am

Copy link
Contributor

github-actions bot commented Jun 3, 2024

Uffizzi Preview deployment-52548 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 (a22f86c) to head (0ecbcc4).

Current head 0ecbcc4 differs from pull request most recent head 444a68d

Please upload reports for the commit 444a68d to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4077   +/-   ##
=======================================
  Coverage   96.43%   96.44%           
=======================================
  Files        1149     1149           
  Lines       37535    37565   +30     
=======================================
+ Hits        36198    36228   +30     
  Misses       1337     1337           

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

…eve an environment feature version without the path args
@matthewelwell matthewelwell force-pushed the fix/add-fields-to-audit-log-serializer branch from 8e876a6 to eb8ccb5 Compare June 3, 2024 11:23
@@ -46,7 +47,6 @@
)
class EnvironmentFeatureVersionViewSet(
GenericViewSet,
RetrieveModelMixin,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As mentioned in the description, this is technically a breaking API change but, since the versioning feature has not been released to anyone yet, I don't see this as an issue.

@matthewelwell matthewelwell changed the title fix: add fields to audit log serializer fix: facilitate FE display of environment version from audit log Jun 3, 2024
@matthewelwell matthewelwell added this pull request to the merge queue Jun 3, 2024
Merged via the queue into main with commit be9b7ce Jun 3, 2024
22 checks passed
@matthewelwell matthewelwell deleted the fix/add-fields-to-audit-log-serializer branch June 3, 2024 11:33
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