-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix(2243): add displayName #34
Conversation
); | ||
|
||
if (displayName !== undefined) { | ||
m.displayName = displayName; |
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.
do we need to update with displayName
for workflowGraph? https://github.com/screwdriver-cd/data-schema/blob/master/config/workflowGraph.js
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.
Oh, that specifies unknown()
, it seems to work without adding it, but it's more appropriate to add it.
I tried a bit, but I can't figure out how to add a displayName
as an option, and I get a validation error of pipelines[0].workflowGraph.nodes[3].displayName" must be a string
🤔
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.
Hm this doesn't work?
https://github.com/screwdriver-cd/data-schema/compare/displayName?expand=1
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.
That does not work.
nodes: Joi.array().items(Joi.object().keys({
name: requiresValue,
displayName: jobName
}).unknown()),
It didn't work even with the optional()
as shown below.
nodes: Joi.array().items(Joi.object().keys({
name: requiresValue,
displayName: jobName.optional()
}).unknown()),
It seems that an error occurs if the displayName key is omitted.
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.
wonder if it's because the unknown()
keyword
okay with merging this PR as-is for now and figuring out how to add displayName
to the workflowGraph
later
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.
OK, I've tried everything, but it's still not working. I will do so. Thanks!
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.
Ah, I've found the cause. It happens when I set the screwdriver.ce/displayName
to a number. The job name must be a string, so it can't be a number.
jobs:
main:
steps:
- ls
image: node:12
annotations:
screwdriver.cd/displayName: 0
Checking with SCHEMA_WORKFLOW_GRAPH
will result in a 404 error on the pipeline page, so validation step of yaml should return an error. I will consider validating the value of annotations.
Context
fix: screwdriver-cd/screwdriver#2243
Objective
References
License
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.