diff --git a/.github/workflows/kubeconform-validation.yml b/.github/workflows/config-files-validation.yml similarity index 89% rename from .github/workflows/kubeconform-validation.yml rename to .github/workflows/config-files-validation.yml index bfc4971..e7b6b05 100644 --- a/.github/workflows/kubeconform-validation.yml +++ b/.github/workflows/config-files-validation.yml @@ -1,4 +1,4 @@ -name: Kubeconform Validation +name: Validate configuration files on: pull_request: @@ -65,6 +65,13 @@ jobs: --isolated \ tutor config save + - name: Validate generated Caddyfile + run: | + docker run --rm \ + -v "$TUTOR_ROOT/env/apps/caddy/Caddyfile:/etc/caddy/Caddyfile:ro" \ + caddy:2 \ + caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile + - name: Print versions run: | echo "Kubectl version installed:" diff --git a/CHANGELOG.md b/CHANGELOG.md index 291c491..a8e8f67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,15 @@ See the fragment files in the [changelog.d/ directory](./changelog.d). + +## 21.2.2 — 2026-06-02 + +### Fixed + +- Removed repeated definition of the `@scorm_matcher` rule that would cause + crashes in caddy when using `DRYDOCK_ENABLE_SCORM` and + `DRYDOCK_ENABLE_MULTITENANCY`. + ## 21.2.1 — 2026-05-28 diff --git a/drydock/patches/caddyfile b/drydock/patches/caddyfile index d7f07d9..d270953 100644 --- a/drydock/patches/caddyfile +++ b/drydock/patches/caddyfile @@ -1,5 +1,5 @@ -{% if DRYDOCK_ENABLE_MULTITENANCY -%} -{$default_site_port} { +{% if DRYDOCK_ENABLE_MULTITENANCY %} +{$default_site_port:80} { @favicon_matcher { path_regexp ^/favicon.ico$ } @@ -21,29 +21,5 @@ max_size 4MB } } - - {% if DRYDOCK_ENABLE_SCORM and MINIO_HOST is defined %} - @scorm_matcher { - path /scorm-proxy/* - } - route @scorm_matcher { - uri /scorm-proxy/* strip_prefix /scorm-proxy - reverse_proxy minio:9000 { - header_up Host {{ MINIO_HOST }} - } - } - {% elif DRYDOCK_ENABLE_SCORM and S3_STORAGE_BUCKET is defined %} - @scorm_matcher { - path /scorm-proxy/* - } - route @scorm_matcher { - uri /scorm-proxy/* strip_prefix /scorm-proxy - reverse_proxy https://{{ S3_STORAGE_BUCKET }}.{{ S3_HOST or 's3.amazonaws.com' }} { - header_up Host {{ S3_STORAGE_BUCKET }}.{{ S3_HOST or 's3.amazonaws.com' }} - } - } - {% endif %} - } - {% endif %} diff --git a/pyproject.toml b/pyproject.toml index 611e27c..b6ad1dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "tutor-contrib-drydock" -version = "21.2.1" +version = "21.2.2" description = "A Tutor plugin to manage our opinionated Open edX operations" readme = "README.md" requires-python = ">=3.10" diff --git a/uv.lock b/uv.lock index baac1b7..3a8f920 100644 --- a/uv.lock +++ b/uv.lock @@ -833,7 +833,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/26/d8/3d93bc551ba2e5035 [[package]] name = "tutor-contrib-drydock" -version = "21.2.1" +version = "21.2.2" source = { editable = "." } dependencies = [ { name = "tutor" },