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

Setting up DevContainers to QA Kedro-Viz on Codespaces #2292

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

rashidakanchwala
Copy link
Contributor

@rashidakanchwala rashidakanchwala commented Mar 4, 2025

Description

Resolves #2270

This PR adds the dev container setup in Codespaces to streamline the QA process for Kedro-Viz. Inside the dev container it does the following

Builds the frontend using make build to get the latest static assets.
Installs Kedro-Viz as an editable package with pip install -e package.
Builds the demo project using kedro viz build.
Serves the static build using python -m http.server.

To learn more about Dev Containers - https://www.gitpod.io/docs/flex/configuration/devcontainer

QA notes

Click on 'Code', then create a 'Codespace' or use an existing active one. And let it rebuild your codespace. Then it will create a port at the end of it, you can go to it and access the Kedro Viz link.

Screenshot 2025-03-06 at 15 30 34

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

astrojuanlu and others added 20 commits February 13, 2025 13:39
Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
Signed-off-by: rashidakanchwala <37628668+rashidakanchwala@users.noreply.github.com>
Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
@rashidakanchwala rashidakanchwala marked this pull request as ready for review March 4, 2025 14:33
@rashidakanchwala rashidakanchwala requested a review from jitu5 as a code owner March 4, 2025 14:33
@rashidakanchwala rashidakanchwala changed the title Dev containers Setting up DevContainers to QA Kedro-Viz on Codespaces Mar 4, 2025
Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
@jitu5
Copy link
Contributor

jitu5 commented Mar 4, 2025

@rashidakanchwala Do we have new Codespace for every change we make in feature branch ?

@@ -62,7 +62,7 @@ export const FlowchartPrimaryToolbar = ({
className={'pipeline-menu-button--labels'}
dataTest={`sidebar-flowchart-labels-btn-${textLabels}`}
icon={LabelIcon}
labelText={`${textLabels ? 'Hide' : 'Show'} text labels`}
labelText={`${textLabels ? 'Hide' : 'Show'} text labelssss`}
Copy link
Contributor

Choose a reason for hiding this comment

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

Before we merge this, please revert to labels 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I have just kept it for ppl to review so we know there's a difference, shall remove before I merge

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Huongg , i will delete this after u approve.

@astrojuanlu
Copy link
Member

Do you folks know what's the best way to test this on Gitpod Flex? I tried creating a new environment but it sort of gets stuck

image

@astrojuanlu
Copy link
Member

Testing this on GitHub Codespaces and it almost works, but (1) the 8000 port wasn't automatically forwarded (I had to do it myself) and (2) it still didn't quite work

image

(Also, the Creating an optimized production build... takes a while)

@rashidakanchwala
Copy link
Contributor Author

rashidakanchwala commented Mar 5, 2025

Ok, it worked for both Jitendra and I. There's a way to do it using Codespaces. We have our call tomm; maybe we can screenshare and I can show you. Basically we have to wait for all the processing to be done --the port doesn't immediately become available. Once it does you can click on the link and it works.

Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
CONTRIBUTING.md Outdated

**1. Once you open a pull request, click on the `Open` icon on the right**
<img width="1510" alt="Screenshot 2024-04-17 at 15 54 36" src="https://github.com/kedro-org/kedro-viz/assets/32060364/4295e00f-f80d-46e5-bb19-336e393f00a5">
1. Open a GitHub Codespace
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'Codespace'?

<img width="1510" alt="Screenshot 2024-04-17 at 15 54 36" src="https://github.com/kedro-org/kedro-viz/assets/32060364/4295e00f-f80d-46e5-bb19-336e393f00a5">
1. Open a GitHub Codespace
- Navigate to your branch and click on the Code button.
- Select the Codespaces tab.
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'Codespaces'?

1. Open a GitHub Codespace
- Navigate to your branch and click on the Code button.
- Select the Codespaces tab.
- Create a new Codespace or open an existing one.
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'Codespace'?


2. Codespace Initialization
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'Codespace'?


2. Codespace Initialization
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.ukspelling] In general, use UK English spelling instead of 'Initialization'.


2. Codespace Initialization
- If this is your first time opening the Codespace, it will start rebuilding your development container.
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'Codespace'?


2. Codespace Initialization
- If this is your first time opening the Codespace, it will start rebuilding your development container.
- If you have used it before, the dev container setup will already be available.
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'dev'?

**3. Please wait until the frontend and backend builds are successful. You can check it by clicking on `frontend` and `backend` tabs in the terminal. (Estimated build time : 5 minutes)**
<img width="1455" alt="Screenshot 2024-04-17 at 15 59 46" src="https://github.com/kedro-org/kedro-viz/assets/32060364/ae080672-4a48-4178-b83e-70274071497f">
<img width="1456" alt="Screenshot 2024-04-17 at 16 04 38" src="https://github.com/kedro-org/kedro-viz/assets/32060364/af60ea0a-6148-4354-938e-3a0ef7b9e711">
4. Rebuilding the Dev Container
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'Dev'?

- Navigate to the Ports tab.
- Click on the relevant port to access the running UI.

Your UI should now be running in GitHub Codespaces, ready for testing!
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'Codespaces'?


**1. Once you open a pull request, click on the `Open` icon on the right**
<img width="1510" alt="Screenshot 2024-04-17 at 15 54 36" src="https://github.com/kedro-org/kedro-viz/assets/32060364/4295e00f-f80d-46e5-bb19-336e393f00a5">
1. Open a GitHub Codespaces
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'Codespaces'?

rashidakanchwala and others added 3 commits March 7, 2025 10:08
Signed-off-by: rashidakanchwala <37628668+rashidakanchwala@users.noreply.github.com>
Signed-off-by: rashidakanchwala <37628668+rashidakanchwala@users.noreply.github.com>
Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
@@ -14,4 +14,5 @@ jobs:
- uses: actions/checkout@v4
- uses: errata-ai/vale-action@reviewdog
with:
fail_on_error: false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i just added this check because vale shouldn't fail our PRs but it should highlight the grammar mistakes

@rashidakanchwala rashidakanchwala requested a review from Huongg March 7, 2025 10:18
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.

Hey, I tested it, and everything works fine on my end. @rashidakanchwala, thanks for updating it! Just one note: the Vale comments appear on the main review page instead of in the "Files changed" section. This might not be caused by this PR, so let's go ahead and merge it once you're happy to do so. If we notice the same issue in other PRs, we can look into fixing it.

rashidakanchwala and others added 3 commits March 7, 2025 14:31
Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
- Enable Kedro-Viz in VSCode to list pipelines using the filter icon. (#2269)

## Bug fixes and other changes

- Add ESM bundle for Kedro-Viz. (#2268)
- Fix `%run_viz` using old process in jupyter notebook. (#2267)
- Make Kedro-Viz compatible with the new `KedroDataCatalog`. (#2274)
- Add Dev Containers to QA Kedro-Viz on Github Codespaces. (#2292)
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'Dev'?

- Enable Kedro-Viz in VSCode to list pipelines using the filter icon. (#2269)

## Bug fixes and other changes

- Add ESM bundle for Kedro-Viz. (#2268)
- Fix `%run_viz` using old process in jupyter notebook. (#2267)
- Make Kedro-Viz compatible with the new `KedroDataCatalog`. (#2274)
- Add Dev Containers to QA Kedro-Viz on Github Codespaces. (#2292)
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'Github'?

- Enable Kedro-Viz in VSCode to list pipelines using the filter icon. (#2269)

## Bug fixes and other changes

- Add ESM bundle for Kedro-Viz. (#2268)
- Fix `%run_viz` using old process in jupyter notebook. (#2267)
- Make Kedro-Viz compatible with the new `KedroDataCatalog`. (#2274)
- Add Dev Containers to QA Kedro-Viz on Github Codespaces. (#2292)
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Kedro-viz.Spellings] Did you really mean 'Codespaces'?

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.

Create a QA Environment for Testing Kedro-Viz
4 participants