[Stage Plugins] Use METADATA_STAGE_DISPLAY_KEY instead of SkippedBy/ApprovedBy#5980
Conversation
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5980 +/- ##
==========================================
- Coverage 28.23% 28.16% -0.07%
==========================================
Files 512 516 +4
Lines 55326 55895 +569
==========================================
+ Hits 15620 15745 +125
- Misses 38461 38898 +437
- Partials 1245 1252 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
| const ( | ||
| // MetadataKeyStageDisplay is the key of the metadata to be displayed on the deployment detail UI. | ||
| MetadataKeyStageDisplay = "pipecd/stage-display-metadata" | ||
| ) |
There was a problem hiding this comment.
[IMO] How about defining the const value in the model package to clarify when to use it by grouping related things.
For example, Maybe in pkg/model/stage.go?
BTW, I referred the current implementation.
e.g.
https://github.com/pipe-cd/pipecd/blob/master/pkg/model/deployment.go#L23-L25
There was a problem hiding this comment.
it seems good.
Now we don't need to create constants.go.
(I guess MetadataKeyDeploymentNotification will not be used in pipedv1)
tbh, previously the file contained a const for Approvers, which will be used in server too.
There was a problem hiding this comment.
@t-kikuc
I got it, thanks!
If this is the stage-specific knowledge, then we might put it in pkg/model/stage.go.
WDYT?
There was a problem hiding this comment.
@ffjlabo Oh, I missed stage.go.
But I noticed that stage.go does not seem to be used in pipedv1.
WDYT?
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
What this PR does:
MetadataKey_StageDisplayinstead ofSkippedByandApprovedByWhy we need it:
SkippedByandApprovedBy.TODO:
pkg/plugin/sdk/constants/constants.gowithMetadataKey_StageDisplayusage:
Which issue(s) this PR fixes:
FixesPart of #5367Does this PR introduce a user-facing change?: