-
-
Notifications
You must be signed in to change notification settings - Fork 10
[gha] Trigger installer_release on deploy_release #4083
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
[gha] Trigger installer_release on deploy_release #4083
Conversation
📝 WalkthroughWalkthroughThe workflow now triggers after Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub
participant DR as deploy_release<br/>Workflow
participant IR as installer_release<br/>Workflow
participant API as GitHub API
participant S3 as AWS S3
DR->>S3: Upload assets & binaries
DR->>GH: Workflow completes
GH->>IR: Trigger on workflow_run<br/>(if completed successfully)
IR->>API: Fetch latest release tag
API-->>IR: Return release tag
IR->>IR: Build installer with tag
IR->>S3: Upload to S3 with tag-based path
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@copilot Proceed with "Approach 2: workflow_run Trigger (Recommended)" |
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Implemented in commit 16f44ee. Key changes:
The installer workflow will now only execute after deploy_release completes successfully, ensuring AWS ECR images are available before the installer build begins. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4083 +/- ##
=======================================
Coverage 74.57% 74.57%
=======================================
Files 295 295
Lines 10938 10938
Branches 1372 1372
=======================================
Hits 8157 8157
Misses 2385 2385
Partials 396 396
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This PR modifies the installer_release workflow to execute after the deploy_release workflow completes, rather than both running simultaneously when a release is published. This prevents the installer workflow from attempting to pull container images from AWS ECR before they've been uploaded by the deploy workflow.
Key changes:
- Changed trigger from
release.publishedtoworkflow_runthat fires when "Deploy Update to Live Server" completes - Added
workflow_dispatchtrigger for manual execution - Implemented release tag retrieval via GitHub CLI (
gh release view) instead of from the release event context - Updated hardened-runner allowed endpoints to include
api.github.comfor GitHub CLI access
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/installer_release.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Agent
- GitHub Check: docker_build
🔇 Additional comments (7)
.github/workflows/installer_release.yml (7)
4-8: LGTM: Workflow trigger properly sequences execution.The
workflow_runtrigger ensures this workflow waits for "Deploy Update to Live Server" to complete, addressing the race condition where ECR images weren't available. Theworkflow_dispatchaddition allows manual testing.
16-16: LGTM: Conditional properly gates execution.The condition ensures the job only runs on manual dispatch or when the upstream workflow completes successfully, preventing wasted runs when deploy_release fails.
17-18: LGTM: Job outputs properly configured.The output correctly propagates the release tag to the downstream
upload_installerjob.
66-66: Correct usage of release tag output.The reference to
steps.release.outputs.tagis syntactically correct. However, verify that the upstream step (lines 57-62) properly handles all edge cases to ensure a valid tag is always provided here.
29-29: LGTM: API endpoint correctly added for gh CLI.The
api.github.com:443endpoint is required for the newgh release viewcommand in the "Get latest release tag" step.
86-86: LGTM: GitHub endpoint required for artifact download.The
github.com:443endpoint is required for theactions/download-artifactaction to fetch the installer from the previous job.
102-102: LGTM: Correct reference to upstream job output.The reference to
needs.make_installer.outputs.release_tagcorrectly retrieves the release tag from the dependent job for the S3 upload path.
imnasnainaec
left a comment
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.
@imnasnainaec reviewed 1 file and all commit messages.
Reviewable status: 1 of 2 files reviewed, all discussions resolved.
jasonleenaylor
left a comment
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.
@jasonleenaylor reviewed 2 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @copilot[bot]).
The
installer_releaseworkflow fails when it runs beforedeploy_releasecompletes, as it attempts to pull container images from AWS ECR that haven't been uploaded yet. Both workflows previously triggered simultaneously on release publication.Solution Implemented
Implements use of the gh API as suggested by Claude Sonnet.
Also adds "workflow_dispatch:" to
installer_releaseto be able to manually trigger the workflow.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
This change is
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.