Skip to content

chore: Pass renku annotations to amalthea session spec#1206

Open
eikek wants to merge 2 commits intomainfrom
eikek/amalthea-template-data
Open

chore: Pass renku annotations to amalthea session spec#1206
eikek wants to merge 2 commits intomainfrom
eikek/amalthea-template-data

Conversation

@eikek
Copy link
Member

@eikek eikek commented Feb 10, 2026

  • Passes the renku.io annotations to amalthea session spec template field
  • Updates the amalthea version in Makefile

Accompanies SwissDataScienceCenter/amalthea#964

/deploy

@eikek eikek requested review from a team, SalimKayal and sgaist as code owners February 10, 2026 14:09
@RenkuBot
Copy link
Contributor

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

@coveralls
Copy link

Pull Request Test Coverage Report for Build 21868233007

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on eikek/amalthea-template-data at 89.039%

Totals Coverage Status
Change from base Build 21623169484: 89.0%
Covered Lines: 23599
Relevant Lines: 26504

💛 - Coveralls

Copy link
Member

@olevski olevski left a comment

Choose a reason for hiding this comment

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

Hey Eike, thank you for doing this. Just two small things.

Comment on lines +49 to 52
from renku_data_services.notebooks.cr_amalthea_session import Metadata as AmaltheaMetadata
from renku_data_services.notebooks.cr_amalthea_session import Template
from renku_data_services.notebooks.crs import (
AmaltheaSessionSpec,
Copy link
Member

Choose a reason for hiding this comment

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

It is not very obvious. But what we do is we import the stuff from renku_data_services.notebooks.cr_amalthea_session into renku_data_services.notebooks.crs and then we import these things only from renku_data_services.notebooks.crs.

tolerations=tolerations_from_resource_class(resource_class, nb_config.sessions.tolerations_model),
affinity=node_affinity_from_resource_class(resource_class, nb_config.sessions.affinity_model),
serviceAccountName=service_account_name,
template=Template(metadata=AmaltheaMetadata(annotations=annotations)),
Copy link
Member

Choose a reason for hiding this comment

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

This is a shortcoming from before. But please add the username label. Currently we inject this in the manifest when we create it. But it is better to put it in here.

The label should be renku.io/safe-username: <keycloak-user-id>. You have this in the user - i.e. user.id. The user variable is passed into that whole big function as an argument.

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.

4 participants