-
Notifications
You must be signed in to change notification settings - Fork 81
Provide configurations to store labels and Annotations in summary #880
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 GitHu 8000 b? Sign in to your account
Conversation
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.
/kind feature
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
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.
/assign @enarha @vdemeester
This helps by enabling making query to Results Table which has less rows. Also, we can avoid toast query if PipelineRuns are too large. Also, we can create index on these.
/test pull-tekton-results-unit-tests |
/test pull-tekton-results-unit-tests |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester 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 |
The following is the coverage report on the affected files.
|
@@ -154,6 +162,24 @@ func (c *Client) ensureResult(ctx context.Context, o Object, opts ...grpc.CallOp | |||
} | |||
res.Summary.Annotations = annotations | |||
} | |||
// Set the Result.Summary.Labels fields if the object in question contains the required labels. | |||
summaryLabels := strings.Split(c.Config.SummaryLabels, ",") | |||
if len(summaryLabels) > 0 && summaryLabels[0] != "" { |
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.
Why do you only check summaryLabels[0] != ""
? What if summaryLabels[2] == ""
?
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.
We are checking for empty "" string. Split function on empty string yields empty "" string.
This helps by enabling making query to Results Table which have less rows.
Also, we can avoid toast query if PipelineRuns are too large. Also, we can create index on these.
You can provide args to watcher
summary_labels
andsummary_annotations
to store these labels/annotations to Result.Annotation field.Changes
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes