Skip to content

Fix membrowse job to run on all pushes for commit chain tracking#3488

Merged
hathach merged 2 commits into
readd-ci-checkpathfrom
copilot/sub-pr-3485
Feb 9, 2026
Merged

Fix membrowse job to run on all pushes for commit chain tracking#3488
hathach merged 2 commits into
readd-ci-checkpathfrom
copilot/sub-pr-3485

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 9, 2026

The membrowse job was being skipped on doc-only pushes because its cmake dependency was gated on code_changed. This broke MemBrowse commit chain tracking.

Changes:

  • Added always() && !cancelled() condition to run membrowse even when cmake is skipped
  • Added explicit event checks: always run on push/release/workflow_dispatch, only run on PR if code changed
  • Added check-paths to needs array to access code_changed output
  • Pass actual code_changed value instead of hardcoded true
membrowse:
  needs: [check-paths, cmake]
  if: |
    always() && !cancelled() && (
      github.event_name == 'push' ||
      github.event_name == 'release' ||
      github.event_name == 'workflow_dispatch' ||
      (github.event_name == 'pull_request' && needs.check-paths.outputs.code_changed == 'true')
    )
  uses: ./.github/workflows/membrowse-report.yml
  with:
    code_changed: ${{ needs.check-paths.outputs.code_changed == 'true' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: hathach <249515+hathach@users.noreply.github.com>
Copilot AI changed the title [WIP] Add back check-path job to workflow Fix membrowse job to run on all pushes for commit chain tracking Feb 9, 2026
Copilot AI requested a review from hathach February 9, 2026 12:19
@hathach
Copy link
Copy Markdown
Owner

hathach commented Feb 9, 2026

@membrowse does it look better ?

@michael-membrowse
Copy link
Copy Markdown
Contributor

@membrowse does it look better ?

Yes, it should work

@hathach hathach marked this pull request as ready for review February 9, 2026 13:37
Copilot AI review requested due to automatic review settings February 9, 2026 13:37
@hathach hathach merged commit a65a852 into readd-ci-checkpath Feb 9, 2026
73 of 74 checks passed
@hathach hathach deleted the copilot/sub-pr-3485 branch February 9, 2026 13:37
@hathach
Copy link
Copy Markdown
Owner

hathach commented Feb 9, 2026

@membrowse does it look better ?

Yes, it should work

perfect, thank you

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

Adjusts the Build workflow so the membrowse reporting job runs on all pushes (including doc-only pushes) to preserve MemBrowse commit-chain tracking, while keeping PR behavior gated by actual code changes.

Changes:

  • Make membrowse resilient to skipped upstream jobs by using always() && !cancelled() and adding check-paths to needs.
  • Add event-based gating: always run on push/release/workflow_dispatch, run on pull_request only when code_changed == 'true'.
  • Pass a computed code_changed value to the reusable membrowse-report.yml workflow instead of hardcoding true.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +342 to +348
if: |
always() && !cancelled() && (
github.event_name == 'push' ||
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && needs.check-paths.outputs.code_changed == 'true')
)
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

Using always() at the job level means membrowse will also run when cmake fails, not just when it’s skipped. In that case membrowse-report.yml will likely fall back to the identical: true path (no ELF), which can misrepresent a real code change/build failure as a doc-only/identical report. Consider additionally gating on needs.cmake.result != 'failure' (or needs.cmake.result == 'success' || needs.cmake.result == 'skipped') while keeping always() so it still runs when cmake is skipped.

Copilot uses AI. Check for mistakes.
uses: ./.github/workflows/membrowse-report.yml
with:
code_changed: true
code_changed: ${{ needs.check-paths.outputs.code_changed == 'true' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

code_changed is defined as “Whether code paths changed (true) or doc-only (false)” in membrowse-report.yml, but here it’s forced to true for release/workflow_dispatch regardless of what check-paths computed. This can cause the reusable workflow to attempt artifact download/restore steps even when set-matrix/cmake were skipped (no artifacts), and it blurs the meaning of the input. Consider passing the actual needs.check-paths.outputs.code_changed == 'true' value and, if you need different behavior for release/manual runs, introduce a separate explicit input/flag for that behavior.

Suggested change
code_changed: ${{ needs.check-paths.outputs.code_changed == 'true' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
code_changed: ${{ needs.check-paths.outputs.code_changed == 'true' }}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants