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

Document a breaking change in the default configuration #1303

Closed

Conversation

roycaihw
Copy link
Member

xref: #1284, OpenAPITools/openapi-generator#4485, OpenAPITools/openapi-generator#5315

Document a breaking change of kubernetes.config.Configuration() that exists since v12.0.0a1. Add a unit test that asserts the behavior.

Special notes:

  1. The upstream change fixed a bug in different configuration objects unexpectedly sharing a common dict, but it broke the use case where people use Configuration() to easily access one global configuration.
  2. Not sure if the test folder gets wiped when we regenerate the client. If so, we may need to carry a patch, or find another place to host it.
  3. I looked at python-base and found the only place we use Configuration() is _refresh_oidc. The client doesn't rely on the default configuration.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 30, 2020
CHANGELOG.md Outdated
@@ -24,6 +24,9 @@ Kubernetes API Version: 1.16.14

Kubernetes API Version: 1.16.14

**Breaking Change:**
- `kubernetes.config.Configuration()` no longer returns the default configuration. Use `kubernetes.config.Configuration.get_default_copy()` now to get the default configuration. [OpenAPITools/openapi-generator#4485](https://github.com/OpenAPITools/openapi-generator/pull/4485), [OpenAPITools/openapi-generator#5315](https://github.com/OpenAPITools/openapi-generator/pull/5315)
Copy link
Contributor

Choose a reason for hiding this comment

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

it's a bit confusing ...

kubernetes.config.Configuration() still returns the default "initial" configuration,
kubernetes.config.Configuration.get_default_copy() will return the default configuration if there is a default set via Configuration.set_default(c), otherwise, it will also return the default "initial" configuration

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated. I reworded it a little bit, since the change in kubernetes.config.Configuration() was the regression.

@yliaog
Copy link
Contributor

yliaog commented Nov 2, 2020

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 2, 2020
@palnabarun
Copy link
Member

palnabarun commented Nov 2, 2020

I was wondering if we should do this as a minor release since changelog and releases are usually immutable.

/hold
(just for resolving the above doubt, the change looks good to me 👍🏽)

@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 Nov 2, 2020
@roycaihw
Copy link
Member Author

roycaihw commented Nov 3, 2020

@palnabarun Yes, I think that will help raise awareness. Would you mind fold the change to #1285, and add an action required note in 12.0.1?

@palnabarun
Copy link
Member

Yeah sure. Let me cherry-pick your commit and apply there.

@palnabarun
Copy link
Member

palnabarun commented Nov 3, 2020

@roycaihw Can you please split your changes to the CHANGELOG and tests into two commits? I want to preserve attribution when I edit those. :)

@palnabarun
Copy link
Member

The test addition also requires adding a note to the Hot Patch section to the release docs.

We need to specify that the commit which adds the test needs to be cherrypicked while performing the release.

@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 4, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roycaihw, yliaog

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

@roycaihw
Copy link
Member Author

roycaihw commented Nov 4, 2020

@palnabarun Thanks. I split the commit into two

@palnabarun
Copy link
Member

@roycaihw -- I have cherry picked both changes to the Release 12.0.1 PR. #1285

@roycaihw
Copy link
Member Author

roycaihw commented Nov 9, 2020

/close

in favor of #1285

@k8s-ci-robot
Copy link
Contributor

@roycaihw: Closed this PR.

In response to this:

/close

in favor of #1285

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.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants