Skip to content

Conversation

@S-T-A-R-L-O-R-D
Copy link
Contributor

@S-T-A-R-L-O-R-D S-T-A-R-L-O-R-D commented Aug 29, 2021

checking both 'http_proxy' and 'HTTP_PROXY' to get proxy info when using st2 command with --debug option.

Fixes #5137

@pull-request-size pull-request-size bot added the size/XS PR that changes 0-9 lines. Quick fix/merge. label Aug 29, 2021
@CLAassistant
Copy link

CLAassistant commented Aug 29, 2021

CLA assistant check
All committers have signed the CLA.

@S-T-A-R-L-O-R-D
Copy link
Contributor Author

I have agreed to the CLA license about 5 hours ago, but it still asking me to sign

Copy link
Contributor

@amanda11 amanda11 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 the contribution. I've put a suggestion in for a change, and could you also:

  • sign the CLA with the email address you are using for github (we did change the CLA so might need to re-sign)
  • add an update to the changelog file

print("---------------")
print("HTTP_PROXY: %s" % (os.environ.get("HTTP_PROXY", "")))
print("HTTPS_PROXY: %s" % (os.environ.get("HTTPS_PROXY", "")))
print("HTTP_PROXY: %s" % (os.environ.get("HTTP_PROXY", os.environ.get("http_proxy"))))
Copy link
Contributor

Choose a reason for hiding this comment

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

This means that if neither are specified that None is outputted instead of "", could you use , "" on the inner os.environ.get.

Also, what happens if both are set. I think http_proxy in lowercase generally takes prioiryt, so we should probably change the order so that we check for the lowercase value, and only look for uppercase if its not set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, thanks for feedback, I will update it asap

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey , I used Star Lord by mistake(There is no such account), I have accepted CLA License by S-T-A-R-L-O-R-D

@cognifloyd cognifloyd added component:st2client status:needs cla A manual tag to note PRs that are otherwise ready, but the CLA bot says the CLA has not been signed. bug fix labels Oct 5, 2021
@cognifloyd cognifloyd changed the title addressing issue #5137 make http/https_proxy env var checking case insensitive (address issue #5137) Apr 1, 2022
@cognifloyd
Copy link
Member

@S-T-A-R-L-O-R-D:
You need to sign the CLA with your zscaler address (the email used on the first commit).
Or amend the commit to use your gmail address (the email you've signed the CLA with).

@cognifloyd
Copy link
Member

If you need help rewriting history, let me know. I can help.

@S-T-A-R-L-O-R-D
Copy link
Contributor Author

S-T-A-R-L-O-R-D commented Apr 1, 2022 via email

@cognifloyd
Copy link
Member

Rebased on master and corrected the author email.

@cognifloyd cognifloyd removed the status:needs cla A manual tag to note PRs that are otherwise ready, but the CLA bot says the CLA has not been signed. label Apr 2, 2022
@cognifloyd cognifloyd requested a review from amanda11 April 2, 2022 01:20
@pull-request-size pull-request-size bot added size/S PR that changes 10-29 lines. Very easy to review. and removed size/XS PR that changes 0-9 lines. Quick fix/merge. labels Jul 8, 2022
@cognifloyd
Copy link
Member

Rebased and reformatted with black.

@cognifloyd cognifloyd added this to the 3.8.0 milestone Jul 8, 2022
@cognifloyd cognifloyd dismissed amanda11’s stale review July 10, 2022 16:10

Feedback addressed

@cognifloyd cognifloyd merged commit a5c35a6 into StackStorm:master Jul 10, 2022
)
print(
"HTTPS_PROXY: %s"
% (os.environ.get("http_proxy", os.environ.get("HTTPS_PROXY", "")))
Copy link
Contributor

Choose a reason for hiding this comment

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

is this http_proxy or https_proxy for HTTPS_PROXY ENV?

Copy link
Member

Choose a reason for hiding this comment

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

Good catch. If you submit a PR to add the missing s, then I can merge it fairly quickly. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

@cognifloyd Done, please check: #5678.

feel free to let me know if any parts need to be modified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix component:st2client size/S PR that changes 10-29 lines. Very easy to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

should check both 'http_proxy' and 'HTTP_PROXY' when get proxy info from environment variables

6 participants