Skip to content

Conversation

@olevski
Copy link
Member

@olevski olevski commented Jan 22, 2026

/deploy

@olevski olevski requested review from a team, SalimKayal and sgaist as code owners January 22, 2026 14:33
@RenkuBot
Copy link
Contributor

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

@olevski olevski marked this pull request as draft January 22, 2026 14:45
Comment on lines -200 to -211
if self.default_resource_pool_file is not None:
with open(self.default_resource_pool_file) as f:
self.default_resource_pool = crc_models.UnsavedResourcePool(**safe_load(f))
if (
self.config.server_options.defaults_path is not None
and self.config.server_options.ui_choices_path is not None
):
with open(self.config.server_options.ui_choices_path) as f:
options = ServerOptions.model_validate(safe_load(f))
with open(self.config.server_options.defaults_path) as f:
defaults = ServerOptionsDefaults.model_validate(safe_load(f))
self.default_resource_pool = generate_default_resource_pool(options, defaults)
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be documented: are deployments not getting a default resource pool now?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is all for v1. For v1 we had these config files with options kind of like a resource pool. So we generated the default resource pool from them if the file was present. But we also have a default resource pool hardcoded that remains and will be added to the db for v2. I can remove one more field the default_resource_pool_file from the dependency manager.

options: ServerOptions = field(default_factory=lambda: ServerOptions(0.5, 1, 0, 1, "/lab", False, True))

async def validate_class_storage(self, user: APIUser, class_id: int, storage: int | None = None) -> ServerOptions:
async def validate_class_storage(self, user: APIUser, class_id: int, storage: int | None = None) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

If this is doing nothing, why are the method and its calls not removed from the code?

Copy link
Member Author

Choose a reason for hiding this comment

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

It does nothing in the DummyCRCValidator which is just used for testing. In the actual implementation in the same file (which is still needed) it checks that the resource class exists and is accessible and that the storage requested for the session is compatible with the resource class.

Copy link
Member Author

Choose a reason for hiding this comment

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

It used to also return this ServerOptions object that was only needed in V1. But it is still being called from the session starting code for v2 and the output in the v2 code is not used at all.

Copy link
Member

Choose a reason for hiding this comment

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

Note: this is because I updated sanic. I will check if we can restrict query parsing or if we can express that on the API spec.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a fix for it. May not be super pretty but it works. It just needed to forbid extra params. And yeah I figured it was because of the sanic update.

Copy link
Member

Choose a reason for hiding this comment

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

But that's not a good fix, as the permissive query validation will happen on all the endpoints with query parameters. I will see if the @validate_query decorator can be adjusted to please schemathesis.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 21256253913

Details

  • 41 of 54 (75.93%) changed or added relevant lines in 14 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on remove-v1-code at 88.984%

Changes Missing Coverage Covered Lines Changed/Added Lines %
components/renku_data_services/notebooks/core_sessions.py 1 2 50.0%
components/renku_data_services/notebooks/util/retries.py 1 2 50.0%
components/renku_data_services/notebooks/api/classes/k8s_client.py 8 10 80.0%
components/renku_data_services/notebooks/crs.py 4 8 50.0%
components/renku_data_services/notebooks/api/classes/data_service.py 3 8 37.5%
Totals Coverage Status
Change from base Build 21248906865: 89.0%
Covered Lines: 23530
Relevant Lines: 26443

💛 - Coveralls

@olevski olevski requested a review from leafty January 22, 2026 17:03
@olevski olevski marked this pull request as ready for review January 22, 2026 17:04
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

@olevski olevski merged commit 9c2cbb4 into main Jan 23, 2026
43 of 44 checks passed
@olevski olevski deleted the remove-v1-code branch January 23, 2026 07:54
@RenkuBot
Copy link
Contributor

Tearing down the temporary RenkuLab deployment 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.

5 participants