Skip to content
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

Refactor task validation #17344

Merged
merged 1 commit into from
Jun 1, 2023
Merged

Refactor task validation #17344

merged 1 commit into from
Jun 1, 2023

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented May 29, 2023

Move all validations related to task fields to Task.Validate(). Prior to this, some task validations were being done inside TaskGroup.Validate() because they required access to some group values.

But similarly to how TaskGroup.Validate() takes the job as parameter, it's fair to expect the task to receive its group.

Note: this could be considered an alternative implementation for #17342, but we could also just merge a5f3e0d, or nothing at all if we don't think this is worth it 😄

Move all validations related to task fields to Task.Validate(). Prior to
this, some task validations were being done inside TaskGroup.Validate()
because they required access to some group values.

But similarly to how TaskGroup.Validate() tasks the job as parameter,
it's fair to expect the task to receive its group.
@lgfa29
Copy link
Contributor Author

lgfa29 commented Jun 1, 2023

After looking at it again I thought it would be best to merge and backport #17342 and only merge this refactoring to main.

I think it's a fairly stable part of the code that is not expected to receive backports (famous last words 😅)

@lgfa29 lgfa29 merged commit 1664796 into main Jun 1, 2023
12 checks passed
@lgfa29 lgfa29 deleted the refact-task-validation branch June 1, 2023 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants