Skip to content

Commit e2d5cfb

Browse files
author
Alan Christie
committed
fix: Fix for memory
1 parent 5735188 commit e2d5cfb

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/jote/compose.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ def __init__(
138138
):
139139
# Memory must have a Mi or Gi suffix.
140140
# For docker-compose we translate to 'm' and 'g'
141+
self._memory: str = "1g"
141142
if memory.endswith("Mi"):
142-
self._memory: str = f"{memory[:-2]}m"
143+
self._memory = f"{memory[:-2]}m"
143144
elif memory.endswith("Gi"):
144145
self._memory = f"{memory[:-2]}g"
145146
assert self._memory

src/jote/jote.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -768,10 +768,7 @@ def _run_a_test(
768768
job_image = f"{job_definition.image.name}:{job_definition.image.tag}"
769769
job_image_memory: str = job_definition.image["memory"]
770770
if job_image_memory is None:
771-
job_image_memory = "1G"
772-
elif job_image_memory.lower().endswith("i"):
773-
# Strip trailing kubernetes 'i' - not liked by compose
774-
job_image_memory = job_image_memory[:-1]
771+
job_image_memory = "1Gi"
775772
job_image_cores: int = job_definition.image["cores"]
776773
if job_image_cores is None:
777774
job_image_cores = 1

0 commit comments

Comments
 (0)