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 Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
hussein-awala
left a comment
There was a problem hiding this comment.
Could you add a test that tries to access this parameter on runtime?
task owner check
@hussein-awala |
|
I am worried a bit, the task instance table is a very huge table that potentially have millions of rows. Do we need to persist the field into the table or could we also load it from the Python object as task instance? Note, the extension solely will not work, if really it is accepted to extend the data model, a DB migration is needed to be added. |
@jscheffl |
You should use alembic to generate those -those are not commits. See https://github.com/apache/airflow/blob/main/contributing-docs/13_metadata_database_updates.rst as starting point. And I absolutely share @jscheffl worries. TaskInstance is a huge table, it can have miliions and millions of rows and it is the crucial part of the process. Modifying the DB structure and making our database less normalized is not a decision that should be taken lightly. Have you run any performance tests on millons of rows @wornjs ? Do you know what impact it will have on the database size and memory used to store the extra data? Have you tested it on mysql and Postgres and sqlite with those millions of rows? If the answer to any of the questions above is "no" - that change is absolutely not ready to be merged. And in generall, if the motivation is to avoid traversing from Task Instance to get the owner information in order to send slack alert, I seriously doubt this change has a serious merit. |
potiuk
left a comment
There was a problem hiding this comment.
Requesting changes as there is a doubt if that change is good at all.
|
I don't think this is a good idea, trying to access the information on the task would be better. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Description
add task owner information to taskinstance
Use case/motivation
I am sending an alarm to Slack using the airflow callback(on_success_callback, on_failure_callback) function.
I create an alarm message using the information of the task instance, and it would be better if the task owner information is included here.
Closes: #40366