-
Notifications
You must be signed in to change notification settings - Fork 12
feat(ci): restore benchmark PR comments + add reliability/chaos reporting #589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jbachorik
wants to merge
22
commits into
main
Choose a base branch
from
jb/ci-pr-comments
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b7d2ebb
feat(ci): restore benchmark PR comments + add reliability/chaos repor…
jbachorik 932f745
ci: retrigger pipeline
jbachorik 484e303
Merge branch 'main' into jb/ci-pr-comments
jbachorik 47cdd81
ci: add GitHub→GitLab trigger for test:reliability and test:benchmark…
jbachorik 37df588
ci: expose RUN_RELIABILITY/RUN_BENCHMARKS as documented GitLab pipeli…
jbachorik 34c4cb4
fix(ci): restore unconditional benchmark runs on trigger-source pipel…
jbachorik 082f273
ci: pre-fill RUN_RELIABILITY=true in GitLab UI; prepare.sh always wri…
jbachorik c79dcbe
ci: expose RUN_RELIABILITY as spec.inputs so it appears in GitLab New…
jbachorik 4903383
ci: revert to variables+description for RUN_RELIABILITY (spec.inputs …
jbachorik 2287bad
fix(ci): move trigger variables to job level (not inside trigger: block)
jbachorik ab202da
ci: default RUN_RELIABILITY to false
jbachorik 0176e6c
fix(ci): replace alpine with approved registry image in reliability jobs
jbachorik 0b3a1d7
fix(ci): replace bash-style default ${RUNTIME:-120} with plain value 120
jbachorik 2b981d0
fix(ci): include crash signal and frame in chaos failure report
jbachorik 378126e
fix(ci): use dd-octo-sts to clone benchmarking-platform (CI_JOB_TOKEN…
jbachorik 549012a
fix(ci): clone benchmarking-platform without auth (public repo)
jbachorik b388ca5
fix(ci): post PR comments via GitHub API + dd-octo-sts token (drop pr…
jbachorik 469aee5
fix(ci): run benchmarks automatically on push-source PR pipelines
jbachorik d15d987
fix(ci): harden PR-comment helper (trim/validate token, GH API header…
jbachorik a403026
fix(ci): grant pull_requests:write for PR comments; run benchmarks on…
jbachorik eea6401
ci: drop sts policy change (split into #595)
jbachorik 660b162
Merge branch 'main' into jb/ci-pr-comments
jbachorik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| #!/usr/bin/env bash | ||
| # Post aggregated benchmark comparison results as a single PR comment. | ||
| # | ||
| # Expects all per-cell comparison-baseline-vs-candidate_*.md reports to be | ||
| # present under REPORTS_DIR (default: reports/). | ||
| # | ||
| # Required env: | ||
| # DDPROF_COMMIT_BRANCH – branch name used to locate the open PR | ||
| # Optional env: | ||
| # CI_PIPELINE_URL, DDPROF_COMMIT_SHA | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| REPORTS_DIR="${1:-reports}" | ||
| HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
|
||
| # Aggregate all per-cell reports into a single comment body | ||
| SECTIONS="" | ||
| for md in "${REPORTS_DIR}"/comparison-baseline-vs-candidate_*.md; do | ||
| [ -f "${md}" ] || continue | ||
| label=$(basename "${md}" .md | sed 's/comparison-baseline-vs-candidate_//') | ||
| SECTIONS="${SECTIONS} | ||
| <details><summary>${label}</summary> | ||
|
|
||
| $(cat "${md}") | ||
|
|
||
| </details> | ||
| " | ||
| done | ||
|
|
||
| if [ -z "${SECTIONS}" ]; then | ||
| echo "No benchmark reports found under ${REPORTS_DIR} — skipping comment" | ||
| exit 0 | ||
| fi | ||
|
|
||
| BODY_FILE=$(mktemp) | ||
| trap 'rm -f "${BODY_FILE}"' EXIT | ||
| cat > "${BODY_FILE}" <<EOF | ||
| ## Benchmark Results | ||
|
|
||
| Pipeline: ${CI_PIPELINE_URL:-} Commit: \`${DDPROF_COMMIT_SHA:-unknown}\` | ||
|
|
||
| ${SECTIONS} | ||
| EOF | ||
|
|
||
| "${HERE}/../scripts/upsert-github-pr-comment.sh" \ | ||
| "benchmark-results" "${DDPROF_COMMIT_BRANCH:-}" "${BODY_FILE}" |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| #!/usr/bin/env bash | ||
| # Post aggregated reliability + chaos test results as a single PR comment. | ||
| # | ||
| # Reads REASON_* variables written to build.env by the reliability/chaos jobs | ||
| # and emits a ✅/❌ matrix with failure <details> blocks. | ||
| # | ||
| # Required env: | ||
| # DDPROF_COMMIT_BRANCH – branch name used to locate the open PR | ||
| # Optional env: | ||
| # CI_PIPELINE_URL | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
|
||
| # ── Collect failures from REASON_* env vars ──────────────────────────────────── | ||
| rel_fail=0; rel_failures="" | ||
| chaos_fail=0; chaos_failures="" | ||
|
|
||
| for key in $(compgen -v | grep -E '^REASON_.*X(jit|memory)$' | sort); do | ||
| reason="${!key}" | ||
| label="${key#REASON_}" | ||
| rel_fail=$((rel_fail + 1)) | ||
| detail=$(printf '%s' "${reason//\`/}" | tr ';' '\n') | ||
| rel_failures="${rel_failures} | ||
| <details><summary>❌ ${label//_/ }</summary> | ||
|
|
||
| \`\`\` | ||
| ${detail} | ||
| \`\`\` | ||
|
|
||
| </details>" | ||
| done | ||
|
|
||
| for key in $(compgen -v | grep -E '^REASON_.*Xchaos$' | sort); do | ||
| reason="${!key}" | ||
| label="${key#REASON_}" | ||
| chaos_fail=$((chaos_fail + 1)) | ||
| detail=$(printf '%s' "${reason//\`/}" | tr ';' '\n') | ||
| chaos_failures="${chaos_failures} | ||
| <details><summary>❌ chaos: ${label//_/ }</summary> | ||
|
|
||
| \`\`\` | ||
| ${detail} | ||
| \`\`\` | ||
|
|
||
| </details>" | ||
| done | ||
|
|
||
| # ── Assemble comment ──────────────────────────────────────────────────────────── | ||
| total_fail=$((rel_fail + chaos_fail)) | ||
| if [ "${total_fail}" -gt 0 ]; then | ||
| overall="❌ **${total_fail} failure(s) detected**" | ||
| else | ||
| overall="✅ **All reliability & chaos checks passed**" | ||
| fi | ||
|
|
||
| BODY_FILE=$(mktemp) | ||
| trap 'rm -f "${BODY_FILE}"' EXIT | ||
| cat > "${BODY_FILE}" <<EOF | ||
| ## Reliability & Chaos Results | ||
|
|
||
| ${overall} Pipeline: ${CI_PIPELINE_URL:-} | ||
| ${rel_failures}${chaos_failures} | ||
| EOF | ||
|
|
||
| "${HERE}/../scripts/upsert-github-pr-comment.sh" \ | ||
| "reliability-results" "${DDPROF_COMMIT_BRANCH:-}" "${BODY_FILE}" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.