-
Notifications
You must be signed in to change notification settings - Fork 239
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
add GitHub action that use Testing Farm #4320
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: 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 |
44eb1cf
to
bd41140
Compare
.github/workflows/linux-qe.yml
Outdated
path: | | ||
**/*.xml | ||
**/*.results | ||
**/*.log |
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.
After reserve, there is no need for decommission the testing farm machine (the target one for arm I mean)
I need to log in to the self-host runner to do some debug. So need to add my ssh public key into the github self-host runner from the testing farm. Waitting for https://gitlab.com/testing-farm/infrastructure/-/merge_requests/698 to be merged now. |
@adrianriobo Hi, I'm debugging run crc tests with machine from TestingFarm. The issue is, we can only use the self-host runner(also from TestingFarm) to provision and connect to the arm64 machine from TestingFarm. That means we can't connect to the machine with a container(deliverset image). So I think we can't use the container method to run crc tests with Testing Farm. |
with: | ||
name: linux-binary | ||
path: "out/linux-arm64/crc" | ||
build-qe: |
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.
I would prefer not having this specific flow. Currently we have the [Build Windows artifacts] where windows bits are built and also the qe images, may we can rename it to just builder and add there the linux builds.
Take into account if Linux bits are already build / check in some other flow remove it from there. The goal should be build only once.... otherwise if in future the build process requires something else on any element we need to be aware they are being built in several places with several goals.
.github/workflows/linux-qe.yml
Outdated
|
||
on: | ||
workflow_run: | ||
workflows: [Build Windows artifacts] |
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.
THis is aligned with previous comment if you create the unified builder flow this should be triggered for the new builder flow
.github/workflows/linux-qe.yml
Outdated
|
||
jobs: | ||
tests: | ||
runs-on: [self-hosted, linux, testing-farm] |
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.
Similar to ci-definitions for crc-builder we want to ensure the previous flow has been completed and it is successful https://github.com/crc-org/ci-definitions/blob/7cb907719aef4898ef4eb0ec02d9124f5212d9d4/.github/workflows/crc-builder-pusher.yml#L12
.github/workflows/linux-qe.yml
Outdated
go: ['1.21'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go |
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.
Why do we need go here? all components should be picked from as artifacts
.github/workflows/linux-qe.yml
Outdated
cd ${{ env.commit_sha }} | ||
|
||
#timestamp=`date %s` | ||
#mkdir $timestamp |
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.
Can we clean comments (unused lines)
.github/workflows/linux-qe.yml
Outdated
|
||
- name: prepare env | ||
run: | | ||
sudo yum install podman openssh-server git make -y |
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.
Do we need git and make for any reason?
.github/workflows/linux-qe.yml
Outdated
echo $SSH_AGENT_PID > ssh_agent_pid | ||
#kill $(cat ssh_agent_pid) | ||
ssh-add id_rsa | ||
|
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.
We will need api invoke to add this as check for the PR
crc/.github/workflows/windows-qe-tpl.yml
Line 84 in 0342835
- name: Add status to the PR check |
.github/workflows/linux-qe.yml
Outdated
# run | ||
cmd="crc-qe/run.sh -junitFilename crc-e2e-junit.xml -targetFolder crc-qe" | ||
cmd_microshift="${cmd} -e2eTagExpression '@story_microshift'" | ||
cmd_openshift="${cmd} -e2eTagExpression '~@minimal && ~@story_microshift'" |
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.
Here you created both microshift and openshift diffferent commands.... but you are only running the openshift .. do we have any restriction on the number of machines we can provision? otherwise may you could create a tpl similar to this https://github.com/crc-org/crc/blob/main/.github/workflows/windows-qe-tpl.yml which would be executed on the self hosted runner the template typically provision a machine install crc run e2e and communicate with gh api to add checks on the PR.
With this approach you can run both in parallel each of them on a machine
.github/workflows/linux-qe.yml
Outdated
**/*.xml | ||
**/*.results | ||
**/*.log | ||
|
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.
It is not required to decommission the provisioned machine? May not but I guess it would be a good practice to reduce cost on their end?
@lilyLuLiu: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
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.
In general LGTM although I would prefer to tackle the comments. Although I am also fine if you want to have it in ASAP and the create a follow up one to fix the comments.
@@ -40,6 40,14 @@ jobs: | |||
with: | |||
name: windows-installer | |||
path: "./out/windows-amd64/crc-windows-installer.zip" | |||
- name: Build Linux binary |
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.
Can you create a follow up issue on this one, about to renaming this action (as now it also includes linux build, it would be great to properly name it).
Also ensure linux build is only done in one place
- completed | ||
|
||
jobs: | ||
linux-e2e-ocp: |
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.
why linux-e2e-ocp? may better linux-qe
as it includes integration, e2e and microshift no?
-e SSH_AUTH_SOCK=$(cat ssh_auth_sock) \ | ||
-v "$(cat ssh_auth_sock):$(cat ssh_auth_sock)" \ | ||
-v ${PWD}:/data:z \ | ||
quay.io/rhqp/crc-support:v0.5.1-linux return2testingfarm |
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.
What is this?
This is how the target is decommissioned? so you have to run it from inside the target 🤔
Tough if this is the reason Can you change the name of the step to make it clear? Or consider adding some comments on it to help others out to better understand the step.
echo "commit_sha=${commit_sha}" >> "$GITHUB_ENV" | ||
mkdir ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}} | ||
cd ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}} | ||
|
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.
May consider add some comments in here to explain why we need the socket strategy on the target..i.e. the target can only be accessed through a bastion (which can only be accessed from self-hosted runner) as so we need to map the ssh-agent from the host to the containers used to access the target host
-v "$(cat ssh_auth_sock):$(cat ssh_auth_sock)" \ | ||
-v ${PWD}:/data:z \ | ||
-v ${PWD}/crc:/opt/crc-support/crc:z \ | ||
quay.io/rhqp/crc-support:v0.5.1-linux crc-support/install.sh crc-support/crc |
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.
quay.io/crc-org/ci-crc-support:v1.0.0-linux
Is now available. If possible change to this as from now on it should be the "official" one.
Let me do a check on using it directly with crc
as a local asset. And will add here the snippet to make use of it here.
#4326