-
Notifications
You must be signed in to change notification settings - Fork 159
Updates schema to enforce names as required RFC1123 values #768
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
Updates schema to enforce names as required RFC1123 values #768
Conversation
specification.md
Outdated
|
||
Identifiable components of a workflow definition, such as states, actions, branches, events and functions define a required non-null `name` property which follows the DNS label names as defined by [RFC 1123](https://datatracker.ietf.org/doc/html/rfc1123). | ||
|
||
In other words, `names` must be lowercased, start and end with an alphanumeric character, and contain only alphanumeric characters or '-' (dash) character. |
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.
RFC 1123 does not include any lowercasing requirement; did you intend to make this a further restriction?
I think some text is also warranted regarding RFC 5890 R-LDH labels (whose third and fourth characters are both "-") such as xn--bcher-kva
(which is further an XN-label and valid A-label representing "bücher") and we--like--it
(which is neither but is still subject to the "MUST NOT be processed as ordinary LDH labels by IDNA-conforming programs" restriction).
I don't think it matters whether they are allowed or rejected, but some software does treat them specially so it's worth being explicit.
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.
@gibson042 I thought it did, or at least does it's k8s flavor:
Anyways, I do think adding the lowercase restriction is a must, as i believe it could help ensure invariance, especially on exotic systems.
It's not however a strong preference, and I'm obviously open to any and all opinion for and against ;)
As for the double dashes, I tend to believe it's safe to forbid its use altogether, like with the k8s regex I'm using in the PR. WDYT?
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.
👍
Co-authored-by: Richard Gibson <[email protected]>
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.
@cdavernas Thanks for the updates!
@gibson042 No, thanks to you for both the comments and the suggested edits ❤️ |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Many thanks for submitting your Pull Request ❤️!
Please specify parts of this PR update:
Discussion or Issue link:
#671 #685
What this PR does / why we need it: