Skip to content

Commit 4ce7d6f

Browse files
committed
chore: address comments
1 parent 4c9aaa2 commit 4ce7d6f

3 files changed

Lines changed: 7 additions & 19 deletions

File tree

components/renku_data_services/session/api.spec.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,9 @@ components:
547547
type: integer
548548
minimum: 0
549549
exclusiveMinimum: true
550-
maximum: 65535
550+
exclusiveMaximum: true
551+
# NOTE: we reserve 65400 - 65535 for usage of Renku sidecars and services
552+
maximum: 65400
551553
description: The TCP port (on any container in the session) where user requests will be routed to from the ingress
552554
EnvironmentUid:
553555
type: integer

components/renku_data_services/session/apispec.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: api.spec.yaml
3-
# timestamp: 2024-08-02T12:32:41+00:00
3+
# timestamp: 2024-08-12T14:34:54+00:00
44

55
from __future__ import annotations
66

@@ -82,7 +82,7 @@ class Environment(BaseAPISpec):
8282
...,
8383
description="The TCP port (on any container in the session) where user requests will be routed to from the ingress",
8484
gt=0,
85-
le=65535,
85+
lt=65400,
8686
)
8787

8888

@@ -133,7 +133,7 @@ class EnvironmentPost(BaseAPISpec):
133133
8080,
134134
description="The TCP port (on any container in the session) where user requests will be routed to from the ingress",
135135
gt=0,
136-
le=65535,
136+
lt=65400,
137137
)
138138

139139

@@ -181,7 +181,7 @@ class EnvironmentPatch(BaseAPISpec):
181181
None,
182182
description="The TCP port (on any container in the session) where user requests will be routed to from the ingress",
183183
gt=0,
184-
le=65535,
184+
lt=65400,
185185
)
186186

187187

components/renku_data_services/session/models.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,6 @@ class BaseSessionLauncher:
8080
environment: str | UnsavedEnvironment | Environment
8181
resource_class_id: int | None
8282

83-
@property
84-
def environment_id(self) -> str | None:
85-
"""The environment ID."""
86-
if isinstance(self.environment, str):
87-
return self.environment
88-
elif isinstance(self.environment, Environment):
89-
return self.environment.id
90-
return None
91-
9283

9384
@dataclass(frozen=True, eq=True, kw_only=True)
9485
class UnsavedSessionLauncher(BaseSessionLauncher):
@@ -106,8 +97,3 @@ class SessionLauncher(BaseSessionLauncher):
10697
creation_date: datetime
10798
created_by: str
10899
environment: Environment
109-
110-
@property
111-
def environment_id(self) -> str:
112-
"""The environment ID."""
113-
return self.environment.id

0 commit comments

Comments
 (0)