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: set proxy server in config file #283

Merged
merged 3 commits into from
Jul 13, 2021

Conversation

dstaesse
Copy link
Contributor

@dstaesse dstaesse commented Jul 10, 2021

The proxy option was not parsed in the config file.

Closes #

Proposed Changes

Briefly describe your proposed changes:

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages are in semantic format
  • Sign CLA (if not already signed)

The proxy option was not parsed in the config file.
@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2021

Codecov Report

Merging #283 (adcb7be) into master (2a0bd82) will decrease coverage by 0.03%.
The diff coverage is 66.66%.

❗ Current head adcb7be differs from pull request most recent head e3aaecd. Consider uploading reports for the commit e3aaecd to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #283      +/-   ##
==========================================
- Coverage   92.42%   92.38%   -0.04%     
==========================================
  Files          27       27              
  Lines        2165     2168       +3     
==========================================
+ Hits         2001     2003       +2     
- Misses        164      165       +1     
Impacted Files Coverage Δ
influxdb_client/client/influxdb_client.py 97.50% <66.66%> (-0.59%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a0bd82...e3aaecd. Read the comment docs.

@dstaesse
Copy link
Contributor Author

I had a bit of a headache today figuring out why I couldn't connect to my InfluxDB server from behind a proxy. I fixed it for the config.ini, but I would also take into account http_proxy and HTTP_PROXY environment variables if they are set, with lower precedence (these are now ignored) Since there are some options how to deal with that, I'll leave that one up to you guys.

Copy link
Contributor

@bednar bednar 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 your PR 👍

Could you please satisfy next requirements before we merge the PR into master:

  1. Add test for proxy configuration: https://github.com/dstaesse/influxdb-client-python/blob/adcb7bed4428bab5937c6bea2131628839f924c1/tests/test_InfluxDBClient.py#L65
  2. Sign CLA: image

@dstaesse dstaesse force-pushed the master-proxy-config branch from 7b17e66 to 5c05089 Compare July 12, 2021 17:12
@dstaesse
Copy link
Contributor Author

Sure.

@dstaesse
Copy link
Contributor Author

I looked for a valid proxy configuration for the integration tests, but it looks like there is no test yet for the proxy feature as a whole...
Adding that is a bit beyond the scope of my intended contribution here...

@dstaesse dstaesse force-pushed the master-proxy-config branch from 5c05089 to e3aaecd Compare July 12, 2021 17:50
@bednar
Copy link
Contributor

bednar commented Jul 13, 2021

Adding that is a bit beyond the scope of my intended contribution here...

Your test: test_init_from_file_proxy is quite enough. Thx

Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

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

@dstaesse thanks again for your PR! 👍 Let's merge it into master.

@bednar bednar merged commit 6fdd78a into influxdata:master Jul 13, 2021
@bednar bednar added this to the 1.20.0 milestone Jul 13, 2021
@dstaesse dstaesse deleted the master-proxy-config branch July 13, 2021 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants