Skip to content

Conversation

@Tomasz-Smelcerz-SAP
Copy link
Member

@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP commented Sep 15, 2025

Description

Note to reviewers: I was really trying to keep this PR as minimal as possible. There are many things to fix/improve/cleanup and many times I've seen that, but I decided not to, in order to introduce as few changes as possible.
Keep that in mind when suggesting improvements. Do we really want to make this PR even bigger? I would rather prefer to make a note in the sources and then create a follow-up PR to clean all the notes. Just remember that the work remaining in #2526 and our other efforts (like simplifying/getting rid of templatelookup.go) will probably make most of these review-fixes obsolete or unnecessary.
Up to you.

Changes proposed in this pull request:

  • Component Descriptors (CD) are now read from the OCM repository (which usually is some OCI registry)
  • To read a CD, one must provide an OCM Component Name and a version. In our current setup, the OCM Component Name is available only in a ModuleReleaseMeta for a given Module.
  • It means that with this PR the ModuleReleaseMeta becomes mandatory
  • To keep this PR minimal, I did not remove code/tests related to the previous "modes" of operation, where CD was fetched from a ModuleTemplate and ModuleReleaseMeta was, in some cases, optional. This code requires cleanup in a separate PR. Of course when the test is failing, I had to refactor it
  • An interesting case: What to do if user configures a Module for which there is no ModuleReleaseMeta? Currently, when user configures a module on a Kyma, for which there's no ModuleTemplate, the Kyma is put in Warning state. To keep it consistent, I use the same error->status resolution strategy. To be discussed.
  • Code coverage for some packages (templatelookup) decreased. This is because some test cases were disabled. This is (mostly) a legacy code that will disappear anyway. A new method of resolving ModuleTemplates along with ModuleReleaseMeta should be introduced, but this is not a part of this PR. I think it is OK to temporarily "lower the bar" - we're in the middle of a bigger refactoring here. Related issues that will introduce the necessary cleanpup/changes are listed are listed here
  • There is an open discussion that focuses on the little detail: The OCI registry URL. Previously it was taken from the static ComponentDescriptor data embedded in the ModuleTemplate. Now we have at least two different values we can use: An explicitly configured one and the one from ComponentDescriptor, after it is successfully fetched (we still need OCI Registry URL for subsequent operations, like raw-manifest fetching). Which URL to choose? Please take a look at the discussion. I decided to rely on explicitly provided value as I had no feedback that I should chose a different strategy here.

Related issue(s)
#2601

@github-actions
Copy link

Manifests created with 'make dry-run-control-plane' changed! Please make sure to check if changes are needed in related repositories like management-plane-charts, runtime-watcher, etc.

@Tomasz-Smelcerz-SAP
Copy link
Member Author

We are blocked here by: <internal-repo>/kyma/test-infra/issues/781 - we need all the ModuleReleaseMeta to have OCM version related attributes. In particular spec.mandatory.version

@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP force-pushed the feat/read-component-descriptor-from-oci-registry branch from f5357db to 6fca147 Compare September 24, 2025 05:38
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP marked this pull request as ready for review September 30, 2025 06:31
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP requested a review from a team as a code owner September 30, 2025 06:31
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP force-pushed the feat/read-component-descriptor-from-oci-registry branch from e258230 to 9d9eb17 Compare September 30, 2025 07:21
@lindnerby lindnerby linked an issue Sep 30, 2025 that may be closed by this pull request
1 task
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP force-pushed the feat/read-component-descriptor-from-oci-registry branch 3 times, most recently from 0be33b5 to 3be024d Compare September 30, 2025 13:29
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP changed the title Feat/read component descriptor from oci registry feat: Read component descriptor from oci registry Sep 30, 2025
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP force-pushed the feat/read-component-descriptor-from-oci-registry branch 3 times, most recently from 071775d to 6aee460 Compare October 1, 2025 08:47
@github-actions
Copy link

github-actions bot commented Oct 1, 2025

⚠️ Pipeline-related file changes detected! Please review if related updates (e.g. manifest generation or workflow adjustments) are required.

@ruanxin ruanxin added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 1, 2025
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP force-pushed the feat/read-component-descriptor-from-oci-registry branch 3 times, most recently from d3509af to 5ac7c15 Compare October 7, 2025 18:52
@github-actions
Copy link

github-actions bot commented Oct 7, 2025

Manifests created with 'make dry-run-control-plane' changed! Please make sure to check if changes are needed in related repositories like management-plane-charts, runtime-watcher, etc.

@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP force-pushed the feat/read-component-descriptor-from-oci-registry branch from 1a7339b to 4552c9a Compare October 7, 2025 20:12
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP force-pushed the feat/read-component-descriptor-from-oci-registry branch 3 times, most recently from 916d93f to e3b1e83 Compare October 8, 2025 23:49
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP force-pushed the feat/read-component-descriptor-from-oci-registry branch from 76ac242 to 27622a0 Compare October 23, 2025 23:15
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP enabled auto-merge (squash) October 28, 2025 13:28
Copy link
Contributor

@c-pius c-pius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I admit that the sheer size of this PR reduces my confidence that everything is okay. It's just hard to really understand everything that is going on. But I think it should be good, we need to get forward at some point.

Let's be careful when this is rolled out. We should explicitly observe how it is working on DEV first. Maybe via a PR-deploy so that it isn't promoted to STAGE automatically.

@lindnerby
Copy link
Member

Agree with the previous comment. Let's do an explicit rollout to DEV first via PR deploy. 👍

@c-pius
Copy link
Contributor

c-pius commented Oct 28, 2025

And thanks a lot @Tomasz-Smelcerz-SAP for all the effort you put into this!

@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP merged commit f7d93eb into kyma-project:main Oct 28, 2025
56 of 57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read component descriptor from oci registry

5 participants