-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Better error messaging for YAML selectors #2700
Comments
#2640 (comment)
Would then print out something like:
|
@mlavoie-sm360 Thanks for re-commenting here, and sorry for the delay following up. What's your hope with printing out the CLI-arg representation?
Without knowing more, I'm quite hesitant to add this functionality, for two reasons:
|
@jtcohen6, thanks for taking the time to reply! To answer your question, my hope was to have feedback on the definition of my YAML selector in a more digestible way. It may be just me, but If doing that is opening a can of worms, my nice-to-have proposition is probably not worth it. |
Gotcha. Thanks for the explanation, and sorry to be a dasher of hopes. I totally hear what you're saying. While writing YAML selectors, I frequently find myself using I do think it would be cool if someone (?) built a handy script to parse a YAML selector and return a translation into the language of your choosing: CLI args, English sentences, ...
|
I chatted with Drew yesterday about two pieces of YAML selectors:
exclude
withinunion
is a little unintuitive. I think it's ok as long as we document it well:exclude
acts as a set difference operator, and it is always applied after the other elements are unioned together. This gets us more intricate subset definitions than what's available on the CLI, where we can only pass one yeslist (--models
,--select
) and one nolist (--exclude
).definition
is a dictionary with a number of potential arguments:key: value
method
+value
union
intersection
Action steps
exclude
arguments are passed to the same set operator. We could make this message clearer:definition
has eitherunion
orintersection
as an argument and more than one argument, we should raise an error. Something along the lines of:I'm going to leave this issue open to continue collecting feedback as people start using YAML selectors more widely in the forthcoming release candidate.
The text was updated successfully, but these errors were encountered: