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

Optimize our GitPod setup #2586

Closed
noklam opened this issue May 16, 2023 · 7 comments
Closed

Optimize our GitPod setup #2586

noklam opened this issue May 16, 2023 · 7 comments
Labels
Component: DevOps Issue/PR that addresses automation, CI, GitHub setup

Comments

@noklam
Copy link
Contributor

noklam commented May 16, 2023

Description

Is your feature request related to a problem? A clear and concise description of what the problem is: "I'm always frustrated when ..."

Our GitPod setup has not been working for a while. #2585 is the quick fix but we can do better. In #2585 @astrojuanlu mentioned he use a custom Docker and we can do something similar for this repostory.

Context

Why is this change important to you? How would you use it? How can it benefit other users?
GitPod is quite useful for review & testing purposes, the current setup is slow and broken.

Possible Implementation

We might be able to use a custom Docker setup, but this requires some investigation into how it works and if that's the best approach.

Possible Alternatives

@noklam noklam added the Issue: Feature Request New feature or improvement to existing feature label May 16, 2023
@noklam
Copy link
Contributor Author

noklam commented Jun 5, 2023

Just to add more, I tried to build docs on GitPod last week and it doesn't seem to work.

@merelcht merelcht added Component: DevOps Issue/PR that addresses automation, CI, GitHub setup and removed Issue: Feature Request New feature or improvement to existing feature labels Jun 5, 2023
@astrojuanlu
Copy link
Member

I've talked about this with @antonymilne a couple of times but sadly I never got the time to dive deep into why things are the way they are at the moment. I know there are some weirdnessess on how Gitpod pre-caches some things:

kedro/.gitpod.yml

Lines 4 to 13 in 64b7960

# We want packages installed during the pre-build init steps to go to /workspace
# rather than ~ so that they are persisted. Gitpod sets PIP_USER=yes to ensure this,
# but pre-commit requires PIP_USER=no. Hence we set PIP_USER=no and use
# pip install --user to install to /workspace.
- name: kedro
before: |
echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no
init: |
make sign-off
pip install -r test_requirements.txt --user

image

(More info at https://www.gitpod.io/docs/configure/workspaces/tasks, https://www.gitpod.io/docs/configure/projects/prebuilds)

I'm all for simplifying the setup or having a custom Docker image as I'm doing with my workshops https://github.com/astrojuanlu/workshop-jupyter-kedro/blob/ce202c7d1164d9e5b6aa331320b32a4f1a342407/.gitpod.yml#L1-L2 but we should not do it carelessly.

At the same time, if the current setup doesn't work, it doesn't matter much if it's optimized.

@astrojuanlu
Copy link
Member

pyenv shims unfortunately make all this even more complicated 😬

@noklam
Copy link
Contributor Author

noklam commented Jun 12, 2023

At this point I would favor anything that works but slow over the current setup.

For example when I open gitpod, I have to wait 10 minutes for the setup now and the pre-commit env is broken. If I run pre-commit run I get weird error I have to uninstall virtualenv and reinstall it to fix the issue. So I have to wait 10 minutes and do this manual steps often the I let GitPod hang for too long and the workspace become inactive again, it just become unusable.

The prebuild is not happening at all, I don't know if there is a easy way that we can fix it, it does requires admin permission and I don't have it.

In addition, I would like to get this https://www.gitpod.io/for/opensource if possible, I try to apply this before but never receive any follow-up.

@astrojuanlu
Copy link
Member

@noklam you mentioned #2688 is not a complete fix, what else do you think is needed?

@noklam
Copy link
Contributor Author

noklam commented Jul 20, 2023

It's functional now but not optimised, spinning a gitpod instance takes 10 minutes.

It would be great if can fix the pre-built so it doesn't fetch the whole docker image every time.

@astrojuanlu astrojuanlu changed the title Fix our GitPod setup Optimize our GitPod setup Jul 21, 2023
@astrojuanlu
Copy link
Member

I'm hoping that uv makes further optimisations unnecessary for now? Closing, but feel free to reopen if you disagree

@astrojuanlu astrojuanlu closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: DevOps Issue/PR that addresses automation, CI, GitHub setup
Projects
Archived in project
Development

No branches or pull requests

3 participants