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

add GitHub action that use Testing Farm #4320

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lilyLuLiu
Copy link
Contributor

@lilyLuLiu lilyLuLiu commented Aug 19, 2024

Copy link

openshift-ci bot commented Aug 19, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

openshift-ci bot commented Aug 19, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign evidolob for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot requested a review from gbraad September 5, 2024 03:51
.github/workflows/linux-qe.yml Outdated Show resolved Hide resolved
.github/workflows/linux-qe.yml Outdated Show resolved Hide resolved
path: |
**/*.xml
**/*.results
**/*.log
Copy link
Contributor

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)

@lilyLuLiu
Copy link
Contributor Author

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.

@lilyLuLiu
Copy link
Contributor Author

lilyLuLiu commented Oct 22, 2024

@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).
When provision a TestingFarm machine, the ssh public key of proxy will be added into the runner, thus the runner can connect to the reserved machine through proxy.

So I think we can't use the container method to run crc tests with Testing Farm.
Do we move to other test way?

with:
name: linux-binary
path: "out/linux-arm64/crc"
build-qe:
Copy link
Contributor

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.


on:
workflow_run:
workflows: [Build Windows artifacts]
Copy link
Contributor

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


jobs:
tests:
runs-on: [self-hosted, linux, testing-farm]
Copy link
Contributor

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

go: ['1.21']
steps:
- uses: actions/checkout@v4
- name: Set up Go
Copy link
Contributor

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

cd ${{ env.commit_sha }}

#timestamp=`date %s`
#mkdir $timestamp
Copy link
Contributor

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)


- name: prepare env
run: |
sudo yum install podman openssh-server git make -y
Copy link
Contributor

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?

echo $SSH_AGENT_PID > ssh_agent_pid
#kill $(cat ssh_agent_pid)
ssh-add id_rsa

Copy link
Contributor

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

- name: Add status to the PR check
this previously need to correlate the execution https://github.com/crc-org/crc/blob/main/.github/workflows/windows-qe-tpl.yml#L61

# 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'"
Copy link
Contributor

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

**/*.xml
**/*.results
**/*.log

Copy link
Contributor

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?

Copy link

openshift-ci bot commented Nov 4, 2024

@lilyLuLiu: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/integration-crc f6105d1 link true /test integration-crc
ci/prow/e2e-crc f6105d1 link true /test e2e-crc

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.

Copy link
Contributor

@adrianriobo adrianriobo left a 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
Copy link
Contributor

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:
Copy link
Contributor

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
Copy link
Contributor

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}}

Copy link
Contributor

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants