ci(cd): send production bump PR links to slack #95
Conversation
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.
📝 WalkthroughWalkthroughThe composite action runs an 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
📦 Python package built successfully!
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
.github/actions/update-config-version/action.yml.github/workflows/cd.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.
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
.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.
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
.github/actions/update-config-version/action.yml
|
🚀 Review App Deployment Started
|
Summary
opsandapp-configSummary by CodeRabbit
New Features
Improvements