-
Notifications
You must be signed in to change notification settings - Fork 438
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
chore: added hack/verify-reports.sh script #3167
base: main
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mlavacca The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-gateway-api-verify |
/test pull-gateway-api-verify |
982dcaa
to
5bbaf47
Compare
b5a9d82
to
2a10efc
Compare
Signed-off-by: Mattia Lavacca <[email protected]>
The CI job is intended to fail until #3168 does not get merged |
That PR merged, this one may also need a rebase, we'll see. /retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mlavacca!
local mode=$(yq eval '.mode' "$report") | ||
local version_pattern="^v?[0-9]+\.[0-9]+(\.[0-9]+)?$" | ||
|
||
if [[ ! $version =~ $version_pattern ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not every implementation is going to have a semantic version, I don't think we can require this check.
error "$report version does not match the semver pattern" | ||
EXIT_VALUE=1 | ||
fi | ||
if [[ ${gateway_api_version} != ${expected_gateway_api_version} ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we expect reports to be stored for patch versions?
# Check if the README.md has broken links | ||
docker run -v $(readlink -f "$implementation_dir"):/${implementation}:ro --rm -i ghcr.io/tcort/markdown-link-check:stable /${implementation}/README.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Indentation looks a bit funky here
# Check if the README.md has broken links | ||
docker run -v $(readlink -f "$implementation_dir"):/${implementation}:ro --rm -i ghcr.io/tcort/markdown-link-check:stable /${implementation}/README.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this utility work? Can/should we use this for all of our docs? I think some of our links are only valid with mkdocs-material context, would that be able to understand this?
What type of PR is this?
/area conformance
What this PR does / why we need it:
Recently, many submitted reports were not compliant with the rules stated in this document. This PR aims to create a script to automatically check the correctness of the uploaded reports and the structure. The following are the checks performed:
<experimental | standard>-<semver>-<mode>-report.yaml
version
is a valid semverGatewayAPIVersion
field matches the folder in which the report has been createdGatewayAPIChannel
is either "standard" or "experimental"Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: