Skip to content

Conversation

@ninsbl
Copy link
Contributor

@ninsbl ninsbl commented Mar 31, 2025

Currently (Airflow 2.10.5) HttpOperator tasks fail if the connection_id used contains the port number as a parameter. The port number does not get included in the base_url if the host connection parameter contains the scheme (e.g. https://).

It seems 71fec4e caused a behavioral change to HttpHook / HttpOperator....

This small change addresses the issue. It should be backported to Airflow version 2.


^ 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 airflow-core/newsfragments.

@ninsbl
Copy link
Contributor Author

ninsbl commented Apr 2, 2025

For context: the little bug that this PR is fixing, renders Airflow 2.10.5 useless unless I change all Http connections and later change them back once this unexpected behavior (that the port now has to be included in the hostname (although connections have a port property) is changed again...

Let me know if you require a test for proceeding with this PR...

Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

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

LGTm

@potiuk potiuk merged commit 19af68d into apache:main Apr 16, 2025
67 checks passed
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.

3 participants