-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[TEP-0076]Validate Results type and object properties #4920
Conversation
The following is the coverage report on the affected files.
|
9ef8fae
to
5be3b1f
Compare
The following is the coverage report on the affected files.
|
5be3b1f
to
44586ba
Compare
The following is the coverage report on the affected files.
|
44586ba
to
973387e
Compare
The following is the coverage report on the affected files.
|
/retest |
/assign ywluogg |
Can you add release notes for results? |
Yes! |
3360226
to
23bfef6
Compare
The following is the coverage report on the affected files.
|
23bfef6
to
2010f97
Compare
The following is the coverage report on the affected files.
|
/retest |
pkg/pod/status.go
Outdated
neededTypes := make(map[string][]string) | ||
providedTypes := make(map[string][]string) | ||
// collect needed keys for object results | ||
if tr.Spec.TaskSpec != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make more sense for this function to have only one task spec as the source of truth (and same for the function below it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean merge them before calling these functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, I merged them into one results list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no -- I think "resolvedTaskSpec" should be used as the source of truth for what the task spec is
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for moving out of pkg/pod, I think this looks a lot better! I would actually create a new package (maybe pkg/results?) and export a function that validates a task spec against a list of task results. Does that make sense/seem reasonable?
Maybe adding a TODO and I believe Yongxuan would definitely do that later? We are trying to target v0.38 release, so wanted to get the features implemented and tested soon |
sounds good, could you please create an issue to track? |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lbernick The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Yep! #5001 is the issue that tracks this. |
This is part of work in TEP-0076. This commit provides the validation of results in reconciler after we get the emitted results. It covers the validation of mismatched types between the results emitted and specified, the results object properties. Previous this commit these validations are missing and errors are ignored.
3424ed5
to
1e902b8
Compare
The following is the coverage report on the affected files.
|
/lgtm |
/retest |
The following is the coverage report on the affected files.
|
/retest |
2 similar comments
/retest |
/retest |
Changes
This is part of work in TEP-0076.
This commit provides the validation of results in reconciler after we
get the emitted results. It covers the validation of mismatched types
between the results emitted and specified, the results object
properties.
Previous this commit these validations are missing and errors are
ignored.
/kind feature
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
(if there are no user facing changes, use release note "NONE")
Release Notes