Skip to content
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

kata-deploy: improving the runtimeclasses checker and documentation #9822

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

wainersm
Copy link
Contributor

While working on PR #9807 it was a little of a pain to pass the static checker for the runtimeClasses that kata-deploy deploys on the cluster. I realized that it wasn't the first time I had the same difficult to pass CI, likely because I wasn't able to run the checker locally. So here I am sending some improvements to allow devs to run the checker locally before submitting a PR. In particular, the LC_ALL=C trick was hurting my tentative to get the checker passing.

Taking that opportunity to also document how to add a new runtimeClass to kata-deploy.

@wainersm wainersm added area/ci Issues affecting the continuous integration area/kata-deploy Impacts the kata-deploy script labels Jun 11, 2024
@wainersm wainersm requested a review from fidencio June 11, 2024 18:57
@katacontainersbot katacontainersbot added the size/large Task of significant size label Jun 11, 2024
@wainersm wainersm force-pushed the kata-deploy-runtimeclasses-checker branch from 0fa3ddd to 1c7e11a Compare June 11, 2024 20:16
@wainersm
Copy link
Contributor Author

Tentatively making spell and commit checkers happy.

Copy link
Member

@beraldoleal beraldoleal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very welcome @wainersm thanks.

Just a nit pic suggestion for you.

cat kata-runtimeClasses.yaml
echo "::endgroup::"
echo ""
diff resultingRuntimeClasses.yaml kata-runtimeClasses.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amen!! +100 for removing scripts from yaml files \o/

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

name: Static checks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iiuc, since this is the name of the workflow, my suggestion would be to move to line 1.

Created the tools/packaging/kata-deploy/local-build/check-runtimeclasses.sh
script and adjusted the worfklow to call it. This way developers can run
the checker locally more easily.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
As is, check-runtimeclasses.sh behavior is unexpected because the
`sort` command relies on LC_ALL. For example, in some environment
it can sort "kata-qemu-se.yaml kata-qemu-sev.yaml" and in other
"kata-qemu-sev.yaml "kata-qemu-se.yaml".

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
To allow running the checker many times on same environment and providing
a more user-friendly results.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This workflow is meant to check changes in
tools/packaging/kata-deploy/runtimeclasses so let's not run on every and each
PR.

While here, it was gave a name to the job so that on UI it will show up as
'Static checks / kata-deploy-runtime-classes-check' similarly to other
static checks (e.g. 'Static checks / check-kernel-config-version').

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Created a `Development` section in kata-deploy's README and documented
the process to add a new runtimeClass.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
The spell-checker was complaining about `runtimeClass` word.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
@wainersm wainersm force-pushed the kata-deploy-runtimeclasses-checker branch from 1c7e11a to 188adca Compare June 13, 2024 18:03
@wainersm
Copy link
Contributor Author

Updated to address @beraldoleal 's suggestion; now the job's name is on first line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Issues affecting the continuous integration area/kata-deploy Impacts the kata-deploy script size/large Task of significant size
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants