From 2d3d23399f126b3c0cf17b1c1102787a456bbcc6 Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Fri, 5 Jul 2024 18:12:38 +0300 Subject: [PATCH] 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' ]