feat: provide de-duplicated secondary resources stream on Context - #3141
Merged
Merged
Conversation
metacosm
requested review from
csviri and
xstefank
and removed request for
xstefank
January 29, 2026 22:12
xstefank
approved these changes
Jan 30, 2026
csviri
requested changes
Jan 30, 2026
|
|
||
| default <R> Stream<R> getSecondaryResourcesAsStream(Class<R> expectedType) { | ||
| return getSecondaryResources(expectedType).stream(); | ||
| return getSecondaryResourcesAsStream(expectedType, false); |
Collaborator
There was a problem hiding this comment.
Here we could use the former implementation and call this in case in the new method the deduplication is false.
metacosm
force-pushed
the
latest-distinct-alternative
branch
from
February 2, 2026 13:31
fdfaa63 to
3c9de5c
Compare
metacosm
marked this pull request as ready for review
February 2, 2026 13:32
metacosm
commented
Feb 2, 2026
| } | ||
| return stream | ||
| .collect( | ||
| Collectors.toUnmodifiableMap( |
Collaborator
Author
There was a problem hiding this comment.
In the end, I couldn't make the implementation work without collecting to Map, I iterated over the code and ended collecting manually…
metacosm
force-pushed
the
latest-distinct-alternative
branch
4 times, most recently
from
February 2, 2026 17:33
afa2dc8 to
7158917
Compare
csviri
approved these changes
Feb 3, 2026
csviri
left a comment
Collaborator
There was a problem hiding this comment.
Added some nits, pls make the CI happy, otherwise LGTM!
|
|
||
| /** | ||
| * Whether this ResourceID points to the same resource as the one identified by the specified name | ||
| * and namespace. Note that this doesn't take API version or Kind into account so this should only |
Collaborator
There was a problem hiding this comment.
nit: does not take Group either.
Collaborator
Author
There was a problem hiding this comment.
Yeah, didn't want to get into all the details 😅
Actually planning on adding this to HasMetadata in the client.
| var updatedResource = | ||
| extension.get(LatestDistinctTestResource.class, TEST_RESOURCE_NAME); | ||
| assertThat(updatedResource.getStatus()).isNotNull(); | ||
| // Should see 3 distinct ConfigMaps |
Collaborator
There was a problem hiding this comment.
This comment needs ro be adjusted
Signed-off-by: Chris Laprun <[email protected]>
metacosm
force-pushed
the
latest-distinct-alternative
branch
from
February 3, 2026 10:19
7158917 to
a128bd7
Compare
This was referenced Feb 3, 2026
Closed
csviri
added a commit
that referenced
this pull request
Feb 4, 2026
) Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Attila Mészáros <[email protected]>
csviri
added a commit
that referenced
this pull request
Feb 16, 2026
) Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Attila Mészáros <[email protected]>
csviri
added a commit
that referenced
this pull request
Feb 28, 2026
) Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Attila Mészáros <[email protected]>
csviri
added a commit
that referenced
this pull request
Mar 6, 2026
) Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Attila Mészáros <[email protected]>
csviri
added a commit
that referenced
this pull request
Mar 13, 2026
) Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Attila Mészáros <[email protected]>
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.
Alternative to #3130, to discuss