Skip to content

ci(cd): send production bump PR links to slack #95

Draft
saltenasl wants to merge 3 commits intomainfrom
ls/cd-slack-notifications
Draft

ci(cd): send production bump PR links to slack #95
saltenasl wants to merge 3 commits intomainfrom
ls/cd-slack-notifications

Conversation

@saltenasl
Copy link
Copy Markdown
Contributor

@saltenasl saltenasl commented Apr 20, 2026

Summary

  • add Slack notifications for production bump PRs in ops and app-config
  • keep the Slack webhook in the workflow instead of the composite action
  • expose Octopilot PR/error outputs and escape failure messages safely

Summary by CodeRabbit

  • New Features

    • Added Slack notifications for production releases that announce created PRs and report failures with error details.
  • Improvements

    • Actions now surface PR URLs and error messages for clearer reporting.
    • Notification logic enhanced to show success/failure context, improving visibility and troubleshooting.

Move Slack notifications into the release workflow so the webhook stays in
workflow secrets context for this public repo, and escape failure messages so
alerts remain valid when Octopilot returns quoted or multiline errors.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 20, 2026

📝 Walkthrough

Walkthrough

The composite action runs an octopilot step with id: octopilot and continue-on-error: true, no longer injecting GitHub runtime env vars. After execution it captures octopilot’s exit code, reads octopilot-output.json (if present) with jq to extract .repos[0].pr.url and .repos[0].error, and writes them to action outputs pr_url and error_message before exiting with the captured code. The CD workflow assigns IDs to the two update steps and sends conditional Slack notifications: on success when pr_url exists (posts PR URL) and on failure (posts error_message or fallback), for both config-update steps.

Sequence Diagram(s)

sequenceDiagram
    participant WF as GitHub Workflow
    participant Action as update-config-version Action
    participant Octo as octopilot
    participant File as octopilot-output.json
    participant Slack as Slack notifier

    WF->>Action: invoke action
    Action->>Octo: run octopilot (id: octopilot, continue-on-error: true)
    Octo-->>File: write results (octopilot-output.json)
    Action->>Action: capture octopilot exit code
    Action->>File: read with jq
    File-->>Action: return pr_url + error_message
    Action-->>WF: expose outputs (pr_url, error_message) and exit with octopilot code
    WF->>WF: evaluate step outcomes and outputs
    alt step outcome == success and pr_url present
        WF->>Slack: send "PR created" with pr_url
    else step outcome == failure
        WF->>Slack: send "PR failed" with error_message (or fallback)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Updates Docs ⚠️ Warning PR adds Slack notifications and new outputs but lacks documentation updates in repository, CHANGELOG, README, and primary docs. Add CHANGELOG entry and README.md to .github/actions/update-config-version/ documenting new outputs and Slack feature.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Slack notifications for production bump PR links in the CI/CD workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 20, 2026

📦 Python package built successfully!

  • Version: 2.2.1.dev4+e6a54d9
  • Wheel: deepnote_toolkit-2.2.1.dev4+e6a54d9-py3-none-any.whl
  • Install:
    pip install "deepnote-toolkit @ https://deepnote-staging-runtime-artifactory.s3.amazonaws.com/deepnote-toolkit-packages/2.2.1.dev4%2Be6a54d9/deepnote_toolkit-2.2.1.dev4%2Be6a54d9-py3-none-any.whl"

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.27%. Comparing base (f2ac75a) to head (adf0783).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
- Coverage   74.32%   74.27%   -0.06%     
==========================================
  Files          94       94              
  Lines        5535     5535              
  Branches      824      824              
==========================================
- Hits         4114     4111       -3     
- Misses       1155     1157       +2     
- Partials      266      267       +1     
Flag Coverage Δ
combined 74.27% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a 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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/actions/update-config-version/action.yml:
- Around line 274-279: The current writes to GITHUB_OUTPUT using echo
"error_message=$ERROR_MESSAGE" will break when ERROR_MESSAGE contains newlines
or special chars; change the write for ERROR_MESSAGE to use GitHub Actions
multiline output syntax (a heredoc-style block) or URL-encode newlines (%0A)
before writing so the output key remains a single valid entry. Specifically,
keep the PR_URL echo as-is but replace the direct echo for ERROR_MESSAGE with a
heredoc sequence that first writes the key with a delimiter (e.g.,
error_message<<EOF) to $GITHUB_OUTPUT, then writes the raw ERROR_MESSAGE lines,
then closes the delimiter (EOF), ensuring GITHUB_OUTPUT receives a safe
multi-line value; reference the variables ERROR_MESSAGE, PR_URL and the
GITHUB_OUTPUT target when making the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c15ad4e2-5e0c-4238-98ba-e368133b62ae

📥 Commits

Reviewing files that changed from the base of the PR and between f2ac75a and a175aa3.

📒 Files selected for processing (2)
  • .github/actions/update-config-version/action.yml
  • .github/workflows/cd.yml

Comment thread .github/actions/update-config-version/action.yml
Add Slack notifications for production config bump PRs and keep the webhook in
the workflow context. Surface Octopilot outputs for the workflow and harden
failure reporting against multiline errors.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a 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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/actions/update-config-version/action.yml:
- Around line 274-280: The heredoc delimiter for writing to $GITHUB_OUTPUT is
hardcoded as "EOF" which can be present inside $ERROR_MESSAGE and corrupt the
output; replace the fixed delimiter around the block that writes
"pr_url=$PR_URL", "error_message<<EOF", "$ERROR_MESSAGE", "EOF" with a generated
unique delimiter (e.g., build a DELIM variable using run-specific info or random
bytes) and use that DELIM in both the opening "error_message<<$DELIM" echo and
the closing echo of "$DELIM" so the delimiter cannot collide with the error
payload.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9a51dae9-41aa-43d8-be50-b4453cec292c

📥 Commits

Reviewing files that changed from the base of the PR and between a175aa3 and 2cf8036.

📒 Files selected for processing (1)
  • .github/actions/update-config-version/action.yml

Comment thread .github/actions/update-config-version/action.yml
Send Slack notifications for production config bump PRs while keeping the
webhook in the workflow context, and harden Octopilot output handling so
multiline failures still surface correctly.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a 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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/actions/update-config-version/action.yml:
- Line 268: The action uses the external utility uuidgen to build
OUTPUT_DELIMITER, which adds an unnecessary dependency; replace that with a
bash-only unique token construction for OUTPUT_DELIMITER by combining built-in
shell sources of entropy (e.g., $RANDOM, the current PID, and a
timestamp/nanoseconds) instead of calling uuidgen; update the assignment of
OUTPUT_DELIMITER so it no longer invokes uuidgen (refer to the OUTPUT_DELIMITER
variable and the current use of uuidgen) and ensure any downstream reads still
use the same delimiter format.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5c4eb1ae-ec87-439f-a81c-742b77285037

📥 Commits

Reviewing files that changed from the base of the PR and between 2cf8036 and adf0783.

📒 Files selected for processing (1)
  • .github/actions/update-config-version/action.yml

Comment thread .github/actions/update-config-version/action.yml
@deepnote-bot
Copy link
Copy Markdown

🚀 Review App Deployment Started

📝 Description 🌐 Link / Info
🌍 Review application ra-95
🔑 Sign-in URL Click to sign-in
📊 Application logs View logs
🔄 Actions Click to redeploy
🚀 ArgoCD deployment View deployment
Last deployed 2026-04-20 14:50:38 (UTC)
📜 Deployed commit 80d08b1da2e1d53087b6299a2919a8329d1ac2a0
🛠️ Toolkit version e6a54d9

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.

2 participants