From 166aad0190e1e1b1c6541716be202b73782d1d16 Mon Sep 17 00:00:00 2001 From: pietercusters Date: Wed, 6 Dec 2023 13:41:12 +0100 Subject: [PATCH 1/4] set default resources for all dagster repos --- src/mpyl/steps/deploy/k8s/resources/dagster.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mpyl/steps/deploy/k8s/resources/dagster.py b/src/mpyl/steps/deploy/k8s/resources/dagster.py index 5ba0833a6..b125926aa 100644 --- a/src/mpyl/steps/deploy/k8s/resources/dagster.py +++ b/src/mpyl/steps/deploy/k8s/resources/dagster.py @@ -47,6 +47,7 @@ def to_user_code_values( "includeConfigInLaunchedRuns": {"enabled": True}, "name": f"{project.name}{name_suffix}", "port": 3030, + "resources": {"requests": {"memory": "256Mi", "cpu": "50m"}, "limits": {"memory": "512Mi", "cpu": "1000m"}} }, ], } From f0a840f3485ab79cff6a54eb8056443733ad4796 Mon Sep 17 00:00:00 2001 From: katrin Date: Thu, 7 Dec 2023 09:25:33 +0100 Subject: [PATCH 2/4] Fix formatting --- src/mpyl/steps/deploy/k8s/resources/dagster.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mpyl/steps/deploy/k8s/resources/dagster.py b/src/mpyl/steps/deploy/k8s/resources/dagster.py index b125926aa..a31198aed 100644 --- a/src/mpyl/steps/deploy/k8s/resources/dagster.py +++ b/src/mpyl/steps/deploy/k8s/resources/dagster.py @@ -47,7 +47,10 @@ def to_user_code_values( "includeConfigInLaunchedRuns": {"enabled": True}, "name": f"{project.name}{name_suffix}", "port": 3030, - "resources": {"requests": {"memory": "256Mi", "cpu": "50m"}, "limits": {"memory": "512Mi", "cpu": "1000m"}} + "resources": { + "requests": {"memory": "256Mi", "cpu": "50m"}, + "limits": {"memory": "512Mi", "cpu": "1000m"}, + }, }, ], } From a123fffcde1d2c20241d9ef4888639ca97a30372 Mon Sep 17 00:00:00 2001 From: katrin Date: Thu, 7 Dec 2023 09:31:29 +0100 Subject: [PATCH 3/4] Fix unittests and failing import --- src/mpyl/utilities/helm/__init__.py | 4 ++-- .../values_with_global_service_account.yaml | 7 +++++++ .../dagster-user-deployments/values_with_target_prod.yaml | 7 +++++++ .../values_without_global_service_account.yaml | 7 +++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/mpyl/utilities/helm/__init__.py b/src/mpyl/utilities/helm/__init__.py index b4fe274ec..270580b59 100644 --- a/src/mpyl/utilities/helm/__init__.py +++ b/src/mpyl/utilities/helm/__init__.py @@ -2,8 +2,8 @@ Helper methods for helm deployments """ -from mpyl.project import Target -from mpyl.steps.models import RunProperties +from ...project import Target +from ...steps.models import RunProperties def convert_to_helm_release_name(name: str, tag: str) -> str: diff --git a/tests/steps/deploy/dagster/dagster-user-deployments/values_with_global_service_account.yaml b/tests/steps/deploy/dagster/dagster-user-deployments/values_with_global_service_account.yaml index 593d45ab0..fdbd2d794 100644 --- a/tests/steps/deploy/dagster/dagster-user-deployments/values_with_global_service_account.yaml +++ b/tests/steps/deploy/dagster/dagster-user-deployments/values_with_global_service_account.yaml @@ -21,3 +21,10 @@ deployments: enabled: true name: example-dagster-user-code-pr-1234 port: 3030 + resources: + requests: + memory: 256Mi + cpu: 50m + limits: + memory: 512Mi + cpu: 1000m diff --git a/tests/steps/deploy/dagster/dagster-user-deployments/values_with_target_prod.yaml b/tests/steps/deploy/dagster/dagster-user-deployments/values_with_target_prod.yaml index 3ba0eb292..97a4e6efc 100644 --- a/tests/steps/deploy/dagster/dagster-user-deployments/values_with_target_prod.yaml +++ b/tests/steps/deploy/dagster/dagster-user-deployments/values_with_target_prod.yaml @@ -21,3 +21,10 @@ deployments: enabled: true name: example-dagster-user-code port: 3030 + resources: + requests: + memory: 256Mi + cpu: 50m + limits: + memory: 512Mi + cpu: 1000m diff --git a/tests/steps/deploy/dagster/dagster-user-deployments/values_without_global_service_account.yaml b/tests/steps/deploy/dagster/dagster-user-deployments/values_without_global_service_account.yaml index a33a8eeb4..023e7de26 100644 --- a/tests/steps/deploy/dagster/dagster-user-deployments/values_without_global_service_account.yaml +++ b/tests/steps/deploy/dagster/dagster-user-deployments/values_without_global_service_account.yaml @@ -19,3 +19,10 @@ deployments: enabled: true name: example-dagster-user-code-pr-1234 port: 3030 + resources: + requests: + memory: 256Mi + cpu: 50m + limits: + memory: 512Mi + cpu: 1000m From 068a674ebf427b88900232e5974be63a826c80db Mon Sep 17 00:00:00 2001 From: pietercusters Date: Wed, 13 Dec 2023 10:08:43 +0100 Subject: [PATCH 4/4] add release notes --- releases/notes/1.4.11.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 releases/notes/1.4.11.md diff --git a/releases/notes/1.4.11.md b/releases/notes/1.4.11.md new file mode 100644 index 000000000..ea125833c --- /dev/null +++ b/releases/notes/1.4.11.md @@ -0,0 +1,2 @@ +#### Enhancements +- Set resources for Dagster user code servers (hardcoded)