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

Allow trust env parameter to be defined in extra options of HTTP Connection #39161

Merged

Conversation

dabla
Copy link
Contributor

@dabla dabla commented Apr 22, 2024

Small PR which also allows trust env to be defined in the extra options of the Connection

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

Copy link
Collaborator

@dirrao dirrao left a comment

Choose a reason for hiding this comment

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

Can you let us know the use case of this additional parameter?

airflow/providers/http/hooks/http.py Show resolved Hide resolved
@dabla
Copy link
Contributor Author

dabla commented Apr 22, 2024

Can you let us know the use case of this additional parameter?

Yes this is when you want the requests library to ignore the environment variables. In our case we have default proxy environment variables defined, but in some cases we need to pass through another proxy, so even if we specify the proxy parameter, the request library will still use the one from the env variable unless we tell it to ignore it.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

LGTM

@dabla dabla requested a review from dirrao April 23, 2024 15:23
@dabla dabla changed the title Allow trust env parameter to be defined in extra options of Connection Allow trust env parameter to be defined in extra options of HTTP Connection Apr 23, 2024
@dabla
Copy link
Contributor Author

dabla commented Apr 24, 2024

Is it possible to merge this PR as this also impacts this PR so I can fix the merge conflicts on the later one and continue working on it? Thanks :)

@potiuk potiuk merged commit 9619536 into apache:main Apr 24, 2024
41 checks passed
RodrigoGanancia pushed a commit to RodrigoGanancia/airflow that referenced this pull request May 10, 2024
…ection (apache#39161)

* refactor: Allow trust env parameter to be defined in extra options field of HTTP Connection

* refactor: Added missing comma

* refactor: Added special case when trust_env set to False

---------

Co-authored-by: David Blain <david.blain@infrabel.be>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants