[internal/k8sinventory] Extract checkpoint package and update Observer interface - #48765
Merged
Merged
Conversation
kangyili
force-pushed
the
k8sobject/component
branch
from
May 29, 2026 14:53
c6d70c3 to
0783548
Compare
kangyili
marked this pull request as ready for review
May 29, 2026 15:04
kangyili
requested review from
a team,
ChrsMark,
TylerHelmuth and
dmitryax
as code owners
May 29, 2026 15:04
…tor-contrib into k8sobject/component
jmmcorreia
reviewed
Jun 19, 2026
ChrsMark
reviewed
Jul 1, 2026
ChrsMark
left a comment
Member
There was a problem hiding this comment.
LGTM overall and apologies for the delay. Left 2 comments about some error handling but other than this it looks good to me.
@TylerHelmuth @dmitryax PTAL
Member
|
@dhruv-shah-sumo your input would be appreciated |
jmmcorreia
approved these changes
Jul 7, 2026
Member
|
I'm planning to merge this by EOW if there are no objections. |
krisztianfekete
approved these changes
Jul 7, 2026
Member
|
@kangyili could you please rebase this one? Once it's rebased we can merge it. |
Contributor
Apologies for the late response. I was away for the last few weeks. The changes look good to me. No concerns in terms of checkpointer method changes. |
Resolved conflict in receiver/k8sobjectsreceiver/receiver.go: kept our error handling for startObserver while incorporating upstream's mu.Lock() addition before stopperChanList append. Assisted-by: Claude Sonnet 4.6
Contributor
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Preparatory refactor split from #48663 to keep that PR reviewable.
This PR introduces no behavioral changes, it only refactors code required for the
informeradoption on k8s_objects receiver.watch/checkpointer.gowas private to the watch package but the incoming informer-based observer also needs it. Promoted to a sharedinternal/k8sinventory/checkpointpackage — behavior unchanged.Load()andAlreadySeen()to theCheckpointerwhich will be used by the informer changes.Observer.Startreturnserror: the informer does synchronous initialization before returning (cache sync), which can time out or fail. Returning (chan struct{}, error) lets the receiver fail fast with a clear signal rather than silently continuing with a broken observer. The old observers had no synchronous initialization, so this interface change was necessary to surface failures from the new one.Link to tracking issue
#43602