You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/11/03 04:31:58 UTC
[GitHub] [airflow] utkarsharma2 opened a new pull request, #27481: Add "user_updated_state" column in taskinstance
utkarsharma2 opened a new pull request, #27481:
URL: https://github.com/apache/airflow/pull/27481
closes: #21252
Added a column in `taskinstance` model to indicate the if the state of the task was updated by user manually.
A couple of assumptions:
1. User can only update the state from Airflow UI

2. Once the user has updated the state, it always stays in user updated state.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] github-actions[bot] closed pull request #27481: Add "user_updated_state" column in taskinstance
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #27481: Add "user_updated_state" column in taskinstance
URL: https://github.com/apache/airflow/pull/27481
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] utkarsharma2 commented on pull request #27481: Add "user_updated_state" column in taskinstance
Posted by GitBox <gi...@apache.org>.
utkarsharma2 commented on PR #27481:
URL: https://github.com/apache/airflow/pull/27481#issuecomment-1301631247
A couple of questions:
1. Are there any other ways users can update the state of a task besides UI?
2. How do clear and run tasks in UI should affect this behavior?
3. Is there any scenarios where we should clear `user_updated_state` once we have updated it to True?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] utkarsharma2 commented on pull request #27481: Add "user_updated_state" column in taskinstance
Posted by GitBox <gi...@apache.org>.
utkarsharma2 commented on PR #27481:
URL: https://github.com/apache/airflow/pull/27481#issuecomment-1302892417
@bbovenzi I took a peek at [PR](https://github.com/apache/airflow/pull/26457), and I think it's the more manual approach, If we make this automated, there would be one less thing to worry about. WDYT?
1. Thanks for pointing out the REST API.
2. Agreed, we should toggle the state back to False when clearing and running.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] github-actions[bot] commented on pull request #27481: Add "user_updated_state" column in taskinstance
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #27481:
URL: https://github.com/apache/airflow/pull/27481#issuecomment-1363458206
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] utkarsharma2 commented on pull request #27481: Add "user_updated_state" column in taskinstance
Posted by GitBox <gi...@apache.org>.
utkarsharma2 commented on PR #27481:
URL: https://github.com/apache/airflow/pull/27481#issuecomment-1302886150
Summy of all the approaches that I could think of:
### Approach 1:
In task instance model introduce a new property, `user_updated_state`: Bool = True/False; default False
#### Will be updated from:
1. From UI
2. Rest API
1. We will have to expose this parameter in Rest API
2. Default value should be true, since if user creates his own view he have an option to control it.
3. CLI
#### How will we update the UI in case the user has updated the state:
1. Tool Tip?
### Approach 2
Look in the [[logs](https://github.com/apache/airflow/blob/3aadc44a13d0d100778792691a0341818723c51c/airflow/models/log.py#L27)](https://github.com/apache/airflow/blob/3aadc44a13d0d100778792691a0341818723c51c/airflow/models/log.py#L27). When rendering the UI we can a look in logs for events like `Confirm` for the task id, dag id and execution_date
#### Will be updated from:
1. UI
2. REST API
3. CLI
We don’t need to track this, because it should already be taken care of by Logs.
#### How will we update the UI in case the user has updated the state:
1. Tool Tip?
### Approach 3:
Add a new state to indicate if the user has marked as a success or failure
#### Will be updated from:
1. From UI
2. Rest API
1. We will have to expose this parameter in Rest API
2. Default value should be true, since if user creates his own view he have an option to control it.
3. CLI
#### How will we update the UI in case the user has updated the state:
1. New color for new task state
Thanks, @feluelle for helping out :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] bbovenzi commented on pull request #27481: Add "user_updated_state" column in taskinstance
Posted by GitBox <gi...@apache.org>.
bbovenzi commented on PR #27481:
URL: https://github.com/apache/airflow/pull/27481#issuecomment-1302341934
> A couple of questions:
>
> 1. Are there any other ways users can update the state of a task besides UI?
> 2. How do clear and run tasks in UI should affect this behavior?
> 3. Is there any scenarios where we should clear `user_updated_state` once we have updated it to True?
1. Users can also manually update a task instance via the REST API.
2. Clearing and running wouldn't be user-updated because the state is the result of actually running, no?
3. Probably clearing and running
I also wonder if this isn't better handled by user comments [See here](https://github.com/apache/airflow/pull/26457)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Jorricks commented on pull request #27481: Add "user_updated_state" column in taskinstance
Posted by GitBox <gi...@apache.org>.
Jorricks commented on PR #27481:
URL: https://github.com/apache/airflow/pull/27481#issuecomment-1305355425
I had some more thoughts about this and I don't think this should intertwine with manual Task/DAG Notes.
Instead, I feel we should track each (manual) user interaction that was made to the Task and should log this.
Then you should show a table with all manual operations that were performed on this Task.
I am saying this because I am struggling sometimes to find what happened to a Task over the course of time, now if we use the notes, one could simply wipe it and not think about it any further. Making this completely separate will allow for a more in detailed view on what happened.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org