cluster-api-provider-openstack
cluster-api-provider-openstack copied to clipboard
Add e2e test to cover region in providerID clusterv1 machine object
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:
- One cluster object with identityRef.Region field specified in OpenStackCluster
providerID-with-region-defaultand no identityRef specified in OpenStackMachineTemplate - One cluster object without identityRef.Region field specified in OpenstackCluster
providerID-with-region-overrideand 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
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.
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...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
/ok-to-test
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 ?
/unhold
Really good start, thanks for writing these tests! A few minor comments inline.
Hi, any feedback on this point ?
[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.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@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.
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.
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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: 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/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closedYou 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.