Read OTel secrets in demo apps CD GitHub actions (#12573)#12574
Read OTel secrets in demo apps CD GitHub actions (#12573)#12574yasmoradi wants to merge 2 commits into
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThree GitHub Actions CD workflow files (admin-sample, sales-module-demo, todo-sample) had their "Update core appsettings.json" step updated to include two new environment variables, OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS, sourced from repository secrets. ChangesCD Workflow OTel Configuration
Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/admin-sample.cd.yml:
- Around line 191-192: The OTLP environment variable assignments in the workflow
contain extra trailing braces, so the substituted secret values for
OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS are malformed. Update
the env entries in the workflow block to remove the stray closing braces after
the secrets, and verify the same pattern is not repeated elsewhere in the
workflow.
In @.github/workflows/sales-module-demo.cd.yml:
- Around line 121-122: The OTEL secret expressions in the workflow still have
extra trailing braces, which makes the values invalid for the substitution step.
Update the `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS`
entries in the workflow so they reference the secrets cleanly, using the same
secret syntax as the surrounding environment variables without the extra `}}`.
In @.github/workflows/todo-sample.cd.yml:
- Around line 335-336: The OTEL secret expressions in the workflow env block
have an extra trailing brace, so both OTEL_EXPORTER_OTLP_ENDPOINT and
OTEL_EXPORTER_OTLP_HEADERS are being rendered with literal braces. Update the
workflow entries in this env section to use the correct GitHub Actions secret
expression syntax, and apply the same fix anywhere else in the workflow set
where the same typo appears.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 738f1784-f125-4d40-83fd-2e42a5c15d50
📒 Files selected for processing (3)
.github/workflows/admin-sample.cd.yml.github/workflows/sales-module-demo.cd.yml.github/workflows/todo-sample.cd.yml
| OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}}} | ||
| OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}}} |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
sed -n '180,200p' .github/workflows/admin-sample.cd.yml | cat -nRepository: bitfoundation/bitplatform
Length of output: 1521
🏁 Script executed:
rg -n "OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)|WebApplicationBuilderExtensions|appsettings" .github AdminPanel -g '!**/bin/**' -g '!**/obj/**'Repository: bitfoundation/bitplatform
Length of output: 5408
🏁 Script executed:
rg -n "OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)|WebApplicationBuilderExtensions" . -g '!**/bin/**' -g '!**/obj/**'Repository: bitfoundation/bitplatform
Length of output: 1676
🏁 Script executed:
sed -n '1,260p' .github/workflows/admin-sample.cd.yml | cat -n | sed -n '180,196p'Repository: bitfoundation/bitplatform
Length of output: 1184
Remove the trailing }} from both OTLP env values
The extra characters become part of the substituted secret value, so the generated OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS values are invalid and OTLP export breaks.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/admin-sample.cd.yml around lines 191 - 192, The OTLP
environment variable assignments in the workflow contain extra trailing braces,
so the substituted secret values for OTEL_EXPORTER_OTLP_ENDPOINT and
OTEL_EXPORTER_OTLP_HEADERS are malformed. Update the env entries in the workflow
block to remove the stray closing braces after the secrets, and verify the same
pattern is not repeated elsewhere in the workflow.
| OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}}} | ||
| OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}}} |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== sales-module-demo.cd.yml (around lines 121-122) ==\n'
sed -n '110,130p' .github/workflows/sales-module-demo.cd.yml
printf '\n== admin-sample.cd.yml (matching area if present) ==\n'
if [ -f .github/workflows/admin-sample.cd.yml ]; then
sed -n '110,130p' .github/workflows/admin-sample.cd.yml
fi
printf '\n== Search for OTEL_EXPORTER_OTLP_* secret expressions in workflows ==\n'
rg -n 'OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)|secrets\.(OTEL_EXPORTER_OTLP_ENDPOINT|OTEL_EXPORTER_OTLP_HEADERS)' .github/workflowsRepository: bitfoundation/bitplatform
Length of output: 3118
Remove the trailing }} from the OTEL secret expressions. OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS still append extra braces, so the substitution action receives invalid values.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/sales-module-demo.cd.yml around lines 121 - 122, The OTEL
secret expressions in the workflow still have extra trailing braces, which makes
the values invalid for the substitution step. Update the
`OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` entries in the
workflow so they reference the secrets cleanly, using the same secret syntax as
the surrounding environment variables without the extra `}}`.
| OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}}} | ||
| OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}}} |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Locate the workflow files and the exact secret expressions.
git ls-files '.github/workflows/*' | sed -n '1,200p'
printf '\n--- matches ---\n'
rg -n 'OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)|\$\{\{ secrets\.' .github/workflows -n
printf '\n--- target file excerpt ---\n'
sed -n '326,342p' .github/workflows/todo-sample.cd.yml
printf '\n--- other workflow excerpts ---\n'
for f in .github/workflows/*.yml .github/workflows/*.yaml; do
[ -f "$f" ] || continue
if rg -n 'OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)' "$f" >/dev/null; then
echo "FILE: $f"
sed -n '1,220p' "$f" | rg -n 'OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)|\$\{\{ secrets\.'
echo
fi
doneRepository: bitfoundation/bitplatform
Length of output: 15251
Remove the trailing braces from the OTEL secret expressions
The same }} typo appears here and in the other two workflow files, so both OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS end up with literal braces appended.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/todo-sample.cd.yml around lines 335 - 336, The OTEL secret
expressions in the workflow env block have an extra trailing brace, so both
OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS are being rendered
with literal braces. Update the workflow entries in this env section to use the
correct GitHub Actions secret expression syntax, and apply the same fix anywhere
else in the workflow set where the same typo appears.
closes #12573
Summary by CodeRabbit