tektoncd / results

Long term storage of execution results.
Apache License 2.0
78 stars 74 forks source link

Allow users/integrators to pass arbitrary keys/values through Result and RecordSummary annotations #426

Closed alan-ghelardi closed 1 year ago

alan-ghelardi commented 1 year ago

Changes

Resolves https://github.com/tektoncd/results/issues/343.

Users can pass arbitrary keys/values to the Result.Annotations and Result.Summary.Annotations fields by adding certain annotations to their PipelineRuns and TaskRuns.

/feature

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you review them:

Release Notes

Allow users/integrators to pass arbitrary keys/values to the Result.Annotations
and Result.Summary.Annotations fields, by adding the newly created annotations
results.tekton.dev/resultAnnotations and
results.tekton.dev/recordSummaryAnnotations to their PipelineRuns and TaskRuns.

Those annotations can be used to store relevant metadata (e.g. repository name,
Git commit SHA, pull request number among others) along with results into the
database, in order to be used later to retrieve those resources via the API.
alan-ghelardi commented 1 year ago

/kind feature

alan-ghelardi commented 1 year ago

/assign @khrm /assign @adambkaplan /assign @dibyom

adambkaplan commented 1 year ago

/approve

This feature can be useful for operators and integrators.

tekton-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan

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: - ~~[OWNERS](https://github.com/tektoncd/results/blob/main/OWNERS)~~ [adambkaplan] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
dibyom commented 1 year ago

I have the same question as Adam around merging vs overwriting values but otherwise looks good. Thanks @alan-ghelardi

alan-ghelardi commented 1 year ago

@adambkaplan and @dibyom in practice nowadays there aren't other entrypoints to set those annotations, but I like the idea of merging the values to support extensibility.

@tektoncd/results-maintainers could you have a second review here, please?

alan-ghelardi commented 1 year ago

I updated the docs with the new feature, by thee way.

dibyom commented 1 year ago

/lgtm