Skip to content

Comments

Preserve queue on task clear#30267

Closed
JGoldman110 wants to merge 2 commits intoapache:mainfrom
Citi:preserve-queue-on-task-clear
Closed

Preserve queue on task clear#30267
JGoldman110 wants to merge 2 commits intoapache:mainfrom
Citi:preserve-queue-on-task-clear

Conversation

@JGoldman110
Copy link
Contributor

This change will update logic to preserve original assigned queue when clearing a task. This PR was created based on the discussion in #20143.

@uranusjr
Copy link
Member

Does this not apply to basically all attributes on task? The fix would be no more than a band-aid (and too easy to be undone) if that is the case.

@JGoldman110
Copy link
Contributor Author

Does this not apply to basically all attributes on task? The fix would be no more than a band-aid (and too easy to be undone) if that is the case.

@uranusjr I don't look at it as a band-aid, my understanding is that a queue is assigned not to a task but to the instance of a task that relates to a particular DagRun. task_instance_mutation_hook is not called again when clearing a task instance, so any changes you make to a queue in the hook will no longer apply after clearing that task instance. Maybe a better approach would be to call task_instance_mutation_hook on clear to be able to apply same logic when task instance is first being created?

@uranusjr
Copy link
Member

Maybe task_instance_mutation_hook should always be called whenever refresh_with_task is called? I am not sure if this would cause other issues though.

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label May 30, 2023
@github-actions github-actions bot closed this Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-response stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants