From 8a537a0998590f290c271d8cb1b06fd2d41463c2 Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Tue, 7 Jan 2025 11:24:52 +0100 Subject: [PATCH 1/2] Fix reading of `spec.project` in `appPath` We need to use `std.get()` to read both `spec` and `spec.project` of the rendered application manifest, so that the template code works unchanged for components that customize `spec` of the rendered application. --- {{ cookiecutter.slug }}/component/app.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{ cookiecutter.slug }}/component/app.jsonnet b/{{ cookiecutter.slug }}/component/app.jsonnet index 8f01a60..18eb8c2 100644 --- a/{{ cookiecutter.slug }}/component/app.jsonnet +++ b/{{ cookiecutter.slug }}/component/app.jsonnet @@ -6,7 +6,7 @@ local argocd = import 'lib/argocd.libjsonnet'; local app = argocd.App('{{ cookiecutter.slug }}', params.namespace); local appPath = - local project = std.get(app, 'spec', { project: 'syn' }).project; + local project = std.get(std.get(app, 'spec', {}), 'project', 'syn'); if project == 'syn' then 'apps' else 'apps-%s' % project; { From dcc7946b1bfd1cf730beddefb8006e095a1e8ce9 Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Tue, 7 Jan 2025 11:30:50 +0100 Subject: [PATCH 2/2] Disable Poetry package-mode for Poetry 2.0 --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index ba6ffd6..27bc42c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,7 @@ name = "commodore-config-package-template" version = "0.1.0" description = "" authors = ["VSHN AG "] +package-mode = false [tool.poetry.dependencies] python = "^3.8"