Skip to content

Fixing exception types to include TypeError, which is what is raised in - #40012

Merged
potiuk merged 2 commits into
apache:mainfrom
leakec:celery_executor_exception_type
Jun 4, 2024
Merged

potiuk merged 2 commits into
apache:mainfrom
leakec:celery_executor_exception_type

Conversation

@leakec

@leakec leakec commented Jun 2, 2024 •

Copy link
Copy Markdown
Contributor

closes: #40011
related: #39980

This issue closes #40011. It modifies the exception line to include TypeError in addition to AttributeError. In Python 3.12, the error that this exception is trying to catch is raised as a TypeError rather than an AttributeError.


@boring-cyborg

boring-cyborg Bot commented Jun 2, 2024

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@eladkal

eladkal commented Jun 2, 2024

Copy link
Copy Markdown
Contributor

Can you add unit test to avoid regression?

@leakec

leakec commented Jun 2, 2024 •

Copy link
Copy Markdown
Contributor Author

@eladkal sure thing. May be a little bit as I've got a busy week coming up, but I will add a unit test for this.

EDIT: @o-nikolas added a unit test for this in #40035.

@eladkal
eladkal requested a review from o-nikolas June 3, 2024 18:59
@vincbeck vincbeck added this to the Airflow 2.9.2 milestone Jun 3, 2024
@potiuk
potiuk merged commit f4c90f7 into apache:main Jun 4, 2024
@boring-cyborg

boring-cyborg Bot commented Jun 4, 2024

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jun 4, 2024
@ephraimbuddy ephraimbuddy removed this from the Airflow 2.9.2 milestone Jun 4, 2024
o-nikolas added a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jun 4, 2024
A unit test which triggers the scenario of a current Celery executor
with the new signature of change_state run against an older version of
Airflow with the old signature of change_state on the BaseExecutor
class.

related apache#40011
related apache#39980
related apache#40012
@eladkal eladkal removed the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jun 5, 2024
eladkal pushed a commit that referenced this pull request Jun 5, 2024
A unit test which triggers the scenario of a current Celery executor
with the new signature of change_state run against an older version of
Airflow with the old signature of change_state on the BaseExecutor
class.

related #40011
related #39980
related #40012
@potiuk potiuk added this to the Airflow 2.9.2 milestone Jun 6, 2024
@potiuk potiuk mentioned this pull request Jun 6, 2024
13 of 41 tasks
fdemiane pushed a commit to fdemiane/airflow that referenced this pull request Jun 6, 2024
…in (apache#40012)

Python 3.12.
Fixes apache#40011

Co-authored-by: leake <carl.leake@jpl.nasa.gov>
fdemiane pushed a commit to fdemiane/airflow that referenced this pull request Jun 6, 2024
A unit test which triggers the scenario of a current Celery executor
with the new signature of change_state run against an older version of
Airflow with the old signature of change_state on the BaseExecutor
class.

related apache#40011
related apache#39980
related apache#40012
syedahsn pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jun 7, 2024
…in (apache#40012)

Python 3.12.
Fixes apache#40011

Co-authored-by: leake <carl.leake@jpl.nasa.gov>
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
…in (apache#40012)

Python 3.12.
Fixes apache#40011

Co-authored-by: leake <carl.leake@jpl.nasa.gov>
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
A unit test which triggers the scenario of a current Celery executor
with the new signature of change_state run against an older version of
Airflow with the old signature of change_state on the BaseExecutor
class.

related apache#40011
related apache#39980
related apache#40012
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.

Numerous error reports in airflow logs due to function argument mismatch

5 participants