Skip to content

[CI] Fix SARIF upload when reports directory is missing#4394

Open
dbrattli wants to merge 2 commits intomainfrom
dbrattli/fix-build
Open

[CI] Fix SARIF upload when reports directory is missing#4394
dbrattli wants to merge 2 commits intomainfrom
dbrattli/fix-build

Conversation

@dbrattli
Copy link
Collaborator

Summary

  • Fixes CI error Path does not exist: src/reports in the upload-sarif step
  • The analyzer step has continue-on-error: true, so when it fails the src/reports directory is never created, causing upload-sarif to error
  • Adds mkdir -p src/reports before the upload step and if: success() || failure() so both steps run regardless of analyzer outcome

Test plan

  • Verify the CI workflow passes on this branch

🤖 Generated with Claude Code

dbrattli and others added 2 commits March 12, 2026 16:15
The analyzer step has continue-on-error, so when it fails the
src/reports directory is never created, causing upload-sarif to error.
Ensure the directory exists before uploading.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only run upload-sarif when the analyzer actually produced .sarif files,
instead of trying to create the directory or uploading an empty one.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dbrattli
Copy link
Collaborator Author

dbrattli commented Mar 12, 2026

This fixes the build but I think this is may have been a result of fsharp-analyzers tool was bumped from 0.34.1 → 0.36.0 in #4389 and that it does not work well with FSharp.Analyzers.Build 0.5.0, so not sure the analyzers works anymore. Any ideas? @ncave @MangelMaxime

@MangelMaxime
Copy link
Member

If the problem is that FSharp.Analyzers.Build 0.5.0 broke because of the new version of fsharp-analyzers we should report it in https://github.com/ionide/FSharp.Analyzers.SDK.

I don't think this is normal that we need to do such work around in the CI pipeline

@dbrattli
Copy link
Collaborator Author

Should we then merge this until we can resolve the analyzer issue to get the builds passing again?

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.

2 participants