Fix: Map diagram showing resources from other namespaces#704
Merged
gambtho merged 1 commit intoJun 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the Resource Map’s relation-building logic to avoid drawing edges between namespace-scoped resources that happen to share the same name/labels across different namespaces, which previously caused cross-namespace resources to appear/merge when filtering by namespace.
Changes:
- Added a namespace equality guard inside
makeRelationso relations only connect namespaced objects within the same namespace.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: tejhan-diallo <tejhan.diallo@gmail.com>
4f981ce to
2c1301e
Compare
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
This PR adds a namespace guard to
makeRelationso that for namespace-scoped resources, edges are only drawn if they're in the same namespace. Previously we only matched by name/label, causing resources with identical names in different namespaces to be merged and shown under one namespace component in the view.Resolves issue
Type of Change
Related Issues
Closes #621
Changes Made
makeRelationto prevent cross-namespace edges being drawn for identically named resources.Testing
Test Cases
Describe the test cases that were run: