-
Notifications
You must be signed in to change notification settings - Fork 287
Allow non-kebab-case names in component ai_models
#3259
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
Allow non-kebab-case names in component ai_models
#3259
Conversation
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.
I'm not sure if this is the ideal way to go about the fix. Here's my initial thought:
With the current version of this PR, all keys/values in the manifest are now exempt from the exceptions added here. This is problematic specifically for Spin application names (and maybe for other keys; I haven't yet looked in depth). We have logic elsewhere (eg spin new
and spin deploy
) with more restrictive naming rules, which I think we want to continue to uphold. For instance, admitting the :
character in an app name would cause its OCI artifact reference to no longer be valid, and spin deploy
would fail.
I'm not quite sure about the genesis of forbidding a segment from starting with a number, though @lann may recall. It's possible that is a restriction that could be lifted...
Hopefully @lann (or @itowlson?) can advise here as I'm still familiarizing myself with the code. My naive thought was we'd update logic (either in the serde crate here or maybe the toml parser?) to specifically ignore ai_models
string values. Or, if ignoring is too lax, basically just apply the exceptions you've added here to these string values, but continuing to preserve the default restrictions for everything else in the manifest.
At the moment, I don't see much value in restricting the IDs of |
@seun-ja Unless there's value in having the history (or it's hard to do) I'd suggest squashing the commits here. |
3fd3e77
to
abc280d
Compare
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, love how simple this fix turned out to be! If it is a quick add, should we add unit test coverage?
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.
Looks good to me! Maybe just update the title to reflect the new changes.
ai_models
@seun-ja Could you GPG sign please? Thanks! |
Some LLM model names contain colon or numbers after a hyphen which was previously rejected by the manifest parser. This change allows these special cases. Signed-off-by: Aminu Oluwaseun Joshua <[email protected]>
abc280d
to
5599534
Compare
@itowlson GPG signed. Out of curiosity, could it be because I squashed my commit that could have made it seem like I didn't GPG sign? The commit even passed the DCO check |
@seun-ja Oh, that's possible. Squashing would likely have retained the signed-off-by text which is the DCO, but if you're manually GPG-signing then it's a new commit and so presumably waves hands a new cryptographic thingummy needs to be whatsited. If you want, you can turn on automatic GPG signing by setting Anyway thanks for doing it, I see the Verified flag and I've queued an auto merge. |
Aims to resolve #3256
Relaxes rules to accommodate LLM models. Also includes tests and updates current ones