Skip to content

fix: wire event recorder into initializingworkspaces cluster - #117

Open
2mind wants to merge 1 commit into
kcp-dev:mainfrom
2mind:fix/initializingworkspaces-recorder
Open

2mind wants to merge 1 commit into
kcp-dev:mainfrom
2mind:fix/initializingworkspaces-recorder

Conversation

@2mind

@2mind 2mind commented Sep 23, 2026 •

Copy link
Copy Markdown

Summary

The initializingworkspaces provider discarded the event recorder
(_ recorder.EventRecorderGetter) and NewScopedInitializingCluster never set
the eventRecorderGetter field, leaving it nil. Any subsequent
GetEventRecorderFor/GetEventRecorder call dereferences the nil getter and
panics, crashing the kcp init-agent reconciler on every workspace reconcile.
The workspace then stays Initializing indefinitely (the InitTemplate is never
applied) — a functional blocker, not just noisy logs.

Pass the recorder through initializingworkspaces and set the field in
NewScopedInitializingCluster, mirroring NewScopedCluster.

What Type of PR Is This?

/kind bug
/kind api-change

Related Issue(s)

Fixes kcp-dev/init-agent#25

Release Notes

Fix a nil event recorder panic in the initializingworkspaces provider

The initializingworkspaces provider discarded the event recorder
(_ recorder.EventRecorderGetter) and NewScopedInitializingCluster did not
set the eventRecorderGetter field, leaving it nil. Any subsequent
GetEventRecorderFor/GetEventRecorder call dereferences the nil getter and
panics, which crashes the init-agent reconciler (kcp-dev/init-agent#25).

Pass the recorder through and set the field, mirroring NewScopedCluster.

Signed-off-by: Nikita Aboltin <aboltin.nikita@rwb.ru>
@kcp-ci-bot kcp-ci-bot added dco-signoff: yes Indicates the PR's author has signed the DCO. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 23, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign scheeles for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kcp-ci-bot kcp-ci-bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 23, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

Hi @2mind. Thanks for your PR.

I'm waiting for a kcp-dev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kcp-ci-bot kcp-ci-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 23, 2026
@embik

embik commented Sep 24, 2026

Copy link
Copy Markdown
Member

Hi @2mind, thank you for the contribution! Can you please restore the PR description format (see here) and fill it in, so that your PR gets a release note? Thanks.

@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 24, 2026
@2mind

2mind commented Sep 24, 2026

Copy link
Copy Markdown
Author

/kind bug
/kind api-change

@kcp-ci-bot kcp-ci-bot added kind/bug Categorizes issue or PR as related to a bug. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 24, 2026
@2mind

2mind commented Sep 24, 2026

Copy link
Copy Markdown
Author

@embik done — the description follows the template now and includes a release note.

@2mind

2mind commented Oct 26, 2026

Copy link
Copy Markdown
Author

Friendly ping — the PR description was fixed per @embik's request on Sep 24, still awaiting review. Context: we run a patched init-agent build downstream (this fix + kcp-dev/init-agent#34) and would like to return to the upstream image once both land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic: nil pointer dereference in events recorder during reconcile

3 participants