From 431f6180bd5d461f33556d2e8aa6904a444af8a0 Mon Sep 17 00:00:00 2001 From: henrrypg Date: Tue, 29 Oct 2024 14:56:33 -0500 Subject: [PATCH 01/12] feat: sumac release --- .github/workflows/release.yml | 2 +- README.md | 5 +++-- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67688af..21c969e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: - name: Python Semantic Release uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.12 - name: Install dependencies run: | diff --git a/README.md b/README.md index 8a1d689..03bd3ef 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,10 @@ appropriate one: | Maple | `>=13.2, <14` | Not supported | 0.7.x | | Nutmeg | `>=14.0, <15` | Not supported | 0.7.x | | Olive | `>=15.0, <16` | Not supported | 15.x.x | -| Palm | `>=16.0, <17` | `palm` | 16.x.x | +| Palm | `>=16.0, <17` | Not supported | 16.x.x | | Quince | `>=17.0, <18` | `quince` | 17.x.x | -| Redwood | `>=18.0, <19` | `main` | >=18.0.0 | +| Redwood | `>=18.0, <19` | `redwood` | 18.x.x | +| Sumac | `>=19.0, <20` | `main` | >=19.0.0 | Installation ------------ diff --git a/pyproject.toml b/pyproject.toml index df9666f..01fded7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", ] dependencies = [ - "tutor>=18.1.3,<19.0.0" + "tutor>=19.0.0" ] [project.optional-dependencies] From 44897120989ab8ea81f53a2db0b3f2f290ce9d6b Mon Sep 17 00:00:00 2001 From: henrrypg Date: Wed, 30 Oct 2024 14:22:47 -0500 Subject: [PATCH 02/12] fix: remove python3.8 and add tutor sumac to requirements --- .github/requirements.txt | 2 +- pyproject.toml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/requirements.txt b/.github/requirements.txt index 63474c0..912cbcd 100644 --- a/.github/requirements.txt +++ b/.github/requirements.txt @@ -1,3 +1,3 @@ -tutor[full]<18 +git+https://github.com/overhangio/tutor@sumac setuptools git+https://github.com/hastexo/tutor-contrib-s3@v1.4.0 diff --git a/pyproject.toml b/pyproject.toml index 01fded7..e0c1129 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "drydock" dynamic = ["version"] description = "A Tutor plugin to manage our opinionated Open edX operations" readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" license = { text = "AGPLv3" } authors = [ { name = "eduNEXT" } @@ -18,7 +18,6 @@ classifiers = [ "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", From ff9abbdea2bc0b9ade2f6707bc2abf9214c9febd Mon Sep 17 00:00:00 2001 From: henrrypg Date: Wed, 30 Oct 2024 14:24:40 -0500 Subject: [PATCH 03/12] fixup! fix: remove python3.8 and add tutor sumac to requirements --- .github/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/requirements.txt b/.github/requirements.txt index 912cbcd..eba56f8 100644 --- a/.github/requirements.txt +++ b/.github/requirements.txt @@ -1,3 +1,3 @@ git+https://github.com/overhangio/tutor@sumac setuptools -git+https://github.com/hastexo/tutor-contrib-s3@v1.4.0 +git+https://github.com/hastexo/tutor-contrib-s3@v2.0.0 From 7f4991f1f482dd97357132f4ba5ceaefee5fd526 Mon Sep 17 00:00:00 2001 From: henrrypg Date: Wed, 30 Oct 2024 14:26:38 -0500 Subject: [PATCH 04/12] fixup! fix: remove python3.8 and add tutor sumac to requirements --- .github/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/requirements.txt b/.github/requirements.txt index eba56f8..a870c2e 100644 --- a/.github/requirements.txt +++ b/.github/requirements.txt @@ -1,3 +1,3 @@ git+https://github.com/overhangio/tutor@sumac setuptools -git+https://github.com/hastexo/tutor-contrib-s3@v2.0.0 +git+https://github.com/edunext/tutor-contrib-s3@sumac From 4b975088d25631635882cca8fd0c752b009746e0 Mon Sep 17 00:00:00 2001 From: henrrypg Date: Wed, 30 Oct 2024 14:28:42 -0500 Subject: [PATCH 05/12] fixup! fix: remove python3.8 and add tutor sumac to requirements --- .github/requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/requirements.txt b/.github/requirements.txt index a870c2e..b4f71a6 100644 --- a/.github/requirements.txt +++ b/.github/requirements.txt @@ -1,3 +1,5 @@ git+https://github.com/overhangio/tutor@sumac +git+https://github.com/overhangio/tutor-mfe@sumac +git+https://github.com/overhangio/tutor-forum@sumac setuptools git+https://github.com/edunext/tutor-contrib-s3@sumac From c8d32a94dc5300ae20f895ef3a24f30f5d51fbe5 Mon Sep 17 00:00:00 2001 From: Henrry Pulgarin <39854568+Henrrypg@users.noreply.github.com> Date: Thu, 31 Oct 2024 08:57:50 -0500 Subject: [PATCH 06/12] fix: add upper limit to version Co-authored-by: Cristhian Garcia --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e0c1129..34a7e28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", ] dependencies = [ - "tutor>=19.0.0" + "tutor>=19.0.0,<20.0.0" ] [project.optional-dependencies] From c014755d10cd929e9dacbfcdade3d92bea337c1d Mon Sep 17 00:00:00 2001 From: henrrypg Date: Thu, 31 Oct 2024 14:14:48 -0500 Subject: [PATCH 07/12] feat: change DRYDOCK_INGRESS default value --- drydock/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drydock/plugin.py b/drydock/plugin.py index 55e219c..025efa9 100644 --- a/drydock/plugin.py +++ b/drydock/plugin.py @@ -132,7 +132,7 @@ def get_sync_waves_for_resource(resource_name: str) -> SYNC_WAVES_ORDER_ATTRS_TY "CMS_SSO_USER": "cms", "AUTO_TLS": True, "MIGRATE_FROM": 0, - "INGRESS": False, + "INGRESS": True, "INGRESS_EXTRA_HOSTS": [], "INGRESS_LMS_EXTRA_HOSTS": [], "NEWRELIC_LICENSE_KEY": "", From d9f9ff360df1a30f59a953af54491420c4e72976 Mon Sep 17 00:00:00 2001 From: henrrypg Date: Thu, 31 Oct 2024 14:16:28 -0500 Subject: [PATCH 08/12] fixup! feat: change DRYDOCK_INGRESS default value --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03bd3ef..73cd0eb 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ The following configuration options are available: - `DRYDOCK_INIT_JOBS`: Whether run the initialization jobs or not. Defaults to `false`. - `DRYDOCK_CMS_SSO_USER`: The username of the CMS SSO user. Defaults to `cms`. - `DRYDOCK_AUTO_TLS`: Whether to use cert-manager to automatically generate TLS certificates. Defaults to `true`. -- `DRYDOCK_INGRESS`: Whether to deploy an ingress for the LMS and CMS. Defaults to `false`. +- `DRYDOCK_INGRESS`: Whether to deploy an ingress for the LMS and CMS. Defaults to `true`. - `DRYDOCK_INGRESS_EXTRA_HOSTS`: A list of extra hosts to add to the ingress. Defaults to `[]`. - `DRYDOCK_INGRESS_LMS_EXTRA_HOSTS`: A list of extra hosts to add to the LMS ingress. Defaults to `[]`. - `DRYDOCK_CUSTOM_CERTS`: A dictionary of custom certificates to use with cert-manager. Defaults to `{}`. From c004ba24e7f9df25b6ddc6ef5637122ff331aa36 Mon Sep 17 00:00:00 2001 From: henrrypg Date: Fri, 1 Nov 2024 16:07:28 -0500 Subject: [PATCH 09/12] fix: add mfe per service, condition authoring redir --- drydock/templates/drydock/k8s/ingress/cms.yml | 18 ++++++++++++++++++ drydock/templates/drydock/k8s/ingress/lms.yml | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/drydock/templates/drydock/k8s/ingress/cms.yml b/drydock/templates/drydock/k8s/ingress/cms.yml index 4bd64af..ccd6971 100644 --- a/drydock/templates/drydock/k8s/ingress/cms.yml +++ b/drydock/templates/drydock/k8s/ingress/cms.yml @@ -33,6 +33,24 @@ spec: - host: {{ CMS_HOST }} http: paths: +{%- for app_name in iter_mfes_per_service("cms") %} +{%- if app_name == "authoring" %} + - pathType: Prefix + path: "/course-authoring" + backend: + service: + name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} + port: + number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} +{%- endif %} + - pathType: Prefix + path: "/{{app_name}}" + backend: + service: + name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} + port: + number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} +{%- endfor %} - pathType: Prefix path: "/" backend: diff --git a/drydock/templates/drydock/k8s/ingress/lms.yml b/drydock/templates/drydock/k8s/ingress/lms.yml index 75a78b2..4b15870 100644 --- a/drydock/templates/drydock/k8s/ingress/lms.yml +++ b/drydock/templates/drydock/k8s/ingress/lms.yml @@ -40,7 +40,7 @@ spec: name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} port: number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} -{% for app_name, app in iter_mfes() %} +{% for app_name in iter_mfes_per_service("lms") %} - pathType: Prefix path: "/{{app_name}}" backend: From e02c4a6ac6f142f97b86b07674f17755429a940c Mon Sep 17 00:00:00 2001 From: henrrypg Date: Tue, 5 Nov 2024 07:37:38 -0500 Subject: [PATCH 10/12] feat disable forum from tests --- .github/environments/disabled/config.yml | 1 - .github/environments/enabled/config.yml | 1 - .github/requirements.txt | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/environments/disabled/config.yml b/.github/environments/disabled/config.yml index 7c27d01..005bde7 100644 --- a/.github/environments/disabled/config.yml +++ b/.github/environments/disabled/config.yml @@ -1,7 +1,6 @@ DRYDOCK_INIT_JOBS: true K8S_NAMESPACE: testing-openedx PLUGINS: -- forum - mfe - drydock DRYDOCK_BYPASS_CADDY: false diff --git a/.github/environments/enabled/config.yml b/.github/environments/enabled/config.yml index 9a9c263..b09bbf6 100644 --- a/.github/environments/enabled/config.yml +++ b/.github/environments/enabled/config.yml @@ -1,7 +1,6 @@ DRYDOCK_INIT_JOBS: true K8S_NAMESPACE: testing-openedx PLUGINS: -- forum - mfe - drydock - s3 diff --git a/.github/requirements.txt b/.github/requirements.txt index b4f71a6..4509b2f 100644 --- a/.github/requirements.txt +++ b/.github/requirements.txt @@ -1,5 +1,4 @@ git+https://github.com/overhangio/tutor@sumac git+https://github.com/overhangio/tutor-mfe@sumac -git+https://github.com/overhangio/tutor-forum@sumac setuptools git+https://github.com/edunext/tutor-contrib-s3@sumac From 45b7c2297397915073991aadf98a89e78e03b48e Mon Sep 17 00:00:00 2001 From: henrrypg Date: Tue, 5 Nov 2024 07:45:21 -0500 Subject: [PATCH 11/12] fixup! feat disable forum from tests --- .github/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/requirements.txt b/.github/requirements.txt index 4509b2f..423cdff 100644 --- a/.github/requirements.txt +++ b/.github/requirements.txt @@ -1,4 +1,5 @@ git+https://github.com/overhangio/tutor@sumac git+https://github.com/overhangio/tutor-mfe@sumac +git+https://github.com/overhangio/tutor-minio@sumac setuptools git+https://github.com/edunext/tutor-contrib-s3@sumac From e357eaedc8ab0e706b7a65bdf645b2921de12a65 Mon Sep 17 00:00:00 2001 From: henrrypg Date: Tue, 5 Nov 2024 08:04:54 -0500 Subject: [PATCH 12/12] fix: change func iter_mfes_per_service to avoid dependency with mfe_extensions --- drydock/templates/drydock/k8s/ingress/cms.yml | 4 ++-- drydock/templates/drydock/k8s/ingress/lms.yml | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drydock/templates/drydock/k8s/ingress/cms.yml b/drydock/templates/drydock/k8s/ingress/cms.yml index ccd6971..1748c97 100644 --- a/drydock/templates/drydock/k8s/ingress/cms.yml +++ b/drydock/templates/drydock/k8s/ingress/cms.yml @@ -33,7 +33,7 @@ spec: - host: {{ CMS_HOST }} http: paths: -{%- for app_name in iter_mfes_per_service("cms") %} +{%- for app_name, app in iter_mfes() %} {%- if app_name == "authoring" %} - pathType: Prefix path: "/course-authoring" @@ -42,7 +42,6 @@ spec: name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} port: number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} -{%- endif %} - pathType: Prefix path: "/{{app_name}}" backend: @@ -50,6 +49,7 @@ spec: name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} port: number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} +{%- endif %} {%- endfor %} - pathType: Prefix path: "/" diff --git a/drydock/templates/drydock/k8s/ingress/lms.yml b/drydock/templates/drydock/k8s/ingress/lms.yml index 4b15870..b7126f4 100644 --- a/drydock/templates/drydock/k8s/ingress/lms.yml +++ b/drydock/templates/drydock/k8s/ingress/lms.yml @@ -40,7 +40,8 @@ spec: name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} port: number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} -{% for app_name in iter_mfes_per_service("lms") %} +{% for app_name, app in iter_mfes() %} +{%- if app_name != "authoring" %} - pathType: Prefix path: "/{{app_name}}" backend: @@ -48,6 +49,7 @@ spec: name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} port: number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} +{%- endif %} {%- endfor %} - pathType: Prefix path: "/"