-
Notifications
You must be signed in to change notification settings - Fork 88
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
Adding projects through the API runs all groups #1426
Comments
Yes, this is the expected behavior. When no groups are provided, all the steps are included.
I'm adding support for this in #1427
This is also expected. The current "selected group" implementation allows you to limit your pipeline steps to the specified groups. If no groups are provided, all the steps are run during the pipeline execution. We could improve the group feature but this will require design and refactoring. |
Signed-off-by: tdruez <[email protected]>
…eld #1426 Signed-off-by: tdruez <[email protected]>
) * Add pipeline selected groups in create project API endpoint #1426 Signed-off-by: tdruez <[email protected]> * Add proper pipeline validation in the OrderedMultiplePipelineChoiceField #1426 Signed-off-by: tdruez <[email protected]> --------- Signed-off-by: tdruez <[email protected]>
@AyanSinhaMahapatra You can now provide multiple pipelines during project creation using the API. |
Thanks @tdruez for adding the support!
Ah right, this makes sense. But if we have a way to select Groups in a pipeline and the default pipeline (when no groups are given) is all the groups included, then it seems that there are no way to select a pipeline without any optional groups? Like the
So do you think we should:
Whether the groups are provided, or selected automatically by default, I think it would be consistent to show the selected groups in the modal, whenever they are run. Otherwise it is required to know which steps are from which options, and check the logs to determine the run. Again as the UI and API defaults are different, it makes sense to be more verbose What do you think? |
Right, this is a flaw of the current approach (which was initially design for the m2m pipeline)
We could make this the default, but that should be the same default regardless of using the UI, API, or CLI. The default behavior should be consistent. For now, only 3 pipelines leverage the groups:
It's still time to review the group usage in those and see what would be the best refactoring. |
@tdruez upon considering the above mentioned pipelines: I think both the In case of @pombredanne also had a suggestion sometime ago (I can't find the issue/comment) to rename It also makes less sense for example to run all the d2d steps for all groups by default in the API. Even by design the UI/CLI rightly has the design that these pipeline steps or groups are optional, and enabled optionally upon explicit request, and I think this should be the case for the API as well. What do you think? |
@AyanSinhaMahapatra That makes sense, I can see this transition to "optional" steps. |
…1426 Signed-off-by: tdruez <[email protected]>
@AyanSinhaMahapatra I've started the refactoring in #1442 |
Sending the following scan to a scancode.io instance triggers a scan with all the groups of the selected pipeline:
From the log:
We can see that the
resolve_dependencies
step is run, even though theStaticResolver
group ininspect_packages
pipeline is optional.There is also no clear way to select groups when starting a project from the API:
It's not possible to choose groups like it is done via the CLI:
"pipeline": "inspect_packages:StaticResolver",
is not supported. It returns:{'pipeline': ['"inspect_packages:StaticResolver" is not a valid choice.']}
We also do not see the selected groups correctly in the pipeline run modal when scan is triggered from the API, as in the above case, pipeline steps from the StaticResolver group is run, but this is not visible in the modal, but only in the log.
The text was updated successfully, but these errors were encountered: