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

Make Kedro-Viz shareable via a hosted URL #1487

Merged
merged 165 commits into from
Oct 10, 2023
Merged

Conversation

tynandebold
Copy link
Member

@tynandebold tynandebold commented Aug 15, 2023

Description

Closes #1116

Development notes

This PR enables Viz to be published and hosted on AWS S3.

For the frontend, most changes exist in shareable-url-modal.js. On the deployed version, we show a timestamp for context, which comes from the shareable-url-metadata.js file.

A new feature hint for the Sharable URLs button is added in feature-hints-content.js. I've also updated feature-hints.js to remove that feature hint from the deployed version, since it doesn't make sense for the user to see it there.

QA notes

Important

You don't need to review any Python files in this PR (nothing inside /package)!!! That review will be done in #1498.

To get setup to test this locally:

  • Install fsspec version 2023.9.0 or greater.
  • Ensure you're running kedro version 18.2.0 or greater.
  • You'll need access to an AWS S3 bucket and know the following information:
    • Access key
    • Secret access key
    • Bucket region
    • Bucket name
  • Enable static website hosting on your S3 bucket and then make the objects public so you'll be able to view Viz when it's deployed
  • Set your access keys in your terminal, and then run make run.
  • Then run the frontend with npm start.
  • The deploy button is in the lower-left, between the theme toggle and settings icon.

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

rashidakanchwala and others added 30 commits February 17, 2023 12:45
Signed-off-by: Rashida Kanchwala <rashida_kanchwala@mckinsey.com>
Signed-off-by: Rashida Kanchwala <rashida_kanchwala@mckinsey.com>
…dro-viz into kedro-viz-save-load

Signed-off-by: Rashida Kanchwala <rashida_kanchwala@mckinsey.com>
Signed-off-by: Rashida Kanchwala <rashida_kanchwala@mckinsey.com>
Signed-off-by: Rashida Kanchwala <rashida_kanchwala@mckinsey.com>
Signed-off-by: Rashida Kanchwala <rashida_kanchwala@mckinsey.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
…ature/shareable-urls

Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
…ove WS/subscription code

Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
…/kedro-viz into feature/shareable-urls

Signed-off-by: Tynan DeBold <thdebold@gmail.com>
…ature/shareable-urls

Signed-off-by: Tynan DeBold <thdebold@gmail.com>
…kedro-viz into feature/shareable-urls

Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
tynandebold and others added 4 commits October 3, 2023 13:17
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
…/kedro-viz into feature/shareable-urls

Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Copy link
Contributor

@ravi-kumar-pilla ravi-kumar-pilla left a comment

Choose a reason for hiding this comment

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

I have made few suggestions, none of them is a blocking change. Looks great !

RELEASE.md Outdated Show resolved Hide resolved
package/kedro_viz/api/rest/router.py Show resolved Hide resolved
src/config.js Show resolved Hide resolved
* fix telemetry for sharaeable viz

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

* fix lint issue

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

---------

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Co-authored-by: Tynan DeBold <thdebold@gmail.com>
import gql from 'graphql-tag';

/** subscribe to receive new runs */
export const NEW_RUN_SUBSCRIPTION = gql`
Copy link
Contributor

Choose a reason for hiding this comment

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

@tynandebold - Since we are removing this subscription feature from Experiment Tracking I think it should have it's own PR. So in the future, incase we want to add it back or we want to explore this again, there's history. Especially because based on this subscription feature we were planning other features like auto-reload on Collab Experiment Tracking and so on.

Right now because it's part of Shareable-viz -- it is not obvious.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair enough.

Please review this today, if you can: #1554

Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

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

I have gone through the code and suggested some changes.

Signed-off-by: Tynan DeBold <thdebold@gmail.com>
…/kedro-viz into feature/shareable-urls

Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
Signed-off-by: Tynan DeBold <thdebold@gmail.com>
@@ -15,7 +16,10 @@ import './feature-hints.scss';

const localStorageKeyShowHints = 'showFeatureHints';
export const localStorageKeyFeatureHintsStep = 'featureHintStep';
const numFeatureHints = featureHintsContent.length;
const updatedFeatureHintsContent = isRunningLocally()
Copy link
Contributor

@rashidakanchwala rashidakanchwala Oct 5, 2023

Choose a reason for hiding this comment

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

This is not a blocker but just for clarity-- from what I understand 'Publish and share Kedro-viz' feature hint shouldn't show in the deployed version and hence we have to write this code.

But this feature hint only gets shown when the user hovers over the 'deploy button' and there won't be any deploy button in the hosted version, so why do we still need to have this check here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because even if the indicator dot isn't there the content in the card would still exist.

Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

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

Thanks for this!

…ature/shareable-urls

Signed-off-by: Tynan DeBold <thdebold@gmail.com>
@tynandebold tynandebold merged commit a185d5a into main Oct 10, 2023
19 checks passed
@tynandebold tynandebold deleted the feature/shareable-urls branch October 10, 2023 11:09
@tynandebold tynandebold mentioned this pull request Oct 10, 2023
5 tasks
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.

Shareable URLs for Kedro-Viz
6 participants