[CI] Fix SARIF upload when reports directory is missing#4394
Open
[CI] Fix SARIF upload when reports directory is missing#4394
Conversation
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>
Collaborator
Author
|
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 |
Member
|
If the problem is that I don't think this is normal that we need to do such work around in the CI pipeline |
Collaborator
Author
|
Should we then merge this until we can resolve the analyzer issue to get the builds passing again? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Path does not exist: src/reportsin theupload-sarifstepcontinue-on-error: true, so when it fails thesrc/reportsdirectory is never created, causingupload-sarifto errormkdir -p src/reportsbefore the upload step andif: success() || failure()so both steps run regardless of analyzer outcomeTest plan
🤖 Generated with Claude Code