-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Module Catalog] Provide a --dry-run
flag for the create
command
#119
Comments
Needs clarification what is needed exactly. E.g., would it also be possible to use a test registry and suffix the version with the commit sha. At the same time check with OCM tools if the descriptors are there in the production registry already. |
@c-pius On the submission pipeline we use 2 artifact registries, dev-modules-internal for modules built on the pull request level and modules-internal for modules built on the main branch. We were asked to remove --module-archive-version-overwrite flag from the CLI command. To be able to verify if it won't fail after merge to main we had to introduce --dry-run flag in the Kyma CLI. To verify if the content of the OCM structure was not changed for the same version between the channels. More details in the issue: https://github.tools.sap/kyma/test-infra/issues/469 |
Sorry, I still don't get the full picture. I understand from the linked ticket, that for the PR artifacts you are okay already (you clear the registry after runs). |
@c-pius - yes, we don't push the image with the --dry-run flag enabled. Details: kyma-project/cli#2267 We need to be able to check if the build won't fail after the merge to the main. Currently, the module team can release the module in version 1.1.0 to the fast channel, and they should not change content for the regular channel. We need to be able to check it against the production registry before merging it into the main branch. |
@c-pius For the dev registry we don't clear the registry, we use the |
We didn't port the If this is not possible, we probably need to port that functionality to modulectl. We would just need to check how to best implement this so that the flag is not used accidentally. |
@c-pius yes, we can remove the artifact in the dev registry using glcoud. But if someone already released a module with version 1.1.0 in the prod registry, then we should not allow merging the PR. With the new modulectl, I assume that checking that such an artifact exists in the prod registry is enough. With the kyma cli we needed the dry-run flag, because it was allowed to release the same version of the module twice e.g. for fast and regular channels but we had to perform the check if the OCM structure was not changed. The best way to do it was dry-run flag in the kyma cli. |
okay good, then no
So in summary, I understand that we need two checks:
I am just wondering if B) needs to be a feature of the |
@c-pius The question is whether such features will be useful for other modulectl users. We used |
Understood, thanks for clarifying! @janmedrek can you reach out in the PO call to the other module teams and check with the mdoule teams if and how they are using |
@c-pius The same case is in https://github.tools.sap/kyma/test-infra/issues/453. We can implement such check on the submission pipeline. But if someone tests it with modulectl locally or in the module repository GH action, then it will be allowed and won't fail. |
@c-pius I believe having the dry-run no-push flow in the modulectl would be nice. The context: even if Kyma teams rely solely on the submission pipeline, there are still some cases for the community modules that would benefit from such functionality. We can lower the priority of this ticket as it is not crucial for migration, but would keep this one in our backlog for implementation. |
Description
Add a
--dry-run
flag to thecreate
command. When--dry-run
is true, the build should execute:Reasons
Neighbors have asked for a possibility to test the module build without actually pushing the artifacts to the registry. Major use case seems to be in their PR pipeline where they need automated checks that the module version is valid without pushing the actual image and template. If they would push it, this would prevent changes to the PR as the re-push of the same version would be rejected.
Attachments
Related Issues:
validate
command in modulectl #63The text was updated successfully, but these errors were encountered: