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 a typo in the "matallb_auto_assign" variable name #8949

Merged

Conversation

orange-llajeanne
Copy link
Contributor

What type of PR is this?
/kind api-change

What this PR does / why we need it:
Fixes a typo in the variable setting the auto-assign param of metallb:
matallb_auto_assign => metallb_auto_assign

Special notes for your reviewer:

This is a breaking change for existing inventories using the matallb_auto_assign variable name. Should kubespray support both names and deprecate the previous one?

Does this PR introduce a user-facing change?:

[Metallb] Renamed `matallb_auto_assign` variable to `metallb_auto_assign` (action required: users disabling 'auto-assign' in metallb must update the variable name)

@k8s-ci-robot k8s-ci-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 9, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @orange-llajeanne. 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 9, 2022
Copy link
Contributor

@oomichi oomichi left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the wrong name.
The wrong name is used in long-term.
So it is better to have something to support it for the existing inventory, I feel.

/cc @oomichi

@@ -19,4 +19,4 @@ metallb_speaker_tolerations:
operator: Exists
metallb_controller_tolerations: []
metallb_pool_name: "loadbalanced"
matallb_auto_assign: true
metallb_auto_assign: true
Copy link
Contributor

Choose a reason for hiding this comment

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

To support old name in the existing inventory

Suggested change
metallb_auto_assign: true
metallb_auto_assign: >-
{%- if matallb_auto_assign is defined -%}
{{ matallb_auto_assign }}
{%- else -%}
true
{%- endif -%}

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if anyone is actually using the typo'ed variable name. Carrying some compatibility code due to a typo in the past seems like a lot of effort.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this kind of thing is always maintenance burden for developers.
At least, it would be necessary to take 1-2 versions for warning the option is renamed from the original one for users as the deprecation period.
Then we can remove the original one after that.

Copy link
Member

Choose a reason for hiding this comment

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

Well this can be discussed, but a warning in the release note might be enough, or we can add an ansible check and message indeed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated this PR with the solution proposed by @oomichi , but I can still modify it if this discussion ends up identifying another solution.

Copy link
Contributor

Choose a reason for hiding this comment

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

we can add an ansible check and message indeed

@floryut Thanks, that is a good idea for users I think.
@orange-llajeanne Could you update this pull request again based on

- name: Stop if legacy encapsulation variables are detected (ipip)
assert:
that:
- ipip is not defined
msg: "'ipip' configuration variable is deprecated, please configure your inventory with 'calico_ipip_mode' set to 'Always' or 'CrossSubnet' according to your specific needs"
run_once: True
delegate_to: "{{ groups['kube_control_plane'][0] }}"

as a reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the workaround in defaults/main.yml and added a check in metallb tasks, inspired from other checks from the same file

I think this should be ok now

@k8s-ci-robot k8s-ci-robot requested a review from oomichi June 9, 2022 15:51
@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 Jun 10, 2022
@orange-llajeanne orange-llajeanne force-pushed the metallb_auto_assign_typo branch from 4e3204a to b120ddb Compare June 13, 2022 08:16
@cristicalin
Copy link
Contributor

Looks good, thanks @orange-llajeanne

/approve
/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. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 13, 2022
Copy link
Member

@floryut floryut left a comment

Choose a reason for hiding this comment

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

/ok-to-test
@orange-llajeanne Fine by me now, thank you 👍

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cristicalin, floryut, orange-llajeanne

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:
  • OWNERS [cristicalin,floryut]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@floryut floryut added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Jun 13, 2022
@oomichi
Copy link
Contributor

oomichi commented Jun 13, 2022

Thanks for updating again!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 13, 2022
@k8s-ci-robot k8s-ci-robot merged commit 2fba94c into kubernetes-sigs:master Jun 13, 2022
fungusakafungus pushed a commit to fungusakafungus/kubespray that referenced this pull request Jul 13, 2022
…s#8949)

* fix a typo in the "matallb_auto_assign" variable name

* add metallb check to fail when deprecated "matallb_auto_assign" variable is defined
@floryut floryut mentioned this pull request Sep 19, 2022
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Jul 1, 2023
…s#8949)

* fix a typo in the "matallb_auto_assign" variable name

* add metallb check to fail when deprecated "matallb_auto_assign" variable is defined
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Oct 23, 2023
…s#8949)

* fix a typo in the "matallb_auto_assign" variable name

* add metallb check to fail when deprecated "matallb_auto_assign" variable is defined
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

5 participants