job_runs: add lifecycle.triggers.on_bundle_deploy - #6231
Open
radakam wants to merge 8 commits into
Open
Conversation
Let users re-fire a run on every deploy via a trigger fingerprint in state, so unchanged config still plans recreate. File/value modes are parsed but rejected until follow-up PRs.
Collaborator
Integration test reportCommit: 2d96f50
11 interesting tests: 4 RECOVERED, 4 SKIP, 3 flaky
Top 18 slowest tests (at least 2 minutes):
|
Ship only on_bundle_deploy for now; add the other modes when implemented.
Say what the trigger does instead of what it does not.
Trigger fingerprint removal can recreate once; keep the same model for future triggers.
Every-deploy recreate cannot succeed when destroy is forbidden.
Include idempotency_token in on_bundle_deploy output and regenerate refschema fields for JobRunLifecycle triggers.
radakam
marked this pull request as ready for review
August 11, 2026 14:23
Contributor
Approval status: pending
|
Catch invalid on_bundle_deploy configs at bundle validate, not only plan/deploy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Adds
lifecycle.triggers.on_bundle_deploy: truefor experimentaljob_runs(direct engine): re-fire the run on every bundle deploy.JobRunLifecycle.triggers(same lifecycle-shadow pattern aslifecycle.startedon apps).PrepareStatestores a fresh UUID fingerprint so the existing recreate rule fires every deploy.on_bundle_deploymust betruewhen set; incompatible withlifecycle.prevent_destroy.Without the trigger, behavior is unchanged. Removing the trigger can recreate once while the fingerprint clears.
Why
Users need a declarative “run this every deploy” switch (migrations, seed jobs) without editing run config to force a recreate. A fresh fingerprint each plan is what makes recreate reliable for this mode.
Tests
PrepareStatefingerprint only when armed;knownMissingInRemoteTypefor local-onlytriggerson_bundle_deployredeploy with unchanged config plans recreate and issues a secondrun-now