Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update isRunningLocally Function to Recognise Private IP Addresses for Consistent GUI Rendering #2223

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

SajidAlamQB
Copy link
Contributor

@SajidAlamQB SajidAlamQB commented Dec 5, 2024

Description

Related to: #2198

This PR addresses an issue where Kedro-Viz does not display the full GUI when accessed via local private IP addresses (e.g., 192.168.x.x). We will update the isRunningLocally function to include private IP ranges defined in RFC 1918, to ensure consistent GUI rendering when accessing Kedro-Viz on local networks.

Development notes

Regular expressions have been added to match the following private IP ranges:

10.0.0.0 – 10.255.255.255
172.16.0.0 – 172.31.255.255
192.168.0.0 – 192.168.255.255

QA Notes

Local Access via localhost:

Run Kedro-Viz:

  • kedro viz run --host=0.0.0.0 --port=1008
  • Open http://localhost:1008 or http://127.0.0.1:1008 on your machine.
  • Expected: All local-only features (like the Experiment Tracking tab) should be visible and functional.

Local Access via IP:

  • Find your machine’s local IP (e.g., 192.168.1.40).
  • On the same machine, access http://192.168.1.40:1008.
  • Expected: All local-only features appear, just as they do with localhost.

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added new entries to the RELEASE.md file
  • Added tests to cover my changes

Signed-off-by: Sajid Alam <[email protected]>
@SajidAlamQB SajidAlamQB self-assigned this Dec 5, 2024
@SajidAlamQB SajidAlamQB marked this pull request as ready for review December 6, 2024 10:58
@SajidAlamQB SajidAlamQB requested a review from Huongg December 6, 2024 10:58
@Huongg
Copy link
Contributor

Huongg commented Dec 6, 2024

hey thanks @SajidAlamQB just a quick reminder to add this in the release note, and also can you also put a few notes in the QA steps please, eg: is there anything we should run locally to test this specifically?

@SajidAlamQB
Copy link
Contributor Author

hey thanks @SajidAlamQB just a quick reminder to add this in the release note, and also can you also put a few notes in the QA steps please, eg: is there anything we should run locally to test this specifically?

I've added it in the description:

Run Kedro-Viz:

Local Access via IP:

  • Find your machine’s local IP (e.g., 192.168.1.40).
  • On the same machine, access http://192.168.1.40:1008/.
  • Expected: All features appear, just as they do with localhost.

src/utils/index.js Outdated Show resolved Hide resolved
Copy link
Contributor

@jitu5 jitu5 left a comment

Choose a reason for hiding this comment

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

Thanks @SajidAlamQB

Copy link
Contributor

@Huongg Huongg left a comment

Choose a reason for hiding this comment

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

thank you @SajidAlamQB

Co-authored-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
@SajidAlamQB SajidAlamQB merged commit ae19e10 into main Dec 11, 2024
5 checks passed
@SajidAlamQB SajidAlamQB deleted the bugfix/add-standard-private-IPs-as-known-hosts branch December 11, 2024 09:42
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.

3 participants