-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add Annotation to integrate with Results #1245
Add Annotation to integrate with Results #1245
Conversation
@khrm please take a look and let me know if you'd like anything else to be incorporated. |
Golang test coverage difference reportCoverage decreased by Package report
|
there is a e2e test to update as well to make sure the annotation was added and matches the sha properly it would be in the statuses documentation page, a section about results and how to use paac with it. |
Thanks for the pointers @chmouel, I'll push the suggested changes soon. |
1e21808
to
1fe5583
Compare
}, | ||
{ | ||
name: "Empty Event", | ||
event: &info.Event{}, |
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 event is empty then accessing attributes of event such as event.SHA
will fail right 🤔
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.
The fields of the event that is being used for creating ResultsAnnotation
should have default values in case it's an empty struct, right? I think that's why the unit tests pass.
Quick Update: I'll try pushing the requested changes this week 🙃 . |
dc6b525
to
0488f72
Compare
1fe5583
to
10a5dcd
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1245 +/- ##
==========================================
- Coverage 63.18% 63.12% -0.06%
==========================================
Files 131 132 +1
Lines 10585 10606 +21
==========================================
+ Hits 6688 6695 +7
- Misses 3372 3382 +10
- Partials 525 529 +4 ☔ View full report in Codecov by Sentry. |
7c42f0c
to
ce4e0d4
Compare
The final bits i.e. e2e & doc asked by @chmouel are added.
If I'm not wrong, this PR - tektoncd/pipeline#7108 by @khrm should give us a fix. I can open this PR up for another review round if we're okay with it. |
f41862e
to
828b319
Compare
LGTM but i let the others do a second pass on the review.. (and please squash your commits before merge) |
a8f8278
to
a6809a3
Compare
Commits are squashed ✅ |
ab0fb30
to
8f97dae
Compare
LGTM |
@khrm can you confirm me this is still needed? koustav told me this has been working without it.... |
It's not working without this. We manually added repo annotations to pipelines so that the dashboard can filtered by repo. |
So Dashboard directly filters on labels set by PAC. |
I am good to merge this! @openshift-pipelines/pipelines-as-code-contributors anything else to add ? |
Signed-off-by: Satyam Bhardwaj <[email protected]>
- annotation : results.tekton.dev/recordSummaryAnnotations: |- {"repo": "tektoncd/results", "commit": "1a6b908", eventType: "pull_request", "pull_request-id": 6} - This annotation will be utilized in results to capture data. Signed-off-by: Satyam Bhardwaj <[email protected]>
8f97dae
to
2519df1
Compare
LGTM |
/retest |
The current CI failure might be unrelated to this PR!
/test go-testing |
thanks you! |
Changes
Purpose:
Feature request to add annotations to Pipelineruns produced by PaC. These annotations will be utilized in results to capture data for both summary and record.
UseCase:
Tekton results will store these fields in Summary and Record as Annotations. By default, Pipelinerun metadata information is JSON + base64 encoded. And in pipeline list APIs, we don't have information on what triggered the pipelines.
This field will be utilized by Dashboard/CLI clients to show the relevant data.
Fixes: #1234
Submitter Checklist
make test lint
before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI