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

GHA: Put all the preliminary steps into pre-action for s390x #8649

Merged
merged 1 commit into from Dec 14, 2023

Conversation

BbolroC
Copy link
Member

@BbolroC BbolroC commented Dec 13, 2023

This is to introduce a pre-action to all the workflows for building artifacts. The action could take care of tasks such as cleaning up files and reinstalling packages, which prevents a workflow from getting affected by the environment.

This also includes the removal of the step Adjust a permission for repo, because it could be incorporated into the action.

Fixes: #8648

Signed-off-by: Hyounggyu Choi Hyounggyu.Choi@ibm.com

Copy link
Contributor

@Amulyam24 Amulyam24 left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks @BbolroC!

@BbolroC
Copy link
Member Author

BbolroC commented Dec 13, 2023

/test

Copy link
Member

@stevenhorsman stevenhorsman left a comment

Choose a reason for hiding this comment

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

Hey @BbolroC - this LGTM. For reference, is the pre_action script, or a summary of the steps that it does available anywhere? I'm thinking that it would be useful to anyone else adding a self-hosted runner to set what things are done in it. I'm not sure the best place to share it though except maybe a list of the steps it does in this commit message?

@BbolroC
Copy link
Member Author

BbolroC commented Dec 13, 2023

Hey @BbolroC - this LGTM. For reference, is the pre_action script, or a summary of the steps that it does available anywhere? I'm thinking that it would be useful to anyone else adding a self-hosted runner to set what things are done in it. I'm not sure the best place to share it though except maybe a list of the steps it does in this commit message?

They are located in an internal repo for building a self-hosted runner for s390x (ansible-playbook). You can see what is going on in those steps from log for the workflow steps like:

  1. Pre-action
Run ${HOME}/script/pre_action.sh ubuntu-2204
Take a pre-action for ubuntu 20.04
Take a pre-action for ubuntu in common
Change the ownership of the workspace
Check if a configuration directory for docker exists
Uninstall k3s if it is installed
Clean up containerd devmapper snapshotter if it is deployed
Re-install docker.io if podman-docker is installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
  1. Post-action
Run bash tests/integration/kubernetes/gha-run.sh cleanup-zvsi || true
Gather information about the nodes and pods before cleaning up the node
Creating debugging pod node-debugger-kata-gha-runner-builder-01-xzzpc with container debugger on node kata-gha-runner-builder-01.
Unable to use a TTY - input is not a terminal or the right kind of file
If you don't see a command prompt, try pressing enter.
warning: couldn't attach to pod/node-debugger-kata-gha-runner-builder-01-xzzpc, falling back to streaming logs: 
exec /usr/bin/debug.sh: exec format error
pod "node-debugger-kata-gha-runner-builder-01-xzzpc" deleted
Context "default" modified.
Error from server (NotFound): namespaces "kata-containers-k8s-tests" not found
Take a post-action for ubuntu [22](https://github.com/kata-containers/kata-containers/actions/runs/7194633825/job/19595789928#step:10:23).04
Clean up the files
Clean up the processes
Clean up the mounts
Clean up the crio state
Uninstall k3s
... logs ...
Remove kubectl

If necessary, I could place set -x in the script for better visibility. Thanks!

@stevenhorsman
Copy link
Member

You can see what is going on in those steps from log for the workflow steps like

Great point - I didn't think of that. I think that is good enough - thanks!

This is to introduce a pre-action to all the workflows for building artifacts.
The action could take care of tasks such as cleaning up files and reinstalling
packages, which prevents a workflow from getting affected by the environment.

This also includes the removal of the step `Adjust a permission for repo`,
because it could be incorporated into the action.

Fixes: kata-containers#8648

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
@BbolroC
Copy link
Member Author

BbolroC commented Dec 13, 2023

/test

@BbolroC BbolroC merged commit fbc0446 into kata-containers:main Dec 14, 2023
171 of 176 checks passed
@BbolroC BbolroC deleted the put-pre-action-gha-s390x branch December 14, 2023 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test size/small Small and simple task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GHA: failing workflows for s390x affected by previous ones
5 participants