Skip to content

Do not fail bundle size workflow on main branch#3653

Merged
yurishkuro merged 1 commit intojaegertracing:mainfrom
yurishkuro:bundle-dont-fail-on-main
Mar 21, 2026
Merged

Do not fail bundle size workflow on main branch#3653
yurishkuro merged 1 commit intojaegertracing:mainfrom
yurishkuro:bundle-dont-fail-on-main

Conversation

@yurishkuro
Copy link
Copy Markdown
Member

@yurishkuro yurishkuro commented Mar 21, 2026

Which problem is this PR solving?

  • The workflow failed on main because of expected bundle size change, but the check should only be failing on PRs, on main it needs to always write out the current bundle size to artifact.

Description of the changes

  • Skip compare step on main

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro requested a review from a team as a code owner March 21, 2026 20:52
@yurishkuro yurishkuro added the changelog:ci Change related to continuous integration / testing label Mar 21, 2026
Copilot AI review requested due to automatic review settings March 21, 2026 20:52
@yurishkuro yurishkuro merged commit 3cbd6fe into jaegertracing:main Mar 21, 2026
12 of 13 checks passed
@yurishkuro yurishkuro deleted the bundle-dont-fail-on-main branch March 21, 2026 20:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

- 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'
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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'

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.08%. Comparing base (d30c236) to head (b2bb549).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:ci Change related to continuous integration / testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants