Skip to content

chore: fix: finalize was missing from the octx context#799

Open
Skarlso wants to merge 11 commits into
open-component-model:mainfrom
Skarlso:memory-leak-investigation
Open

chore: fix: finalize was missing from the octx context#799
Skarlso wants to merge 11 commits into
open-component-model:mainfrom
Skarlso:memory-leak-investigation

Conversation

@Skarlso

@Skarlso Skarlso commented Dec 11, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Testable ghcr.io/open-component-model/ocm-controller:v0.28.0-memory-leak-test-1

Closes open-component-model/ocm-project#778.

Which issue(s) this PR is related to

frewilhelm
frewilhelm previously approved these changes Dec 11, 2025
morri-son
morri-son previously approved these changes Jan 26, 2026
@Skarlso Skarlso changed the title fix: finalize was missing from the octx context **DO NOT MERGE THIS YET**: fix: finalize was missing from the octx context Feb 2, 2026
@Skarlso Skarlso changed the title **DO NOT MERGE THIS YET**: fix: finalize was missing from the octx context DO NOT MERGE THIS YET: fix: finalize was missing from the octx context Feb 2, 2026
@Skarlso
Skarlso marked this pull request as draft February 2, 2026 11:17
@Skarlso
Skarlso force-pushed the memory-leak-investigation branch from e1d5ff3 to d7e20af Compare April 14, 2026 06:53
@Skarlso
Skarlso force-pushed the memory-leak-investigation branch from c1eece8 to 6690057 Compare June 1, 2026 08:15
Skarlso added 6 commits June 24, 2026 09:21
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.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>
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 memory-leak-investigation branch from 6690057 to ae1f5ab Compare June 24, 2026 07:27
@Skarlso Skarlso changed the title DO NOT MERGE THIS YET: fix: finalize was missing from the octx context chore: fix: finalize was missing from the octx context Jun 25, 2026
@Skarlso
Skarlso marked this pull request as ready for review June 25, 2026 08:28
Comment thread go.mod Outdated
Skarlso and others added 2 commits July 17, 2026 10:40
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Signed-off-by: Gergely Bräutigam <gergely.brautigam@sap.com>
@Skarlso
Skarlso force-pushed the memory-leak-investigation branch from e4a102f to 142fc2c Compare July 17, 2026 08:43

@frewilhelm frewilhelm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i think the PR desc could get a bit more love :D

Comment thread main.go
Comment on lines +83 to +88
flag.StringVar(
&pprofAddr,
"pprof-bind-address",
"",
"The address the pprof endpoint binds to. Disabled if empty.",
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do you want to leave that in?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would like to, yeah. It's optional. 🤔 and honestly, I'm debating to do something similar on k8s-toolkit. But akin to Kro's approach here: https://github.com/kubernetes-sigs/kro/blob/main/cmd/controller/pprof.go

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Uses a build flag instead of a command line argument https://github.com/kubernetes-sigs/kro/blob/main/cmd/controller/pprof_disabled.go.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed to Kro's approach. :)

Comment thread Dockerfile Outdated
@Skarlso

Skarlso commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

i think the PR desc could get a bit more love :D

But I'm already loving it... a LOT :D

Co-authored-by: Frederic Wilhelm <fre.wilhelm@gmail.com>
Signed-off-by: Gergely Bräutigam <skarlso777@gmail.com>
@Skarlso

Skarlso commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Will update the description as well in a sec. :)

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

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

memory leak in ocm controller 0.27.3

3 participants