Fix no_proxy reset in configuration.py
What type of PR is this?
/kind bug
What this PR does / why we need it:
Currently, self.no_proxy is explicitly reset to None after being populated from environment variables (NO_PROXY or no_proxy). This effectively discards the loaded values and prevents no_proxy from being respected when configuring the client.
This commit removes the redundant assignment to None, ensuring that the no_proxy environment variable is preserved and proxy bypass settings are applied as expected.
Which issue(s) this PR fixes:
No issue has been opened yet. Let me know if needed. Fixes #
Special notes for your reviewer:
- The change is small but corrects behavior that currently nullifies no_proxy support.
- Please confirm whether a regression test should be added for this.
Does this PR introduce a user-facing change?
NONE
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
NONE
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: daezaa / name: Daesik Choi (59032dac7febc167a245c9aabc4c265071997543, 7e0a76960a03e1d76d5d5e3437d1bd3f7b80554a)
Welcome @daezaa!
It looks like this is your first PR to kubernetes-client/python 🎉. 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-client/python 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. :smiley:
lgtm 👍
LGTM
@yliaog @roycaihw Can you please review this PR?
i think you want to change the script, rather than the generated file, otherwise, the generated file will be overridden during next release.
i think you want to change the script, rather than the generated file, otherwise, the generated file will be overridden during next release.
@yliaog https://github.com/kubernetes-client/python/pull/2459#discussion_r2418022810 Please check my comment here. The script itself is looking good.
Can we get this reviewed please?
Problem with v33.1.0 is, it doesn't honour HTTP_PROXY/HTTPS_PROXY env var from the client.
https://github.com/kubernetes-client/python/compare/v33.1.0...v34.1.0#diff-977bedbaf9339b25749bc96a24266c1fa3e99ab521a835562fe84b2ab87b7001L160
Problem with v34.1.0 is, configuration.proxy from below could now be turned on by above change but configuration.no_proxy is ALWAYS ''. Therefore should_by_pass NO_PROXY wouldn't work as expected.
https://github.com/kubernetes-client/python/blob/fe1a331d937933eea51ddd460c6d1e918383a7e1/kubernetes/client/rest.py#L90
@daezaa please check https://github.com/kubernetes-client/python/pull/2459#discussion_r2496480823
https://github.com/kubernetes-client/python/pull/2459#discussion_r2511524316 Comment updated.. thanks
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: daezaa, roccotigger Once this PR has been reviewed and has the lgtm label, please assign roycaihw 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