Skip to content

Conversation

@majorosdonat
Copy link
Contributor

@majorosdonat majorosdonat commented Oct 14, 2024

When an application gateway or a Kubernetes ingress cannot find a running instance of a webserver hosting the API
The edge worker crashes and restarts due to HTTP error 502 and 504 (during webserver startup). To prevent this, the retried errors are extended with "bad gateway" and "gateway timeout" in the internal api call.


^ 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.

@majorosdonat majorosdonat marked this pull request as draft October 14, 2024 06:08
Majoros Donat (XC-DX/EET2-Bp) added 2 commits October 14, 2024 09:27
@majorosdonat majorosdonat changed the title [WIP] Add retry on error 502 and 504 Add retry on error 502 and 504 Oct 14, 2024
@majorosdonat majorosdonat marked this pull request as ready for review October 14, 2024 12:49
@majorosdonat majorosdonat marked this pull request as draft October 14, 2024 13:38
Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

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

CI fails - otherwise some minor comments. Otherwise looking good.

@majorosdonat majorosdonat marked this pull request as ready for review October 15, 2024 09:05
@jscheffl jscheffl added this to the Airflow 2.10.3 milestone Oct 15, 2024
@jscheffl jscheffl added the type:bug-fix Changelog: Bug Fixes label Oct 15, 2024
Copy link
Contributor

@jscheffl jscheffl 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 and the re-work. Looks good for me as well as the tests added.

I'd classify this as a bug and propose to back-port this also to v2-line

@jscheffl jscheffl merged commit 477d747 into apache:main Oct 15, 2024
jscheffl pushed a commit to boschglobal/airflow that referenced this pull request Oct 15, 2024
* Add retry on error 502 and 504

* fix mypy findings

* Add pytest

* Convert response code to HTTPStatus

* Add docs to retriable exception

* extend docs for AirflowHttpException

* Fix syntax and typos

* fix pytest

* fix static checks

* fix some static checks

* Fix ruff

* fix pre-commit

---------

Co-authored-by: Majoros Donat (XC-DX/EET2-Bp) <donat.majoros2@hu.bosch.com>
(cherry picked from commit 477d747)
jscheffl added a commit that referenced this pull request Oct 15, 2024
* Add retry on error 502 and 504

* fix mypy findings

* Add pytest

* Convert response code to HTTPStatus

* Add docs to retriable exception

* extend docs for AirflowHttpException

* Fix syntax and typos

* fix pytest

* fix static checks

* fix some static checks

* Fix ruff

* fix pre-commit

---------

Co-authored-by: Majoros Donat (XC-DX/EET2-Bp) <donat.majoros2@hu.bosch.com>
(cherry picked from commit 477d747)

Co-authored-by: majorosdonat <mjd2bp@bosch.com>
R7L208 pushed a commit to R7L208/airflow that referenced this pull request Oct 17, 2024
* Add retry on error 502 and 504

* fix mypy findings

* Add pytest

* Convert response code to HTTPStatus

* Add docs to retriable exception

* extend docs for AirflowHttpException

* Fix syntax and typos

* fix pytest

* fix static checks

* fix some static checks

* Fix ruff

* fix pre-commit

---------

Co-authored-by: Majoros Donat (XC-DX/EET2-Bp) <donat.majoros2@hu.bosch.com>
utkarsharma2 pushed a commit that referenced this pull request Oct 23, 2024
* Add retry on error 502 and 504

* fix mypy findings

* Add pytest

* Convert response code to HTTPStatus

* Add docs to retriable exception

* extend docs for AirflowHttpException

* Fix syntax and typos

* fix pytest

* fix static checks

* fix some static checks

* Fix ruff

* fix pre-commit

---------

Co-authored-by: Majoros Donat (XC-DX/EET2-Bp) <donat.majoros2@hu.bosch.com>
(cherry picked from commit 477d747)

Co-authored-by: majorosdonat <mjd2bp@bosch.com>
harjeevanmaan pushed a commit to harjeevanmaan/airflow that referenced this pull request Oct 23, 2024
* Add retry on error 502 and 504

* fix mypy findings

* Add pytest

* Convert response code to HTTPStatus

* Add docs to retriable exception

* extend docs for AirflowHttpException

* Fix syntax and typos

* fix pytest

* fix static checks

* fix some static checks

* Fix ruff

* fix pre-commit

---------

Co-authored-by: Majoros Donat (XC-DX/EET2-Bp) <donat.majoros2@hu.bosch.com>
PaulKobow7536 pushed a commit to PaulKobow7536/airflow that referenced this pull request Oct 24, 2024
* Add retry on error 502 and 504

* fix mypy findings

* Add pytest

* Convert response code to HTTPStatus

* Add docs to retriable exception

* extend docs for AirflowHttpException

* Fix syntax and typos

* fix pytest

* fix static checks

* fix some static checks

* Fix ruff

* fix pre-commit

---------

Co-authored-by: Majoros Donat (XC-DX/EET2-Bp) <donat.majoros2@hu.bosch.com>
utkarsharma2 pushed a commit that referenced this pull request Oct 24, 2024
* Add retry on error 502 and 504

* fix mypy findings

* Add pytest

* Convert response code to HTTPStatus

* Add docs to retriable exception

* extend docs for AirflowHttpException

* Fix syntax and typos

* fix pytest

* fix static checks

* fix some static checks

* Fix ruff

* fix pre-commit

---------

Co-authored-by: Majoros Donat (XC-DX/EET2-Bp) <donat.majoros2@hu.bosch.com>
(cherry picked from commit 477d747)

Co-authored-by: majorosdonat <mjd2bp@bosch.com>
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
* Add retry on error 502 and 504

* fix mypy findings

* Add pytest

* Convert response code to HTTPStatus

* Add docs to retriable exception

* extend docs for AirflowHttpException

* Fix syntax and typos

* fix pytest

* fix static checks

* fix some static checks

* Fix ruff

* fix pre-commit

---------

Co-authored-by: Majoros Donat (XC-DX/EET2-Bp) <donat.majoros2@hu.bosch.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants