Skip to content

fix: error type when rejecting session start#1271

Open
leafty wants to merge 7 commits into
mainfrom
leafty/fix-reject-private-repo
Open

fix: error type when rejecting session start#1271
leafty wants to merge 7 commits into
mainfrom
leafty/fix-reject-private-repo

Conversation

@leafty

@leafty leafty commented Apr 24, 2026

Copy link
Copy Markdown
Member

Closes #1270.

/deploy renku=feat/private-repository-build renku-ui=feat/build-private-repositories extra-values=dataService.imageBuilders.enabled=true,dataService.imageBuilders.strategyName=renku-buildpacks-v3,dataService.imageBuilders.outputImagePrefix=harbor.dev.renku.ch/renku-ci-private-images-build-public-project/,dataService.imageBuilders.outputPrivateImagePrefix=harbor.dev.renku.ch/renku-ci-private-images-build-private-project/,dataService.imageBuilders.pushSecretName=harbor-public-session,dataService.imageBuilders.pushPrivateSecretName=harbor-private-session,dataService.imageBuilders.pullPrivateSecretName=harbor-private-session,dataService.imageBuilders.nodeSelector.renku.io/node-purpose=user,dataService.imageBuilders.tolerations[0].effect=NoSchedule,dataService.imageBuilders.tolerations[0].key=renku.io/dedicated,dataService.imageBuilders.tolerations[0].operator=Equal,dataService.imageBuilders.tolerations[0].value=user

@leafty leafty force-pushed the leafty/fix-reject-private-repo branch from 3e40014 to dc972a8 Compare May 4, 2026 12:16
@RenkuBot

RenkuBot commented May 4, 2026

Copy link
Copy Markdown
Contributor

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

Comment thread components/renku_data_services/authz/authz.py
Comment thread components/renku_data_services/notebooks/core_sessions.py Outdated
@leafty leafty marked this pull request as ready for review May 5, 2026 11:55
@leafty leafty requested review from a team, SalimKayal and sgaist as code owners May 5, 2026 11:55

@leafty leafty left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note (cc @sgaist): the test test/bases/renku_data_services/data_api/test_sessions.py::test_starting_session_with_built_environment needs to be updated/fixed but I don't understand that test nor what it's supposed to test given that the images are not even set (so we don't know if the image is supposed to be public or private...).

@sgaist

sgaist commented May 5, 2026

Copy link
Copy Markdown
Collaborator

@leafty The image are not set because it is for built environment. This test checks these cases:

  • Public repo -> Successful start
  • Private repo + pull permission -> Successful start
  • Private repo - pull permission -> Start failure
  • Private repo without access -> Start failure

TheFakeGitRepositoriesRepository class is the one handling the visibility and pull permission for the testing part.

@leafty

leafty commented May 6, 2026

Copy link
Copy Markdown
Member Author

@leafty The image are not set because it is for built environment. This test checks these cases:

  • Public repo -> Successful start
  • Private repo + pull permission -> Successful start
  • Private repo - pull permission -> Start failure
  • Private repo without access -> Start failure

TheFakeGitRepositoriesRepository class is the one handling the visibility and pull permission for the testing part.

Actually, the current logic is incorrect so I have to further change it and will either skip the current tests or re-write them:
The last successful build is the correct source of information to determine the source repository, not the current one set in the build parameters.

@sgaist

sgaist commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Does the user have the option to select which build they want to use ?

@leafty

leafty commented May 6, 2026

Copy link
Copy Markdown
Member Author

Does the user have the option to select which build they want to use ?

No, you launch with the image from the last successful build.

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.

Fix error type in core_sessions.py

3 participants