-
Notifications
You must be signed in to change notification settings - Fork 113
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
Kedro Viz Static Website Hosting on GCP #1711
Kedro Viz Static Website Hosting on GCP #1711
Conversation
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: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>
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: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>
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: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>
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: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>
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: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>
Is this ready to be reviewed? |
Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>
Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>
if content_type is None: # pragma: no cover | ||
continue | ||
|
||
relative_path = local_file_path[len(str(html_dir)) + 1 :] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gives the relative path of the files to build the remote path. i.e.,
local_file_path -> Path(file).parent.parent.parent.absolute()/html/static/js/main.9a9b73c9.chunk.js
relative_path -> static/js/main.9a9b73c9.chunk.js
self._path -> {GCP_PROTOCOL}://{bucket-name}
remote path -> {self._path}/{relative_path}
@@ -67,7 +67,7 @@ def _write_heap_injected_index(self, html_content): | |||
with open(temp_file_path, "w", encoding="utf-8") as temp_index_file: | |||
temp_index_file.write(html_content) | |||
|
|||
self._fs.put(temp_file_path, f"{self._path}/") | |||
self._fs.put(temp_file_path, f"{self._path}/", content_type="text/html") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it works for all deployers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it works for AWS, GCP and local. AzureDeployer has its own _write_heap_injected_index
method
8f5a152
into
feature/shareableviz-extended-support
* refactor router to accept new deployer inputs (#1739) Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * Refactor Shareableviz CLI (#1740) * refactor router to accept new deployer inputs Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * refactor cli for shareableviz deploy Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * merge router change Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * PR comments fix Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> --------- Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * Kedro Viz Static Website hosting on Azure (#1708) * CLI command kedro viz build added * Lint fix * lint fix * Lint fix * add mypy ignore * Missing build file added * Lint error fix * BaseDeployer class added * Unused code removed * Fix lint issue * azure deploy initial draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * added base_deployer * add deployer factory * partial working draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * Test and comments of deployers updated * test draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix lint Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove circular dependency Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix lint Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * revert back consent Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * minor updates Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * update pytests Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add pytest for azure shareableviz Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * refactor and add timeout Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * refactor cli Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * update pytest Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add release note Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix PR comments and flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * testing flaky c y test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * resolve conflicts Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix PR comments Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add back cypress flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove cypress flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove duplicate pytest parameter Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove fsspec upper bound Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> --------- Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> Co-authored-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com> Co-authored-by: rashidakanchwala <rashida_kanchwala@mckinsey.com> * Kedro Viz Static Website Hosting on GCP (#1711) * CLI command kedro viz build added * Lint fix * lint fix * Lint fix * add mypy ignore * Missing build file added * Lint error fix * BaseDeployer class added * Unused code removed * Fix lint issue * azure deploy initial draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * added base_deployer * add deployer factory * partial working draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * Test and comments of deployers updated * test draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix lint Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove circular dependency Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix lint Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * revert back consent Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * initial draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * minor updates Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * update pytests Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add pytest for azure shareableviz Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * refactor and add timeout Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * refactor cli Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * update pytest Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add release note Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix PR comments and flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * testing flaky c y test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add pytest for gcp Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix gcp pytest coverage Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix lint Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * update pytest Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * revert file permission change --------- Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> Co-authored-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com> Co-authored-by: rashidakanchwala <rashida_kanchwala@mckinsey.com> * Sharable Kedro-Viz UI for AWS, GCP and Azure (#1718) * shareable viz with multiple platform UI * test fix * Relative path fix for user entered url * Test updated * Test updated * UI alignment and endpoint help text added. Signed-off-by: <> * Add Kedro-Viz documentation URLs and update modal content Signed-off-by: <> * Code review suggestions added Signed-off-by: <> * Refactor form field names in ShareableUrlModal component Signed-off-by: <> * Add cursor style to input field in shareable-url-modal.js Signed-off-by: <> * Add cursor style to input field in shareable-url-modal.js Signed-off-by: <> * Variable names updated. Signed-off-by: <> * add exception handlers Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * Disclaimer note added and shareable-url-modal component refactored by moving major jsx to other file Signed-off-by: <> * Wrapped the prop methods with useCallback Signed-off-by: <> * info text updated. Signed-off-by: <> * Test fixed Signed-off-by: <> * test fix and rearranging jsx Signed-off-by: <> * Cypress test fix Signed-off-by: <> * button text updated Signed-off-by: <> * Keeping button text as Publish for a link seetings Signed-off-by: <> --------- Signed-off-by: <> Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> Co-authored-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * Kedro-viz doc link added in disclaimer note. Signed-off-by: <> --------- Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> Signed-off-by: <> Co-authored-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com> Co-authored-by: rashidakanchwala <rashida_kanchwala@mckinsey.com> Co-authored-by: Jitendra Gundaniya <38945204+jitu5@users.noreply.github.com>
…dular pipelines flag (#1799) * shareable viz with multiple platform UI * test fix * Relative path fix for user entered url * Test updated * Test updated * refactor router to accept new deployer inputs (#1739) Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * Refactor Shareableviz CLI (#1740) * refactor router to accept new deployer inputs Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * refactor cli for shareableviz deploy Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * merge router change Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * PR comments fix Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> --------- Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * Kedro Viz Static Website hosting on Azure (#1708) * CLI command kedro viz build added * Lint fix * lint fix * Lint fix * add mypy ignore * Missing build file added * Lint error fix * BaseDeployer class added * Unused code removed * Fix lint issue * azure deploy initial draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * added base_deployer * add deployer factory * partial working draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * Test and comments of deployers updated * test draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix lint Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove circular dependency Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix lint Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * revert back consent Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * minor updates Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * update pytests Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add pytest for azure shareableviz Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * refactor and add timeout Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * refactor cli Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * update pytest Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add release note Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix PR comments and flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * testing flaky c y test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * resolve conflicts Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix PR comments Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add back cypress flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove cypress flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove duplicate pytest parameter Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove fsspec upper bound Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> --------- Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> Co-authored-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com> Co-authored-by: rashidakanchwala <rashida_kanchwala@mckinsey.com> * Kedro Viz Static Website Hosting on GCP (#1711) * CLI command kedro viz build added * Lint fix * lint fix * Lint fix * add mypy ignore * Missing build file added * Lint error fix * BaseDeployer class added * Unused code removed * Fix lint issue * azure deploy initial draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * added base_deployer * add deployer factory * partial working draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * Test and comments of deployers updated * test draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix lint Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove circular dependency Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix lint Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * revert back consent Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * initial draft Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * minor updates Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * update pytests Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add pytest for azure shareableviz Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * refactor and add timeout Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * refactor cli Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * update pytest Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add release note Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix PR comments and flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * testing flaky c y test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * remove flaky test Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * add pytest for gcp Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix gcp pytest coverage Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * fix lint Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * update pytest Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> * revert file permission change --------- Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> Co-authored-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com> Co-authored-by: rashidakanchwala <rashida_kanchwala@mckinsey.com> * Initial commit * Set query params from local storage on load * Test fix * test fix * Test fixes * Some method docs added. * Shortening existing URL query params focused_id, selected_id, selected_name and pipeline_id * Fix experiment tracking search query test * Clear filter button added * Missing test added * Release note added * Clear to Reset * Release note & retain qparams updated * fixes * almost done * missing nodeTypes added * URL Params handling moved to user-generated-pathname.js * Review suggestion added * getKeysByValue moved * updateStateWithFilters renamed * Reset button status check removed * Reset buton status test removed * Reset button status check revert * Reset button UI update * code review suggestions for reset button status * state compare for nodeTypes * On group filter click fix * Task to node mapping added * All nodeTypes match UI labels with URLparmas * Removed console.log * modified test as per query param name update --------- Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com> Co-authored-by: Ravi Kumar Pilla <ravi_kumar_pilla@mckinsey.com> Co-authored-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
Description
Resolves #1675
Development notes
NOTE: This will be merged into the branch
feature/shareableviz-extended-support
after #1708QA notes
Setup Environment for GCP
Authorizing via Service Account Key
On GCP Console
On command line before running kedro viz deploy
Set environment variable
GOOGLE_APPLICATION_CREDENTIALS
to the downloaded key file's absolute path.Run deploy command
kedro viz deploy --platform=gcp endpoint=test-endpoint --bucket-name=shareableviz
Note:
Checklist
RELEASE.md
file