From 9599c65513416d62c6fda7c6240990c684a40c49 Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Tue, 30 Jul 2024 12:19:54 +0200 Subject: [PATCH 1/4] fix: Remove references to Ecommerce from openedx-lms-common-settings The fix in 64dcfa3bdad95bf1e00edde04133c2232ba8e18e neglected to drop references to the Ecommerce service from the patch to openedx-lms-common-settings. Co-authored-by: Florian Haas --- CHANGELOG.md | 4 ++++ tutorretirement/patches/openedx-lms-common-settings | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c1f74d..2581dfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## Unreleased + +* [Bug fix] Complete the removal of (not-ever-working) support for the Ecommerce service, by also removing references to that service from the `openedx-lms-common-settings` patch. + ## Version 3.3.1 (2024-07-03) * [Bug fix] Drop support for retiring users in the [Open edX E-Commerce Service](https://github.com/openedx/ecommerce). diff --git a/tutorretirement/patches/openedx-lms-common-settings b/tutorretirement/patches/openedx-lms-common-settings index c1efcb7..fed72d7 100644 --- a/tutorretirement/patches/openedx-lms-common-settings +++ b/tutorretirement/patches/openedx-lms-common-settings @@ -17,11 +17,6 @@ RETIREMENT_STATES = [ 'FORUMS_COMPLETE', {% endif %} - {% if ECOMMERCE_HOST is defined %} - 'RETIRING_ECOMMERCE', - 'ECOMMERCE_COMPLETE', - {% endif %} - {% if DISCOVERY_HOST is defined %} 'RETIRING_DISCOVERY', 'DISCOVERY_COMPLETE', From 2d3d23399f126b3c0cf17b1c1102787a456bbcc6 Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Fri, 5 Jul 2024 18:12:38 +0300 Subject: [PATCH 2/4] fix: Drop discovery retirement steps Using discovery steps in the pipeline lead to KeyError in the tubular because there is no support for `retire_one_learner` script in context of Discovery. YT: - https://youtrack.raccoongang.com/issue/PhU-399 Co-authored-by: Florian Haas --- CHANGELOG.md | 1 + README.md | 5 +++-- tutorretirement/patches/openedx-lms-common-settings | 5 ----- .../retirement/build/retirement/pipeline_config/config.yml | 2 -- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2581dfb..d693a3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Unreleased * [Bug fix] Complete the removal of (not-ever-working) support for the Ecommerce service, by also removing references to that service from the `openedx-lms-common-settings` patch. +* [Bug fix] Remove references to the (not-ever-working) Discovery service. ## Version 3.3.1 (2024-07-03) diff --git a/README.md b/README.md index 67c8222..216ebb2 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,10 @@ appropriate one: Limitations ------------ -This plugin cannot be used for retiring accounts in the [Open edX E-Commerce Service](https://github.com/openedx/ecommerce).[^ecom] +This plugin cannot be used for retiring accounts in the [Open edX E-Commerce Service](https://github.com/openedx/ecommerce),[^ecom] nor the [Course Discovery Service](https://github.com/openedx/course-discovery).[^discovery]. -[^ecom]: See [Issue #36](https://github.com/hastexo/tutor-contrib-retirement/issues/36) in this repository for a related discussion of missing functionality in E-Commerce account retirement. +[^ecom]: See [Issue #36](https://github.com/hastexo/tutor-contrib-retirement/issues/36) for background. +[^discovery]: See [Issue #39](https://github.com/hastexo/tutor-contrib-retirement/issues/39) for background. Installation diff --git a/tutorretirement/patches/openedx-lms-common-settings b/tutorretirement/patches/openedx-lms-common-settings index fed72d7..3ad8504 100644 --- a/tutorretirement/patches/openedx-lms-common-settings +++ b/tutorretirement/patches/openedx-lms-common-settings @@ -17,11 +17,6 @@ RETIREMENT_STATES = [ 'FORUMS_COMPLETE', {% endif %} - {% if DISCOVERY_HOST is defined %} - 'RETIRING_DISCOVERY', - 'DISCOVERY_COMPLETE', - {% endif %} - {% if NOTES_HOST is defined %} 'RETIRING_NOTES', 'NOTES_COMPLETE', diff --git a/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml b/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml index 4d78fdc..da9f7da 100644 --- a/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml +++ b/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml @@ -3,12 +3,10 @@ client_secret: {{ RETIREMENT_EDX_OAUTH2_CLIENT_SECRET }} base_urls: lms: {{ "https" if ENABLE_HTTPS else "http" }}://{{ LMS_HOST }} - {% if DISCOVERY_HOST is defined %}discovery: {{ "https" if ENABLE_HTTPS else "http" }}://{{ DISCOVERY_HOST }}{% endif %} {% if NOTES_HOST is defined %}notes: {{ "https" if ENABLE_HTTPS else "http" }}://{{ NOTES_HOST }}{% endif %} retirement_pipeline: {% if FORUM_VERSION is defined %}- [ 'RETIRING_FORUMS', 'FORUMS_COMPLETE', 'LMS', 'retirement_retire_forum' ]{% endif %} - {% if DISCOVERY_HOST is defined %}- [ 'RETIRING_DISCOVERY', 'DISCOVERY_COMPLETE', 'DISCOVERY', 'replace_usernames' ]{% endif %} {% if NOTES_HOST is defined %}- [ 'RETIRING_NOTES', 'NOTES_COMPLETE', 'LMS', 'retirement_retire_notes' ]{% endif %} - [ 'RETIRING_EMAIL_LISTS', 'EMAIL_LISTS_COMPLETE', 'LMS', 'retirement_retire_mailings' ] - [ 'RETIRING_ENROLLMENTS', 'ENROLLMENTS_COMPLETE', 'LMS', 'retirement_unenroll' ] From be18b07288f94cca0378c4bbcd2b6429899273dd Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Tue, 9 Jul 2024 14:22:24 +0300 Subject: [PATCH 3/4] fix: Drop reference to mailings retirement Retire mailings step uses LMS API that was removed starting from Ironwood release so it was removed. Co-authored-by: Florian Haas --- CHANGELOG.md | 1 + tutorretirement/patches/openedx-lms-common-settings | 3 --- .../retirement/build/retirement/pipeline_config/config.yml | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d693a3f..8477354 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Unreleased * [Bug fix] Complete the removal of (not-ever-working) support for the Ecommerce service, by also removing references to that service from the `openedx-lms-common-settings` patch. +* [Bug fix] Remove references to the mailing API (which in turn was removed from the LMS in Ironwood). * [Bug fix] Remove references to the (not-ever-working) Discovery service. ## Version 3.3.1 (2024-07-03) diff --git a/tutorretirement/patches/openedx-lms-common-settings b/tutorretirement/patches/openedx-lms-common-settings index 3ad8504..0393685 100644 --- a/tutorretirement/patches/openedx-lms-common-settings +++ b/tutorretirement/patches/openedx-lms-common-settings @@ -6,9 +6,6 @@ RETIREMENT_STATES = [ 'LOCKING_ACCOUNT', 'LOCKING_COMPLETE', - 'RETIRING_EMAIL_LISTS', - 'EMAIL_LISTS_COMPLETE', - 'RETIRING_ENROLLMENTS', 'ENROLLMENTS_COMPLETE', diff --git a/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml b/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml index da9f7da..38fa6cf 100644 --- a/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml +++ b/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml @@ -8,7 +8,6 @@ base_urls: retirement_pipeline: {% if FORUM_VERSION is defined %}- [ 'RETIRING_FORUMS', 'FORUMS_COMPLETE', 'LMS', 'retirement_retire_forum' ]{% endif %} {% if NOTES_HOST is defined %}- [ 'RETIRING_NOTES', 'NOTES_COMPLETE', 'LMS', 'retirement_retire_notes' ]{% endif %} - - [ 'RETIRING_EMAIL_LISTS', 'EMAIL_LISTS_COMPLETE', 'LMS', 'retirement_retire_mailings' ] - [ 'RETIRING_ENROLLMENTS', 'ENROLLMENTS_COMPLETE', 'LMS', 'retirement_unenroll' ] - [ 'RETIRING_LMS_MISC', 'LMS_MISC_COMPLETE', 'LMS', 'retirement_lms_retire_misc' ] - [ 'RETIRING_LMS', 'LMS_COMPLETE', 'LMS', 'retirement_lms_retire' ] From 8b6bcdce9de946acb958de6fb9a89d8dd7d4c019 Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Tue, 9 Jul 2024 14:22:24 +0300 Subject: [PATCH 4/4] fix: Reorder pipeline steps Retirement pipiline steps order was different comparing to retirement state indexes so the order was changed - enrollments now placed before forum. YT: - https://youtrack.raccoongang.com/issue/PhU-399 Co-authored-by: Florian Haas --- CHANGELOG.md | 1 + .../retirement/build/retirement/pipeline_config/config.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8477354..6d3ce33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * [Bug fix] Complete the removal of (not-ever-working) support for the Ecommerce service, by also removing references to that service from the `openedx-lms-common-settings` patch. * [Bug fix] Remove references to the mailing API (which in turn was removed from the LMS in Ironwood). * [Bug fix] Remove references to the (not-ever-working) Discovery service. +* [Bug fix] Run the retirement pipeline for course enrollments prior to that for forum posts. ## Version 3.3.1 (2024-07-03) diff --git a/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml b/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml index 38fa6cf..f256d37 100644 --- a/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml +++ b/tutorretirement/templates/retirement/build/retirement/pipeline_config/config.yml @@ -6,8 +6,8 @@ base_urls: {% if NOTES_HOST is defined %}notes: {{ "https" if ENABLE_HTTPS else "http" }}://{{ NOTES_HOST }}{% endif %} retirement_pipeline: + - [ 'RETIRING_ENROLLMENTS', 'ENROLLMENTS_COMPLETE', 'LMS', 'retirement_unenroll' ] {% if FORUM_VERSION is defined %}- [ 'RETIRING_FORUMS', 'FORUMS_COMPLETE', 'LMS', 'retirement_retire_forum' ]{% endif %} {% if NOTES_HOST is defined %}- [ 'RETIRING_NOTES', 'NOTES_COMPLETE', 'LMS', 'retirement_retire_notes' ]{% endif %} - - [ 'RETIRING_ENROLLMENTS', 'ENROLLMENTS_COMPLETE', 'LMS', 'retirement_unenroll' ] - [ 'RETIRING_LMS_MISC', 'LMS_MISC_COMPLETE', 'LMS', 'retirement_lms_retire_misc' ] - [ 'RETIRING_LMS', 'LMS_COMPLETE', 'LMS', 'retirement_lms_retire' ]