Skip to content

🐛 fix: skip port deletion when instances have no port #1818

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

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

dulek
Copy link
Contributor

@dulek dulek commented Jan 10, 2024

What this PR does / why we need it:
This adds a condition in GarbageCollectErrorInstancesPort to avoid index outOfRange error when an instance has no port because of some reason (maybe the instance provisioning failed because of infra issue).

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1805

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • if necessary:
    • adds unit tests

/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 10, 2024
Copy link

netlify bot commented Jan 10, 2024

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

Name Link
🔨 Latest commit 626c359
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/659ec465844b310008aed413
😎 Deploy Preview https://deploy-preview-1818--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.

@dulek
Copy link
Contributor Author

dulek commented Jan 10, 2024

This is a replacement for #1794.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 10, 2024
@dulek dulek force-pushed the skip-port-delete-no-port branch from 294b2d3 to 626c359 Compare January 10, 2024 16:22
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 10, 2024
@dulek
Copy link
Contributor Author

dulek commented Jan 10, 2024

And I added a simple unit test covering this case too.

@EmilienM
Copy link
Contributor

/lgtm

Note, I'll port that to the port refactor.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 10, 2024
@EmilienM
Copy link
Contributor

well in fact I don't need to port that PR into #1788 because the ports management is now separated from instances.

@jichenjc
Copy link
Contributor

/approve

I seems saw similar PR for same purpose recently but can't find where it is ..
anyway, the PR lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dulek, jichenjc

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 11, 2024
@mdbooth
Copy link
Contributor

mdbooth commented Jan 11, 2024

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 11, 2024
@k8s-ci-robot k8s-ci-robot merged commit a384137 into kubernetes-sigs:main Jan 11, 2024
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: failed instances with no port breaks the whole CAPO controller
6 participants