Skip to content
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

Open
c-pius opened this issue Dec 5, 2024 · 3 comments
Open

[Module Catalog] Provide a --dry-run flag for the create command #119

c-pius opened this issue Dec 5, 2024 · 3 comments

Comments

@c-pius
Copy link
Contributor

c-pius commented Dec 5, 2024

Description

Add a --dry-run flag to the create command. When --dry-run is true, the build should execute:

  • print the resulting ModuleTemplate to the output instead of writing a file
  • check if the OCI artifacts could be pushed to the registry (no conflicts)

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:

@c-pius
Copy link
Contributor Author

c-pius commented Dec 5, 2024

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.

@Sawthis
Copy link

Sawthis commented Dec 12, 2024

@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

@c-pius
Copy link
Contributor Author

c-pius commented Dec 12, 2024

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).
But what do you exactly need modulectl to do when --dry-run is set? Just build the OCM artifacts and ModuleTemplate and simply don't push the artifacts to the registry (just to see if the build works)? Or do you need some check that for the built artifacts, there are no existing entries in the registry?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants