Skip to content

feat: component version resolution service#1055

Merged
jakobmoellerdev merged 25 commits into
open-component-model:mainfrom
Skarlso:migrate-config-and-context-part-2
Oct 29, 2025
Merged

feat: component version resolution service#1055
jakobmoellerdev merged 25 commits into
open-component-model:mainfrom
Skarlso:migrate-config-and-context-part-2

Conversation

@Skarlso

@Skarlso Skarlso commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

TODOs:

  • Cache key invalidation and TTL

Part of open-component-model/ocm-project#692.

Which issue(s) this PR fixes

@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/l Large labels Oct 17, 2025
@Skarlso Skarlso force-pushed the migrate-config-and-context-part-2 branch from 20cc2d8 to a6064a1 Compare October 17, 2025 12:00
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>

remove error results from the cache and return them

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the migrate-config-and-context-part-2 branch from 8b3f151 to f17bee2 Compare October 17, 2025 13:49
Comment thread kubernetes/controller/resolution/service.go Outdated
Comment thread kubernetes/controller/internal/resolution/service.go Outdated
Comment thread kubernetes/controller/internal/resolution/service.go Outdated
Comment thread kubernetes/controller/internal/resolution/service.go Outdated
Comment thread kubernetes/controller/internal/resolution/service.go Outdated
Comment thread kubernetes/controller/internal/resolution/workers.go Outdated
Comment thread kubernetes/controller/internal/resolution/workers.go Outdated
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the migrate-config-and-context-part-2 branch from 530b966 to 1728e0a Compare October 19, 2025 12:08
…roller

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the migrate-config-and-context-part-2 branch from 1728e0a to ec423ab Compare October 19, 2025 12:12
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso

Skarlso commented Oct 19, 2025

Copy link
Copy Markdown
Contributor Author

I had two implementations. The current one is a second implementation attempt I'm trying. I extracted the workerpool from the resolver. The resolver is really thin. While the workpool has most of the logic of resolving. Hope this is a bit clearer now. :)

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Comment thread kubernetes/controller/internal/resolution/cache.go Outdated
@Skarlso Skarlso force-pushed the migrate-config-and-context-part-2 branch from 5ee1f0a to 4ad0679 Compare October 20, 2025 06:29
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the migrate-config-and-context-part-2 branch from 4ad0679 to f71c0b6 Compare October 20, 2025 06:36
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the migrate-config-and-context-part-2 branch from a35f112 to 48196e4 Compare October 21, 2025 14:29
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the migrate-config-and-context-part-2 branch from 48196e4 to d9cb4e4 Compare October 21, 2025 14:37
Comment thread kubernetes/controller/internal/resolution/cache.go Outdated
Comment thread kubernetes/controller/Dockerfile Outdated
Comment thread kubernetes/controller/internal/resolution/types.go
Skarlso and others added 4 commits October 24, 2025 07:10
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Skarlso and others added 2 commits October 27, 2025 12:18
…functionality

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Comment thread kubernetes/controller/internal/plugins/plugin.go
Comment thread kubernetes/controller/cmd/main.go Outdated
Comment thread kubernetes/controller/cmd/main.go Outdated
Comment thread kubernetes/controller/internal/resolution/workers.go
Comment thread kubernetes/controller/internal/resolution/service.go Outdated
Comment thread kubernetes/controller/internal/resolution/workers_test.go Outdated
Comment thread kubernetes/controller/internal/resolution/workers_test.go Outdated
Comment thread kubernetes/controller/internal/resolution/workers_test.go Outdated
Comment thread kubernetes/controller/internal/resolution/workers_test.go Outdated
Comment thread kubernetes/controller/internal/resolution/service_test.go Outdated
Comment thread kubernetes/controller/internal/resolution/service_test.go Outdated
Comment thread kubernetes/controller/internal/resolution/workers_test.go Outdated
Comment thread kubernetes/controller/internal/resolution/workers_test.go Outdated
Comment thread kubernetes/controller/internal/resolution/workers_test.go Outdated
@Skarlso

Skarlso commented Oct 28, 2025

Copy link
Copy Markdown
Contributor Author

Okay, switch to synctest and it surfaced a problem. Singleflight was unable to ensure deduplication simply because if there was given time, it was called with the same key again and the other workers didn't clean up yet, the queue got the same work twice in it. We are going to remove singleflight and switch the inprogress tracking as it was before. Singleflight just didn't work in this setup.

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@jakobmoellerdev

Copy link
Copy Markdown
Member

this is fine. as long as you stick with one setup and it works youre good.

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the migrate-config-and-context-part-2 branch from 4c294b3 to a528fd3 Compare October 28, 2025 17:03
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the migrate-config-and-context-part-2 branch from a528fd3 to e2d38df Compare October 28, 2025 17:05
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso marked this pull request as ready for review October 29, 2025 08:50
@Skarlso Skarlso requested a review from a team as a code owner October 29, 2025 08:50
Comment thread kubernetes/controller/internal/resolution/doc.go
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the migrate-config-and-context-part-2 branch from 98be16d to 06875b9 Compare October 29, 2025 11:28
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@jakobmoellerdev jakobmoellerdev merged commit 46a0571 into open-component-model:main Oct 29, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature new feature, enhancement, improvement, extension size/l Large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants