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

fix: use correct uid/gid when cloning git repos #635

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

olevski
Copy link
Member

@olevski olevski commented Feb 6, 2025

This was hardcoded for the old sessions so we just re-used the same hardcoded values from v1 sessions. But for v2 we should take this info from the environment.

closes #629

/deploy

@olevski olevski requested a review from a team as a code owner February 6, 2025 14:17
@coveralls
Copy link

Pull Request Test Coverage Report for Build 13180787014

Details

  • 0 of 4 (0.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 86.558%

Changes Missing Coverage Covered Lines Changed/Added Lines %
components/renku_data_services/notebooks/blueprints.py 0 1 0.0%
components/renku_data_services/notebooks/core_sessions.py 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
components/renku_data_services/base_api/error_handler.py 1 89.47%
Totals Coverage Status
Change from base Build 13108744249: -0.01%
Covered Lines: 15384
Relevant Lines: 17773

💛 - Coveralls

Copy link
Member

@leafty leafty left a comment

Choose a reason for hiding this comment

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

Thanks! Let's deploy this to check that it works as intended.

@olevski olevski temporarily deployed to renku-ci-ds-635 February 6, 2025 16:24 — with GitHub Actions Inactive
@RenkuBot
Copy link
Contributor

RenkuBot commented Feb 6, 2025

You can access the deployment of this PR at https://renku-ci-ds-635.dev.renku.ch

Copy link
Member

@leafty leafty left a comment

Choose a reason for hiding this comment

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

The container to fix is git-clone. The git-proxy container should not be updated (it does not touch the file system).

This was hardcoded for the old sessions so we just re-used the same
hardcoded values from v1 sessions. But for v2 we should take this info
from the environment.
@olevski
Copy link
Member Author

olevski commented Feb 12, 2025

Well jupyter still does not work when you use non 1001 uid and gid. I see this error in the logs:

File "/opt/conda/lib/python3.11/pathlib.py", line 1116, in mkdir                                                                                                   │
│     os.mkdir(self, mode)                                                                                                                                             │
│ PermissionError: [Errno 13] Permission denied: '/home/jovyan/.local/share/jupyter/runtime'

But that is not our fault. At least we are doing the right thing and respecting the stuff the user setup. Some images will only work with specific uid/gid.

@olevski
Copy link
Member Author

olevski commented Feb 12, 2025

So I tested with vscode and that works with gid/uid 1001. See this project for example: https://renku-ci-ds-635.dev.renku.ch/v2/projects/tasko.olevski/test1

@olevski olevski requested a review from leafty February 12, 2025 15:10
Copy link
Member

@leafty leafty left a comment

Choose a reason for hiding this comment

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

LGTM Thanks 👍

@olevski olevski merged commit aee55d4 into main Feb 12, 2025
19 checks passed
@olevski olevski deleted the fix-use-correct-gid-uid branch February 12, 2025 16:26
@RenkuBot
Copy link
Contributor

Tearing down the temporary RenkuLab deplyoment for this PR.

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.

Sessions: git clone does not respect gid/uid the session will run as
4 participants