-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix existing prescriptions #38952
Fix existing prescriptions #38952
Conversation
Command used: grep -Rl metadata prescriptions/ | \ xargs -n 500 -P 16 -- yq -iy --indentless-lists \ ".units[][] |= (.metadata = .run.justification[0].metadata[0]? | del(.run.justification[0].metadata))" && \ git ch prescriptions/_containers/quay_security.yaml && \ git diff -U0 | grepdiff 'null' --output-matching=hunk | \ git apply -R --unidiff-zero && \ git diff -U0 | grepdiff 'metadata' --output-matching=hunk | \ git apply --cached --unidiff-zero
grep -Rl metadata prescriptions/ | \ xargs -n 500 -P 16 -- yq -iy --indentless-lists \ ".units[][] |= (.metadata = .run.release_notes.metadata[0]? | del(.run.release_notes.metadata))" && \ git ch prescriptions/_containers/quay_security.yaml && \ git diff -U0 | grepdiff 'null' --output-matching=hunk | \ git apply -R --unidiff-zero && \ git diff -U0 | grepdiff 'metadata' --output-matching=hunk | \ git apply --cached --unidiff-zero
7923a3b
to
31b616d
Compare
Fixed some other oddities in the last commit and confirmed : we have 264 scorecards prescriptions with no schema, which are currently by definition invalid. Proposed solution: Remove all of them temporarily, once we had validation support revert the removal commit. |
sounds good to me, pls create a tracker issue for the backlog so that we don't forget about adding them again... |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: goern The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Related Issues and Dependencies
part of thoth-station/adviser#2402
…
This introduces a breaking change
This should yield a new module release
This Pull Request implements
Thix fixes a bunch o files containing metadata in incorrect places
There is still 274 other invalid prescriptions files in the repo, which appears to be mostly scorecard prescriptions, (for which we have no schema in adviser). For example:
(if you want to test the validation : get latest master of adviser, merge thoth-station/adviser#2411 in your local branch, then run
pre-commit try-repo path/to/adviser/repo validate-prescriptions --verbose --all-files
in the prescription repo )@goern
What do we do with the scorecards prescriptions for now ?