-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Make sure that DAG processor job row has filed value in job_type
column
#31182
Conversation
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 Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
954253e
to
8dd17bc
Compare
job_type
column
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
FYI: This is what I was talking about -> result if we add the typing now. It's ok how it is now, I won't complai, and I will solve it later. But just FYI why it has been separated - previously Scheduler and BackfillJobRunner had
|
Fix in #31240 (cc: @AmFlint @ephraimbuddy ) |
By avoiding setting the job in the BaseJobRunner, the typing for Runners and Job and JobPydantic is now more complete and accurate. Scheduler and Backfill Runners limit their code to Job and can use all the things that ORM Job allows them to do Other runners are limited to union of Job and JobPydantic version so that they can be run on the client side of the internal API without having all the Job features. This is a follow up after apache#31182 that fixed missing job_type for DagProcessor Job and nicely extracted job to BaseRunner but broke MyPy/Typing guards implemented in the runners that should aid the AIP-44 implementation.
By avoiding setting the job in the BaseJobRunner, the typing for Runners and Job and JobPydantic is now more complete and accurate. Scheduler and Backfill Runners limit their code to Job and can use all the things that ORM Job allows them to do Other runners are limited to union of Job and JobPydantic version so that they can be run on the client side of the internal API without having all the Job features. This is a follow up after #31182 that fixed missing job_type for DagProcessor Job and nicely extracted job to BaseRunner but broke MyPy/Typing guards implemented in the runners that should aid the AIP-44 implementation.
Description
We're running custom probes on the dag processor component.
Since the DagProcessor component is represented as a
job_runner
, we're running SQL queries to check the latest_heartbeat for the associated job object.To speed up queries in big deployments, we're using a the index on
job_type
:(hostname being the IP address of the k8s pod).
The problem is that there's a bug currently, and the job_type is always NULL for dag processor job_runners.
I added the missing line of code that should fix this issue.