Repository navigation
ci: notify Pubgrade with its notify action - #205
Conversation
Replace the inline request of the release job `notify` with Pubgrade's action `actions/notify`, which checks its inputs, masks the token and retries requests that never reached Pubgrade. Pinned to the unreleased commit that added the action until a Pubgrade release ships it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pass `git-tag` explicitly instead of relying on the action default, say that a run registers the build at most once and that re-runs notify again, document the stricter input checks and link the action at its pinned commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Any failure after the request left the runner may come after Pubgrade registered the build, not only timeouts and 5xx answers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideConfigurationReplace the release job’s inline Pubgrade request with the pinned notify action while preserving its inputs, release environment, and job conditions.
DocumentationUpdate release documentation to explain Pubgrade action behavior, input validation, and when to check registered builds before rerunning.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #205 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 53 53
Lines 2340 2340
Branches 274 274
=========================================
Hits 2340 2340 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Pubgrade v0.3.0 is released; pin actions/notify to its release commit instead of the unreleased dev commit 0694d03, in the workflow and the development docs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Linked issuesChecked at commit 742539f #157 ci: notify Pubgrade with the notify action · 3 of 3 met
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/release.yml" line_range="385" />
<code_context>
- --header 'Content-Type: application/json' \
- --data "${body}" \
- --config - <<< "header = \"X-Project-Access-Token: ${PUBGRADE_TOKEN}\""
+ uses: elixir-cloud-aai/Pubgrade/actions/notify@344a58adc1c871135f86c404eb33ed91011886ad # v0.3.0
+ with:
+ url: ${{ vars.PUBGRADE_URL }}
</code_context>
<issue_to_address>
**Registered builds report failed**
When pubgrade's synchronous notifications take more than the action's 60-second request limit, the notify action's request times out before Pubgrade finishes its synchronous notifications, so the job reports failure even though Pubgrade may have registered the build and begun notifying deployments; the replaced request allowed 300 seconds, and the failure requires manual checking before retry.
Restore a 300-second request timeout for the notification.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and the pinned Pubgrade action receives the release token and registers the image with Pubgrade, whose subscribers may act on that notification. If the action sends a wrong build or sends it unexpectedly, reverting the workflow cannot retract the notification or undo any downstream deployment it triggered.
Blocking findings: .github/workflows/release.yml:385
Closes #157
Summary
The release job
notifynow registers the image at Pubgrade with Pubgrade's actionelixir-cloud-aai/Pubgrade/actions/notify(elixir-cloud-aai/Pubgrade#88, #115) instead of its inlinecurlstep. The action checks its inputs, masks the token and retries only requests that never reached Pubgrade. The job keepsif: vars.PUBGRADE_URL != '', thereleaseenvironment andpermissions: {}. It sends the same request body: the image<DOCKERHUB_ORG or elixircloud>/tesk-api:<version>and the release tag ashead_commit.tag(passed explicitly asgit-tag).docs/development.md("Versioning and releases") now describes the action. It says that one run registers the build at most once and that a re-run notifies again, so check the builds before re-running after any failure other than no connection or an invalid input. It also gives the stricter input checks: the ID and the token may only hold letters, digits,.,~and-. The settings table is unchanged.Verification
actionlint1.7.7 (same image as the CI jobLint): passes.action.yml,notify.shat the pinned commit) against the removed step.344a58awith the comment# v0.3.0; the tag resolves to that commit, andactions/notify/is unchanged from the dev commit0694d03checked before.4b85e5c: all checks passed (CI passed, Lint, Test, Docs, Smoke test, Scan image, CodeQL).git-tag, stricter input rules) and round 2 findings are fixed.Declined review findings
--max-time 60), where the removed step allowed 300 s. Pubgrade answers only after it has notified the subscriptions. That takes up to 2·t+5 s (25 s with the defaultnotification_timeoutof 10 s), so the limit only matters if a deployment raises that timeout to 28 s or more. Declined here because the limit belongs to the action, and a change would be a Pubgrade issue. The docs now say to check the builds before re-running after such a failure.Notes
PUBGRADE_URL(repository variable),PUBGRADE_REPOSITORY_ID(variable),PUBGRADE_TOKEN(secret of thereleaseenvironment).Open questions
None.
🤖 Generated with Claude Code
Summary by Sourcery
Use Pubgrade’s pinned notify action to register released images and document its retry and rerun behavior.
Enhancements:
Documentation: