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

MGMT-8357: Deploy assisted-service for e2e tests in Kind #2473

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

danmanor
Copy link
Contributor

@danmanor danmanor commented Jun 16, 2024

After openshift/assisted-service#6664 is merged, most of assisted installer ecosystem deployment scripts will be part of assisted-service repository. This PR uses these scripts instead of duplicating code. In addition, it enables kind deployment in this repository alongside existing minikube option

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 16, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 16, 2024

@danmanor: This pull request references MGMT-8357 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.17.0" version, but no target version was set.

In response to this:

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 16, 2024
Copy link

openshift-ci bot commented Jun 16, 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 Jun 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danmanor

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:

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 added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 16, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 16, 2024

@danmanor: This pull request references MGMT-8357 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.17.0" version, but no target version was set.

In response to this:

Waiting for - openshift/assisted-service#6385

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 17, 2024
@danmanor danmanor changed the title WIP: MGMT-8357: Deploy assisted-service for e2e tests in Kind MGMT-8357: Deploy assisted-service for e2e tests in Kind Jun 18, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 18, 2024

@danmanor: This pull request references MGMT-8357 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.17.0" version, but no target version was set.

In response to this:

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 openshift-eng/jira-lifecycle-plugin repository.

@danmanor danmanor changed the title MGMT-8357: Deploy assisted-service for e2e tests in Kind WIP: MGMT-8357: Deploy assisted-service for e2e tests in Kind Jun 18, 2024
@danmanor danmanor marked this pull request as ready for review June 18, 2024 17:51
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 18, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 18, 2024

@danmanor: This pull request references MGMT-8357 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.17.0" version, but no target version was set.

In response to this:

Use Kind to deploy assisted-service and its components in e2e tests locally and in the CI

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 18, 2024

@danmanor: This pull request references MGMT-8357 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.17.0" version, but no target version was set.

In response to this:

Use Kind to deploy assisted-service and its components in e2e tests locally and in the CI instead of Minikube

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from avishayt and eranco74 June 18, 2024 17:56
@danmanor
Copy link
Contributor Author

/cc @rccrdpccl

@openshift-ci openshift-ci bot requested a review from rccrdpccl June 18, 2024 17:57
@danmanor
Copy link
Contributor Author

/cc @eliorerz

@openshift-ci openshift-ci bot requested a review from eliorerz June 18, 2024 17:58
@danmanor
Copy link
Contributor Author

/retest

@danmanor
Copy link
Contributor Author

/uncc @eliorerz @avishayt @rccrdpccl @eranco74

@danmanor
Copy link
Contributor Author

/test e2e-metal-assisted-none e2e-metal-assisted-external

@danmanor
Copy link
Contributor Author

/retest

1 similar comment
@danmanor
Copy link
Contributor Author

/retest

@danmanor
Copy link
Contributor Author

/cc @eifrach

@openshift-ci openshift-ci bot requested a review from eifrach August 15, 2024 16:07
@danmanor
Copy link
Contributor Author

/cc @eliorerz

@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 19, 2024

@danmanor: This pull request references MGMT-8357 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.18.0" version, but no target version was set.

In response to this:

Use Kind to deploy assisted-service and its components in e2e tests locally and in the CI instead of Minikube

depends on - openshift/assisted-service#6664

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 openshift-eng/jira-lifecycle-plugin repository.

@danmanor
Copy link
Contributor Author

/override ci/prow/e2e-metal-assisted-kube-api-late-binding-single-node

Copy link

openshift-ci bot commented Aug 21, 2024

@danmanor: Overrode contexts on behalf of danmanor: ci/prow/e2e-metal-assisted-kube-api-late-binding-single-node

In response to this:

/override ci/prow/e2e-metal-assisted-kube-api-late-binding-single-node

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.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 22, 2024

@danmanor: This pull request references MGMT-8357 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.18.0" version, but no target version was set.

In response to this:

Use Kind to deploy assisted-service and its components in e2e tests locally and in the CI instead of Minikube
After openshift/assisted-service#6664 is merged, most of assisted installer ecosystem deployment scripts will be part of assisted-service repository. This PR uses these scripts instead of duplicating code. In addition, it enables kind deployment in this repository alongside existing minikube option

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 openshift-eng/jira-lifecycle-plugin repository.

Comment on lines +37 to +42
make bring_assisted_service
assisted-service/hack/kind/kind.sh install
echo "Done installing kind"

echo "Installing minikube"
scripts/hub-cluster/minikube.sh install
assisted-service/hack/minikube/minikube.sh install
Copy link
Contributor

Choose a reason for hiding this comment

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

we are installing both kind and minikube ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because we want to support both, and the deployment choice is happening during deployment stage using DEPLOY_TARGET, while the installations are happening before during setup

Copy link
Contributor

Choose a reason for hiding this comment

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

There are a few things I don't like here

  1. I don't see the DEPLOY_TARGET used here so it will install both which is not needed
  2. This function is relaying on Assisted service repo. This has a few problem
  • changes in assisted service repo can break this repo.
  • we can get dependencies issues between them and need to override the test like happens in Prow
  • test-infra should be the "testing infra" of assisted but it relies on script in assisted - that shouldn't be. test infra need to be independent
  • can be complex / issues with testing different branches

if we want to create a share resources / libraries and or tools we should move it to a different location
and create them as generically as can be.

I know that it has been this way for sometime but - I don't think we should add this here.

let's talk off line about this.

@danmanor danmanor force-pushed the kind-e2e branch 2 times, most recently from c240399 to ce34caa Compare August 22, 2024 08:51
Makefile Show resolved Hide resolved
Makefile Show resolved Hide resolved
Comment on lines +37 to +42
make bring_assisted_service
assisted-service/hack/kind/kind.sh install
echo "Done installing kind"

echo "Installing minikube"
scripts/hub-cluster/minikube.sh install
assisted-service/hack/minikube/minikube.sh install
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a few things I don't like here

  1. I don't see the DEPLOY_TARGET used here so it will install both which is not needed
  2. This function is relaying on Assisted service repo. This has a few problem
  • changes in assisted service repo can break this repo.
  • we can get dependencies issues between them and need to override the test like happens in Prow
  • test-infra should be the "testing infra" of assisted but it relies on script in assisted - that shouldn't be. test infra need to be independent
  • can be complex / issues with testing different branches

if we want to create a share resources / libraries and or tools we should move it to a different location
and create them as generically as can be.

I know that it has been this way for sometime but - I don't think we should add this here.

let's talk off line about this.

scripts/utils.sh Show resolved Hide resolved
scripts/utils.sh Outdated Show resolved Hide resolved
src/assisted_test_infra/test_infra/utils/utils.py Outdated Show resolved Hide resolved
Comment on lines 238 to 239
if deploy_target == "onprem":
assisted_hostname_or_ip = os.environ["ASSISTED_SERVICE_HOST"]
return f"http://{assisted_hostname_or_ip}:8090"
Copy link
Contributor

Choose a reason for hiding this comment

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

this check should come before checking the IP address line 236

src/assisted_test_infra/test_infra/utils/utils.py Outdated Show resolved Hide resolved

delete_hub_cluster:
scripts/hub-cluster/delete.sh
(cd assisted-service && TARGET=${DEPLOY_TARGET} ROOT_DIR=${ROOT_DIR}/assisted-service hack/hub_cluster.sh delete)
Copy link
Contributor

Choose a reason for hiding this comment

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

same refering to external resource which we are testing

@@ -147,10 +148,10 @@ image_build: bring_assisted_service generate_python_client
$(CONTAINER_COMMAND) tag $(IMAGE_NAME) test-infra:latest # For backwards computability

create_hub_cluster:
scripts/hub-cluster/create.sh
TARGET=${DEPLOY_TARGET} assisted-service/hack/hub_cluster.sh create
Copy link
Contributor

Choose a reason for hiding this comment

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

same refering to external resource which we are testing

@danmanor
Copy link
Contributor Author

/override ci/prow/e2e-metal-assisted-kube-api-late-binding-single-node

Copy link

openshift-ci bot commented Aug 22, 2024

@danmanor: Overrode contexts on behalf of danmanor: ci/prow/e2e-metal-assisted-kube-api-late-binding-single-node

In response to this:

/override ci/prow/e2e-metal-assisted-kube-api-late-binding-single-node

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.

@danmanor
Copy link
Contributor Author

/test e2e-metal-single-node-live-iso

@eifrach
Copy link
Contributor

eifrach commented Aug 26, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2024
@danmanor
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 27, 2024
Copy link

openshift-ci bot commented Aug 27, 2024

@danmanor: all tests passed!

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 00c6a3b into openshift:master Aug 27, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants