kubevirt / kubevirt-tekton-tasks

VM specific tasks for Tekton Pipelines
Apache License 2.0
31 stars 34 forks source link

test(CNV-43603): add disk-uploader functional tests #549

Open codingben opened 2 weeks ago

codingben commented 2 weeks ago

What this PR does / why we need it:

Deploy a new Cirros VM to export from, and run disk-uploader as Task to execute extraction process and upload it to the container registry.

Release note:

None
codingben commented 2 weeks ago

/cc @ksimon1 @akrejcir

codingben commented 2 weeks ago

@ksimon1 @0xFelix Can you please take a look?

codingben commented 2 weeks ago

@0xFelix @ksimon1 This revision adds the usage of libvmi and libdv.

CI or developer locally expected to set REGISTRY_IMAGE_DESTINATION, REGISTRY_ACCESS_KEY_ID and REGISTRY_SECRET_KEY environment variables.

codingben commented 2 weeks ago

@ksimon1 @0xFelix Currently there is a single test case: Extracts disk from VM and upload to container registry. Do you think we should also test scenarios of extracting it from VMSnapshot or PVC, or it's enough to have only VM? I don't want to end up re-testing and over-testing Export API.

codingben commented 2 weeks ago

@ksimon1 @0xFelix This revision will make e2e tests work, as tested locally it works now and image was pushed to the Quay container registry [1].

Can you please review?

[1] https://quay.io/repository/boukhano/e2e-tests-example-vm

codingben commented 2 weeks ago

@ksimon1 @0xFelix Currently there is a single test case: Extracts disk from VM and upload to container registry. Do you think we should also test scenarios of extracting it from VMSnapshot or PVC, or it's enough to have only VM? I don't want to end up re-testing and over-testing Export API.

@ksimon1 @0xFelix What is your opinion about it?

codingben commented 1 week ago

Functional tests locally passed, marked this PR as ready to trigger the CI tests.

codingben commented 1 week ago

e2e-tests job failed with this error:

+++ oc whoami --show-token
error: no token is currently in use for this session

I'll take a look and will push to resolve it.

codingben commented 1 week ago

@0xFelix @ksimon1 This revision will check if the containerDisk exists in the container registry. Can you please review?

codingben commented 1 week ago

From e2e-tests job logs:

++ IN_CLUSTER_IMAGE_REGISTRY=image-registry.openshift-image-registry.svc:5000/e2e-tests-41458/e2e-exported-disk:latest
+++ oc whoami
++ export IN_CLUSTER_REGISTRY_ACCESS_KEY_ID=system:admin
++ IN_CLUSTER_REGISTRY_ACCESS_KEY_ID=system:admin
+++ oc whoami -t
error: no token is currently in use for this session
++ export IN_CLUSTER_REGISTRY_SECRET_KEY=
++ IN_CLUSTER_REGISTRY_SECRET_KEY=

@ksimon1 @0xFelix Do you know how to resolve this issue? because locally I'm unable to reproduce it, as it works without an error.

codingben commented 1 week ago

@0xFelix @ksimon1 This revision will check if the containerDisk exists in the container registry. Can you please review?

Seems like this works only on Quay registry and won't work in OpenShfit because API is not the same [1].

[1] https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/image_apis/image-apis

codingben commented 1 week ago

@0xFelix @ksimon1 This revision will check if the containerDisk exists in the container registry. Can you please review?

Seems like this works only on Quay registry and won't work in OpenShfit because API is not the same [1].

[1] https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/image_apis/image-apis

This revision will resolve this issue and will check if the containerDisk was pushed successfully.

codingben commented 4 days ago

@ksimon1 I've resolved your comments in the previous revisions. Can you please take a look? functional tests passed locally.

codingben commented 3 days ago

@ksimon1 Rebased and there is a new revision to get back using a normal container registry (could be Quay).

This PR is ready to be merged and functional tests passed locally. I'm putting this PR on draft to disable CI until an external container registry credentials are set, @ksimon1 please advice where they can be configured?

codingben commented 2 days ago

This PR depends on https://github.com/openshift/release/pull/59236 currently.

codingben commented 2 days ago

/test e2e-tests

kubevirt-bot commented 2 days ago

@codingben: No presubmit jobs available for kubevirt/kubevirt-tekton-tasks@main

In response to [this](https://github.com/kubevirt/kubevirt-tekton-tasks/pull/549#issuecomment-2505438043): >/test e2e-tests Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
codingben commented 1 day ago

/test e2e-tests

kubevirt-bot commented 1 day ago

@codingben: No presubmit jobs available for kubevirt/kubevirt-tekton-tasks@main

In response to [this](https://github.com/kubevirt/kubevirt-tekton-tasks/pull/549#issuecomment-2505657006): >/test e2e-tests Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
codingben commented 1 day ago

Hi @ksimon1 @dhiller, I don't have an access to the Quay repository and credentials you've created and added to the OpenShift CI.

Can you please review them? because it failed on this error:

  2024/11/28 10:50:21 Error pushing image: GET https://quay.io/v2/auth?scope=repository%3Akubevirtci%2Ftekton-tasks%3Apush%2Cpull&service=quay.io: unexpected status code 429 Too Many Requests: Too many login attempts. 
  Please reset your Quay password and try again.
codingben commented 1 day ago

/test e2e-tests

kubevirt-bot commented 1 day ago

@codingben: No presubmit jobs available for kubevirt/kubevirt-tekton-tasks@main

In response to [this](https://github.com/kubevirt/kubevirt-tekton-tasks/pull/549#issuecomment-2505987236): >/test e2e-tests Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
codingben commented 1 day ago

/test win11-pipeline-example-test /test win10-pipeline-example-test

kubevirt-bot commented 1 day ago

@codingben: No presubmit jobs available for kubevirt/kubevirt-tekton-tasks@main

In response to [this](https://github.com/kubevirt/kubevirt-tekton-tasks/pull/549#issuecomment-2506201918): >/test win11-pipeline-example-test >/test win10-pipeline-example-test Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
ksimon1 commented 1 day ago

/approve /retest

kubevirt-bot commented 1 day ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ksimon1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubevirt/kubevirt-tekton-tasks/blob/main/OWNERS)~~ [ksimon1] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 1 day ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: codingben, ksimon1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubevirt/kubevirt-tekton-tasks/blob/main/OWNERS)~~ [ksimon1] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
kubevirt-bot commented 1 day ago

PR needs rebase.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.