-
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
Minor changes #4
Conversation
|
You said "In case you have the addition of a job. he wanted to see all the changes in the level of step, etc. in the output of CLI." but I don't really see what was missing. If I remember, in case a job is added, the whole job is displayed in the output, including its steps, etc. I haven't tried the verbose option, so I don't know exactly what the output looks like and what it brings compared to the "default" output. |
|
(1) What are the "more details" that are provided when using (2) I'll do that. |
If we want to use the tool as a library, and if we want to compute, for example (this is just one example among many), the exact number of steps that are being added, removed or modified between two workflow file versions, then this is currently not immediately possible using the non-verbose version, in the case where the steps being affected are part of a new job being added (or job being removed?) Currently a job addition is considered to be a single atomic change (with a single value that contains all of its details). So if you want to use the library to count the number of changes/additions/removals made to steps, you would need to manually process the output of the tool to unwind the value of this atomic change in its more primitive constituents. It is our intention to use the tool for counting fine-grained changes (additions/ removals/modifications) for the different kinds of syntactic elements contained in a workflow, so for this it would be useful to have an output in which all of the details that are part of a single job addition (removal) are repored as a list of changes (rather than a single value). |
Ok. But we're talking about the CLI, not the functions themselves (as provided by the library), so the I tend to fully adhere to the KISS principle when writing such tools: if one needs more functionalities, or different behaviours, either it's a common use-case and in that situation, we may decide to implement it as part of the tool, or it isn't (or it adds technical debt, maintenance burden, or...) and one can write a wrapper with the desired functionalities/behaviours.
If something is added or removed in a workflow file, it is quite obvious that everything below is added or removed. I don't see the value in providing the full list of subpaths/values that were added/removed (the same way that It is also very likely we'll do a major "2.0.0" update at some point (likely, soon) with a complete rewriting of the tool so that it is easier to manipulate as a library. For what I've in mind currently, I would say we really need a |
What about - -atomic instead of - -verbose to report on all, including nested ones, changes? (if you really want to keep this option as part of the cli). Or - -nested? |
I am not convinced of the words "--atomic" or "--nested", they do not convince me. What about something like "--detailed"? |
I'm not convinced by "--detailed" since it does not bring more details: it just unfolds non-atomic changes into atomic ones. That said, I still consider it's a bad idea to have such flag for the CLI (I understand, to some extent, the use-case you mentioned, but IMHO this shouldn't be part of the tool itself, or if you really want to have it in the tool, it should be part of the Python API, not the CLI). I really think we should keep the tool as simple as possible, while allowing (or, said differently, not doing anything to prevent) other developers to make use of it for their own use-case using their own code. If several developers share similar or close use-cases, then we can decide to support these use-cases directly in gawd. |
What about --unfold ? One particular use case for which this unfolded version would be particularly useful (for ourselves) is to detect whether some step is moved from an existing job to a new job (or whether some step is moved from a removed job to an existing job). Currently, such "step moves" are not distinguishable from "step additions" or "step removals" if one does not check INSIDE the context of a job. |
Unfolding is a post-processing on the changes that are reported by the tool. The use-case you indicate is kinda specific: one could also consider moving step parameters, moving environment variables (between jobs, between steps, from a step to a job, globally, etc.) in which cases the unfolding won't be helpful. I'm not saying that the use-case you mention isn't interesting, but I think we shouldn't support it directly in the tool (or at least, not advertise it for the CLI part). On the other hand, we can mention it (and explain how to deal with it) in the documentation, perhaps in a "Recipes" section (that can also include the solution to integrate gawd into git, as mentioned in #1). In any case, if we decide to keep it in the tool:
|
Two things I forgot:
|
Hello,
Also, please add some documentation for the two new functions. I don't see why they were implemented. Is this something you internally use? Why is this called "verbose" exactly? That's not really the kind of behaviour I see when using "-v" in most CLI.