Skip to content

Fix/scorecard silent failure - #453

Draft
EngCaioFonseca wants to merge 2 commits into
chaoss:mainfrom
EngCaioFonseca:fix/scorecard-silent-failure
Draft

Fix/scorecard silent failure#453
EngCaioFonseca wants to merge 2 commits into
chaoss:mainfrom
EngCaioFonseca:fix/scorecard-silent-failure

Conversation

@EngCaioFonseca

@EngCaioFonseca EngCaioFonseca commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

  • Please include a summary of the change.

The issue seemed to have started once in one previous commit (f6ad816), where a failed scorecard has been made silent (no logs were being written on why the scorecard is empty). It only checks if there's returned output check, if there is, even if it is empty, it considers a success. So it goes to the next task.
The fixes were re-enabling the logs, get the proper error handling, setting a time limit for the report, and actually writing the task as a fail instead of a success if it didn't work, instead of "done".

We should observe way more failures now, which is expected, since a lot of failures were happening and were just written down as successes. Which will make it possible for us to see why they are failing.

The commit issue (f6ad816):
it changed required_output['checks'] -> required_output.get('checks'). Before that, an empty result raised KeyError: 'checks' and the task would fail, that's the MetadataException (" 'checks' | Additional metadata: required_output: {}").
The .get() converted a failure into a silent success.
It is not possible to see the cause in the logs because p.stderr is thrown away. Scorecard writes all of its error details to stderr, so production logs contain only 'No scorecard checks found!' with no reason.

This PR fixes #
#222

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Generative AI disclosure

Please select one option:

  • This contribution was NOT assisted or created by Generative AI tools.
  • This contribution was assisted or created by Generative AI tools.

If AI tools were used, please provide details below:
- What tools were used?
- How were these tools used?
- Did you review these outputs before submitting this PR?

… data

Signed-off-by: Caio Fonseca <engcaiofonseca@protonmail.com>
Signed-off-by: Caio Fonseca <engcaiofonseca@protonmail.com>
p = subprocess.run(subprocess_arr,capture_output=True, text=True, timeout=None)

try:
p = subprocess.run(subprocess_arr,cwd=cwd,capture_output=True, text=True, timeout=timeout)
@MoralCode

Copy link
Copy Markdown
Contributor

Can you fill in the AI disclosure template with the tools you used and how?

@MoralCode

Copy link
Copy Markdown
Contributor

also i dont think this is a complete fix to #222, but its a good start - being able to see the errors will help us diagnose why there may not be new data showing up for scorecard

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants