fix: enhance validations in loadRawScoreFiles to check for missing metadata#498
fix: enhance validations in loadRawScoreFiles to check for missing metadata#498ShantKhatri wants to merge 1 commit into
Conversation
…tadata Signed-off-by: Prashantkumar Khatri <prashantkhatri202@gmail.com> Signed-off-by: Prashantkumar Khatri <khatri2105104@st.jmi.ac.in>
c25974d to
e407d7e
Compare
|
Hi @mathieu-benoit , Here's the output on my local after the fix: |
|
Thanks, @ShantKhatri! While here, I'm just wondering what do you @ShantKhatri @chris-stephenson think if this goes to |
Good point! The fix in Also, practically, the JSON schema already enforces So, score-compose and score-k8s PRs are the real fix. We can move with a separate score-go PR after those land if we want the extra layer. |

Description
This PR refactors
loadRawScoreFiles()to accumulate and report all validation errors together. This prevents the silent overwriting of Score files when multiple files have missing or invalid metadata, and provides users with a complete picture of all problems in their input files before re-running the command.What does this PR do?
Fixes #492
When multiple Score files were provided and some (or all) lacked required metadata, the loader would silently overwrite entries under the empty workload key
"", with only the last invalid file being reported in the error message. This hide the existence of earlier invalid files from users.Types of changes
Checklist: