Skip to content

ci: notify Pubgrade with its notify action - #205

Merged
uniqueg merged 5 commits into
devfrom
ci/157-pubgrade-notify-action
Nov 21, 2026
Merged

uniqueg merged 5 commits into
devfrom
ci/157-pubgrade-notify-action

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Closes #157

Summary

The release job notify now registers the image at Pubgrade with Pubgrade's action elixir-cloud-aai/Pubgrade/actions/notify (elixir-cloud-aai/Pubgrade#88, #115) instead of its inline curl step. The action checks its inputs, masks the token and retries only requests that never reached Pubgrade. The job keeps if: vars.PUBGRADE_URL != '', the release environment and permissions: {}. It sends the same request body: the image <DOCKERHUB_ORG or elixircloud>/tesk-api:<version> and the release tag as head_commit.tag (passed explicitly as git-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

  • actionlint 1.7.7 (same image as the CI job Lint): passes.
  • Checked the action's inputs and request body (action.yml, notify.sh at the pinned commit) against the removed step.
  • The action is pinned to Pubgrade's release v0.3.0 (2026-11-20): commit 344a58a with the comment # v0.3.0; the tag resolves to that commit, and actions/notify/ is unchanged from the dev commit 0694d03 checked before.
  • CI on the PR at 4b85e5c: all checks passed (CI passed, Lint, Test, Docs, Smoke test, Scan image, CodeQL).
  • Reviewed by the adversarial and quality reviewer subagents in two rounds. Round 1 findings (docs wording, explicit git-tag, stricter input rules) and round 2 findings are fixed.

Declined review findings

  • The action limits each request to 60 s (--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 default notification_timeout of 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

  • No secrets or variables change. The settings stay as documented: PUBGRADE_URL (repository variable), PUBGRADE_REPOSITORY_ID (variable), PUBGRADE_TOKEN (secret of the release environment).

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:

  • Replace the inline Pubgrade notification request with Pubgrade’s pinned notify action, preserving the existing release conditions, credentials, image, and release-tag registration.
  • Improve Pubgrade notification reliability and input validation by masking the token, retrying only requests that did not reach Pubgrade, and rejecting invalid identifiers or tokens.

Documentation:

  • Update release documentation to describe the Pubgrade action, its validation and retry behavior, and when to inspect existing builds before rerunning notifications.

uniqueg and others added 3 commits November 17, 2026 07:19
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]>
@sourcery-ai

sourcery-ai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Replace the release job’s inline Pubgrade request with the pinned notify action while preserving its inputs, release environment, and job conditions.

  • .github/workflows/release.yml L360-374, L383 (removed lines), L385-391

Documentation

Update release documentation to explain Pubgrade action behavior, input validation, and when to check registered builds before rerunning.

  • docs/development.md L228-236, L254-263

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3574e56) to head (742539f).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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]>
@uniqueg
uniqueg marked this pull request as ready for review November 20, 2026 23:51
@sourcery-ai

sourcery-ai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Linked issues

Checked at commit 742539f

#157 ci: notify Pubgrade with the notify action · 3 of 3 met

# Requirement Status Notes
1 Replace the inline request with Pubgrade's notify action, pinned to a released commit with its version comment and configured with the release inputs. ✅ Met The workflow uses the action pinned to commit 344a58adc1c871135f86c404eb33ed91011886ad with # v0.3.0, and passes the URL, repository ID, token, image, and release tag.
2 Keep the job condition and release environment. ✅ Met The job retains if: vars.PUBGRADE_URL != '' and environment: release.
3 Update the release documentation and have actionlint pass. ✅ Met The development docs describe the action and its behavior; the PR reports that actionlint passes.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread .github/workflows/release.yml Resolved
@uniqueg
uniqueg merged commit c77ea7d into dev Nov 21, 2026
25 checks passed
@uniqueg
uniqueg deleted the ci/157-pubgrade-notify-action branch November 21, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: notify Pubgrade with the notify action

1 participant