-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat!: step status reporting + fix pull request context overwrite bug #1090
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1090 +/- ##
==========================================
+ Coverage 63.12% 63.24% +0.11%
==========================================
Files 348 348
Lines 10533 10594 +61
==========================================
+ Hits 6649 6700 +51
- Misses 3400 3409 +9
- Partials 484 485 +1
|
@@ -136,12 +141,25 @@ func validateSteps(s yaml.StepSlice) error { | |||
continue | |||
} | |||
|
|||
if s, ok := reportMap[step.ReportAs]; ok { | |||
return fmt.Errorf("report_as to %s for step %s is already targeted by step %s", step.ReportAs, step.Name, s) |
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.
nice
in my opinion i dont think so, that might make required status checks auto pass when it never ran |
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
@ecrupper do you think it makes sense to open up another community issue for expanding this functionality to work with stages? |
Definitely. Also somewhat related would be go-vela/community#910 with the idea of a "status" for a stage. |
Closes go-vela/community#958
Adding the following lines to
scm.Status(...)
:This will prevent any overwrites of the "core" pull_request event. Perhaps this can be a candidate for revisiting if we cut over to a
version: "2"
pipeline implementation, but the expectation of our users is that webhook events report to their respective contexts to the SCM. Therefore the behavior ofcontinuous-integration/vela/pull_request
should remain unchanged.Closes go-vela/community#576
In order to still grant status reporting for "non-core" action types, opening the door for step reporting seemed like the right approach. With this change, steps with
report_as
defined will post their status to the defined context. It will be prefixed by the standard event prefix. For example:This step will create and update a commit status with the context
continuous-integration/vela/pull_request/title-validator
.The limitations I decided to impose are:
Question I had: should a skipped step be a success?