-
Notifications
You must be signed in to change notification settings - Fork 6
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
[DEVCON-2524] output deploy queue to checkrun summary #772
base: main
Are you sure you want to change the base?
[DEVCON-2524] output deploy queue to checkrun summary #772
Conversation
/ptal #dev-console |
…p has waiting actions
eb843ba
to
cbf4fa5
Compare
} | ||
|
||
workflow.GetLogger(ctx).Debug(fmt.Sprintf("Updating action pending summary for deployment id: %s", i.ID.String())) | ||
_, err := n.CheckRunCache.CreateOrUpdate(ctx, i.ID.String(), request) |
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.
I think this might pose some non-determinism errors, see https://community.temporal.io/t/workflow-determinism/4027, but I could be wrong. If it does, let's add some workflow versioning here
…Temporal nondeterministic workflow change
…t apply (once with empty Result, once with Result filled in
5fbd36d
to
d5ef226
Compare
Current PR is tested on staging, with behavior as expected. The actual solution requires exposing queue lock state to state receiver. This would require a significant code restructure since LockState cannot be imported to Terraform package without a cyclic dependency. The following steps are moved to a separate PR.
|
Issue:
Previously, when a revision is queued, we mark the github status as queued but have no other indication in the check run itself that this check run is waiting on something.
Users have to figure out which check run is holding up the queue which is difficult because deploys for a root can happen off any branch. We can figure this out using the temporal UI however it would be a better CX if we could just surface the queue itself in the check run.
Part 1
Add queue info to checkrun summary on creating new check run or unlock signal. Queue info is shown as [commit SHA](link to specific check run)
Part 2
Check run summaries do not get updated in cases where a a Terraform workflow is pending Confirm/Reject checkrun action between Plan and Apply steps, since the deploy queue lock only tracks the "Unlock" checkrun action.
Test Plan
atlantis apply -f
on PR 1, and try to merge PR 2. PR 2 will be locked by confirm reject action on PR 1. Any subsequent queued deploys will show up as queued commits (with corresponding links) in checkrun summary.atlantis apply -f
on unmerged PR 1 and confirm. Create PR 3 and runatlantis apply -f
on unmerged PR 3.Improve Test Cases
Fix queue_test and updater_test where assertions in CreateOrUpdate were not getting caught since the function is called within a temporal worker.