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

🐛 Fix ServerMetadata Not Applied to Bastion in OpenStackCluster #2179

Open
wants to merge 1 commit into
base: release-0.10
Choose a base branch
from

Conversation

namgon-kim
Copy link

  • Fixed issue where spec.bastion.spec.serverMetadata was not set in bastion.
  • Updated bastionToInstanceSpec to apply serverMetadata in InstanceSpec.

What this PR does / why we need it:
Fixes an issue where spec.bastion.spec.serverMetadata in OpenStackCluster was not applied as metadata to OpenStack instances. This change ensures that server metadata is set during bastion creation.

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 #2177

Special notes for your reviewer:

  1. Please check if any other parts of the repository require updates to serverMetadata outside of this change.

TODOs:

  • squashed commits

/hold

- Fixed issue where spec.bastion.spec.serverMetadata was not set in bastion.
- Updated bastionToInstanceSpec to apply serverMetadata in InstanceSpec.
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 26, 2024
Copy link

linux-foundation-easycla bot commented Sep 26, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Sep 26, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @namgon-kim!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-openstack 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-openstack has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 26, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @namgon-kim. 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
Copy link
Contributor

[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 mdbooth for approval. For more information see the Kubernetes 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 k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 26, 2024
Copy link

netlify bot commented Sep 26, 2024

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

Name Link
🔨 Latest commit 35a1444
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/66f4e6d31f776b00080c2621
😎 Deploy Preview https://deploy-preview-2179--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.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 26, 2024
@EmilienM
Copy link
Contributor

@mdbooth how did we deal with PRs only for stable releases?

The least minimum is to retitle it to mention that.
I'm not against the idea but this has a cost, for maintenance and future cherry-pick conflicts when doing backports on other things.

@mdbooth
Copy link
Contributor

mdbooth commented Sep 26, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 26, 2024
@EmilienM
Copy link
Contributor

The issue is fixed in main and is unreleased now:

https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/1e39a380a979c6b3ac9a182e25749eab83740ac5/controllers/openstackcluster_controller.go#L566C25-L566C66

ServerMetadata: openStackMachineSpec.ServerMetadata,

So I'm fine fixing it only stable branches.

@EmilienM
Copy link
Contributor

/test pull-cluster-api-provider-openstack-test

@mdbooth
Copy link
Contributor

mdbooth commented Sep 27, 2024

Looks like the linter broke in the stable branch :( How did that happen without making the tests fail?

@namgon-kim
Copy link
Author

/test pull-cluster-api-provider-openstack-test

@namgon-kim
Copy link
Author

/retest-required

@k8s-ci-robot
Copy link
Contributor

@namgon-kim: The following test 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-test 35a1444 link true /test pull-cluster-api-provider-openstack-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.

@namgon-kim
Copy link
Author

namgon-kim commented Oct 10, 2024

I’ve noticed that the tests are failing due to linter errors across the project. Is there any specific action I need to take to resolve this?

I ran the linter locally and got the following results:

$ make -C hack/tools bin/kustomize
$ make -C hack/tools bin/controller-gen
$ make -C hack/tools bin/conversion-gen
$ make -C hack/tools bin/mockgen
$ make -C hack/tools bin/gen-crd-api-reference-docs
$ make -C hack/tools bin/golangci-lint
$ hack/tools/bin/golangci-lint run -v --fast=false
INFO [config_reader] Config search paths: [./ /home/dev/workspaces/cluster-api-provider-openstack /home/dev/workspaces /home/dev /home /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 47 linters: [asasalint asciicheck bidichk bodyclose cyclop dogsled dupword durationcheck errcheck exportloopref forbidigo gci goconst gocritic gocyclo godot gofmt gofumpt goheader goimports gomodguard goprintffuncname gosec gosimple govet importas ineffassign makezero misspell nakedret nestif nilerr noctx nolintlint prealloc predeclared revive rowserrcheck sqlclosecheck staticcheck stylecheck thelper unconvert unparam unused wastedassign whitespace] 
INFO [loader] Using build tags: [e2e]             
INFO [loader] Go packages loading at mode 575 (deps|files|imports|types_sizes|compiled_files|exports_file|name) took 4.045486744s 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 27.733474ms 
INFO [linters_context/goanalysis] analyzers took 0s with no stages 
INFO [runner] Issues before processing: 1047, after processing: 0 
INFO [runner] Processors filtering stat (out/in): cgo: 1047/1047, autogenerated_exclude: 816/816, nolint: 0/18, filename_unadjuster: 1047/1047, path_prettifier: 1047/1047, skip_files: 816/1047, exclude: 816/816, exclude-rules: 18/816, skip_dirs: 816/816, identifier_marker: 816/816 
INFO [runner] processing took 70.727961ms with stages: exclude-rules: 35.551671ms, identifier_marker: 19.235856ms, nolint: 5.942609ms, path_prettifier: 4.489669ms, autogenerated_exclude: 4.091699ms, skip_dirs: 785.717µs, skip_files: 391.232µs, cgo: 151.051µs, filename_unadjuster: 84.952µs, max_same_issues: 1.006µs, fixer: 342ns, exclude: 319ns, sort_results: 282ns, uniq_by_line: 277ns, diff: 264ns, severity-rules: 217ns, max_from_linter: 199ns, path_prefixer: 172ns, source_code: 166ns, path_shortener: 139ns, max_per_file_from_linter: 122ns 
INFO [runner] linters took 2.92052316s with stages: goanalysis_metalinter: 2.849671785s 
INFO File cache stats: 80 entries of total size 675.0KiB 
INFO Memory: 71 samples, avg is 50.0MB, max is 105.6MB 
INFO Execution took 7.00053684s

@EmilienM @mdbooth
could you please advise on how to proceed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
Status: Inbox
Development

Successfully merging this pull request may close these issues.

4 participants