Do not fail bundle size workflow on main branch#3653
Do not fail bundle size workflow on main branch#3653yurishkuro merged 1 commit intojaegertracing:mainfrom
Conversation
Signed-off-by: Yuri Shkuro <github@ysh.us>
There was a problem hiding this comment.
Pull request overview
Updates the bundle-size GitHub Actions workflow so the “Compare bundle sizes” step is skipped on the main branch, preventing main branch runs from failing due to bundle-size regressions.
Changes:
- Adds an additional condition to the bundle-size comparison step to skip it when running on
refs/heads/main.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| - name: Compare bundle sizes | ||
| if: steps.cache-bundle-size.outputs.cache-matched-key != '' | ||
| if: steps.cache-bundle-size.outputs.cache-matched-key != '' && github.ref != 'refs/heads/main' |
There was a problem hiding this comment.
This if guard relies on cache-matched-key, but the workflow never saves a cache under the exact key jaeger-ui-bundle-size (it saves jaeger-ui-bundle-size-${{ github.run_id }}), so cache-matched-key will typically stay empty and the compare step will never run. Consider switching to a versioned save key (e.g. includes github.sha/run_id) and restoring via a prefix restore-keys (e.g. jaeger-ui-bundle-size-) so PRs can compare against the latest main baseline.
|
|
||
| - name: Compare bundle sizes | ||
| if: steps.cache-bundle-size.outputs.cache-matched-key != '' | ||
| if: steps.cache-bundle-size.outputs.cache-matched-key != '' && github.ref != 'refs/heads/main' |
There was a problem hiding this comment.
The branch check github.ref != 'refs/heads/main' is redundant with this workflow's triggers (push only runs on main) and is inconsistent with the later Save new bundle size step which keys off github.event_name. Using github.event_name != 'push' here would be clearer and avoids subtle ref differences across events like merge_group.
| if: steps.cache-bundle-size.outputs.cache-matched-key != '' && github.ref != 'refs/heads/main' | |
| if: steps.cache-bundle-size.outputs.cache-matched-key != '' && github.event_name != 'push' |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3653 +/- ##
=======================================
Coverage 89.08% 89.08%
=======================================
Files 304 304
Lines 9741 9741
Branches 2591 2596 +5
=======================================
Hits 8678 8678
Misses 1059 1059
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Which problem is this PR solving?
Description of the changes