-
Notifications
You must be signed in to change notification settings - Fork 429
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: edge API not updated when versioned change request committed #3760
fix: edge API not updated when versioned change request committed #3760
Conversation
…environment feature version is committed
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3760 +/- ##
=======================================
Coverage 95.91% 95.91%
=======================================
Files 1102 1102
Lines 34782 34789 +7
=======================================
+ Hits 33362 33369 +7
Misses 1420 1420 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good, just a couple of small questions.
from ...versioning.models import EnvironmentFeatureVersion | ||
from .exceptions import ( | ||
from features.workflows.core.exceptions import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I think absolute imports are always fine, but one level of relative imports like from .exceptions import ...
are acceptable too. So I agree with your redefinition of from ...versioning.models import EnvironmentFeatureVersion
since it's too many levels deep but I don't really see the importance of redefining the exceptions module.
That said, I'm not really hung up on it, I'm more just interested in knowing why you're favouring the absolute import for exceptions here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's a fair point. I think I just like standardising to a single approach.
rebuild_environment_document.delay( | ||
kwargs={"environment_id": self.environment_id}, | ||
delay_until=environment_feature_version.live_from, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm: The live_from
of the environment feature version could be well into the future, correct? But that's ok since our task system is designed to handle it? Just confirming we'd survive, say, a task scheduled further in the future to survive a backend deployment or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it's persisted to the postgres database.
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
Adds logic to trigger the
rebuild_environment_task
when a change request containing environment feature version objects is committed.This PR also includes some minor tidying up of imports to remove ugly relative imports.
How did you test this code?
Updated existing unit test.