cluster-api-provider-openstack icon indicating copy to clipboard operation
cluster-api-provider-openstack copied to clipboard

Add e2e test to cover region in providerID clusterv1 machine object

Open MatthieuFin opened this issue 1 year ago • 12 comments

What this PR does / why we need it: Add E2E test to cover region in providerID clusterv1 machine object introduced in issue https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/2183 and PR https://github.com/kubernetes-sigs/cluster-api-provider-openstack/pull/2193

Special notes for your reviewer:

I have write 2 test cases:

  1. One cluster object with identityRef.Region field specified in OpenStackCluster providerID-with-region-default and no identityRef specified in OpenStackMachineTemplate
  2. One cluster object without identityRef.Region field specified in OpenstackCluster providerID-with-region-override and identityRef.Region specified in OpenStackMachineTemplate.

I uncounter an error on test case number 1, region name missing from clusterv1.Machine providerID string. That why I add a 2nd commit to fix that usecase and keep behavior of identityRef herited from Cluster Object.

It seems to do the job but it is "semantically" not really fair because I mutate object openStackMachine to append Cluster idenityRef if openStackMachine one's is nil, but this object goal of life is to mirror reality so that's technically a hack should I append a parameter to reconcileMachineState function to pass cluster object or cluster's identityRef object ?

/hold

MatthieuFin avatar Oct 28 '24 21:10 MatthieuFin

Hi @MatthieuFin. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

k8s-ci-robot avatar Oct 28 '24 21:10 k8s-ci-robot

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
Latest commit aa9c17946e1ee3500da45e4bb5b94b4f24d8e96a
Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/6787d899f02cea0008739707
Deploy Preview https://deploy-preview-2210--kubernetes-sigs-cluster-api-openstack.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 28 '24 21:10 netlify[bot]

/ok-to-test

mdbooth avatar Oct 28 '24 22:10 mdbooth

Outch, I thinked that CAPO_REGION env variable will be set by https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/templates/env.rc#L89 but it seems not, personally I run tests by setting my own CAPO_REGION variable with my region name. How could I retrieve CI region name to feed CAPO_REGION env variable ?

MatthieuFin avatar Oct 29 '24 09:10 MatthieuFin

/unhold

MatthieuFin avatar Oct 29 '24 16:10 MatthieuFin

Really good start, thanks for writing these tests! A few minor comments inline.

EmilienM avatar Oct 29 '24 18:10 EmilienM

Hi, any feedback on this point ?

MatthieuFin avatar Nov 26 '24 16:11 MatthieuFin

[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 justinsb for approval. For more information see the 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

k8s-ci-robot avatar Jan 15 '25 15:01 k8s-ci-robot

@MatthieuFin: 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
pull-cluster-api-provider-openstack-build aa9c17946e1ee3500da45e4bb5b94b4f24d8e96a link true /test pull-cluster-api-provider-openstack-build
pull-cluster-api-provider-openstack-test aa9c17946e1ee3500da45e4bb5b94b4f24d8e96a link true /test pull-cluster-api-provider-openstack-test
pull-cluster-api-provider-openstack-e2e-test aa9c17946e1ee3500da45e4bb5b94b4f24d8e96a link true /test pull-cluster-api-provider-openstack-e2e-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

k8s-ci-robot avatar Jan 15 '25 16:01 k8s-ci-robot

PR needs rebase.

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.

k8s-ci-robot avatar Feb 01 '25 00:02 k8s-ci-robot

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar May 02 '25 00:05 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jun 01 '25 01:06 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Jul 01 '25 02:07 k8s-triage-robot

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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.

k8s-ci-robot avatar Jul 01 '25 02:07 k8s-ci-robot