Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nborovenskiy/edxoldmng 224/create a management command to transfer certificate configs to credentials #2465

Conversation

NikolayBorovenskiy
Copy link

@NikolayBorovenskiy NikolayBorovenskiy commented Nov 30, 2022

Description: This PR is going to implement a management command to transfer certificate configs to credentials.

Youtrack: https://youtrack.raccoongang.com/issue/EDXOLDMNG-224

Testing instructions:

Please call python manage.py cms migrate_cert_config --help to see the command capability.

Reviewers:

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Documentation in source code updated
  • All related Confluence documentation is updated (including deployment documentation)
  • Commits are squashed

Post merge:

  • Delete working branch (if not needed anymore)

@NikolayBorovenskiy NikolayBorovenskiy force-pushed the nborovesnkiy/EDXOLDMNG-218/copy-certificate-configurations-including-signatures-to-credentials-on-certificate-update branch from 486e716 to 764b931 Compare November 30, 2022 19:32
@NikolayBorovenskiy NikolayBorovenskiy force-pushed the nborovenskiy/EDXOLDMNG-224/create-a-management-command-to-transfer-certificate-configs-to-credentials branch from 38d7e01 to b0b7de5 Compare November 30, 2022 19:50
@NikolayBorovenskiy NikolayBorovenskiy force-pushed the nborovesnkiy/EDXOLDMNG-218/copy-certificate-configurations-including-signatures-to-credentials-on-certificate-update branch from 6fea164 to 4801b07 Compare December 6, 2022 11:03
@NikolayBorovenskiy NikolayBorovenskiy force-pushed the nborovenskiy/EDXOLDMNG-224/create-a-management-command-to-transfer-certificate-configs-to-credentials branch from b0b7de5 to 3ae9fcf Compare December 6, 2022 17:13
self.user = FakedUser(user_id)


class Command(BaseCommand):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think should add examples with this command usage.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. get a docstign)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

):
if certificates := CertificateManager.get_certificates(course):
for certificate_data in certificates:
for mode in course_modes:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand correctly that several identical certificates with different mods can be sent to the Credentials here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, each mode that can have a certificate will get a request to Cred.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, resolved

@NikolayBorovenskiy NikolayBorovenskiy merged commit dc6eaf4 into nborovesnkiy/EDXOLDMNG-218/copy-certificate-configurations-including-signatures-to-credentials-on-certificate-update Dec 7, 2022
NikolayBorovenskiy added a commit that referenced this pull request Dec 7, 2022
…signatures to credentials on certificate update (#2464)

* feat: [EDXOLDMNG-218] implements signal handlers for COURSE_CERTIFICATE_CONFIG_DELETED and COURSE_CERTIFICATE_CONFIG_CHANGED to send cert config data onto Credentials service

* feat: [EDXOLDMNG-218] emits course certificate config changed signal when course import happened.

* feat: [EDXOLDMNG-218] Emits emit_course_certificate_config_changed_signal, emit_course_certificate_config_deleted_signal when course config data is changing in Studio UI

* test: [EDXOLDMNG-218] Tests for course certificate configuration signals.

* test: [EDXOLDMNG-218] Adds tests for CertificatesListHandler and CertificatesDetailHandler to be sure that certificate config data signals are emiting

* refactor: [EDXOLDMNG-218] Makes CERTIFICATE_JSON_WITH_SIGNATORIES and HelperMethods are ready to more common usage.

* chore: [EDXOLDMNG-218] Code polishing.

* chore: [EDXOLDMNG-218] temporarily switched to RG code repository for openedx-events package.

* chore: [EDXOLDMNG-218] updates openedx-events to 3.2.0 to testing env.

* style: [EDXOLDMNG-218] deletes unused import

* Nborovenskiy/edxoldmng 224/create a management command to transfer certificate configs to credentials (#2465)

* refactor: [EDXOLDMNG-224] Moves course certificate configuration creation and deletion to separate functions.

* feat: [EDXOLDMNG-218] uses course id instead of course key for CertificateConfigData container

* test: [EDXOLDMNG-224] updates SignalCourseCertificateConfigurationListenerTestCase tests in order refactoring the approach to send data to Credentials via http.

* test: [EDXOLDMNG-224] creates tests for course certificate configuration credentials utils apis.

* feat: [EDXOLDMNG-224] Creates manage.py command to migrate course certificate coniguration.

* refactor: [EDXOLDMNG-224] code polishing for migrate cert config command.

* docs: [EDXOLDMNG-224] adds doc string for migrate_cert_config command's main class
NikolayBorovenskiy added a commit that referenced this pull request Dec 14, 2022
…rtificate configs to credentials (#2465)

* refactor: [EDXOLDMNG-224] Moves course certificate configuration creation and deletion to separate functions.

* feat: [EDXOLDMNG-218] uses course id instead of course key for CertificateConfigData container

* test: [EDXOLDMNG-224] updates SignalCourseCertificateConfigurationListenerTestCase tests in order refactoring the approach to send data to Credentials via http.

* test: [EDXOLDMNG-224] creates tests for course certificate configuration credentials utils apis.

* feat: [EDXOLDMNG-224] Creates manage.py command to migrate course certificate coniguration.

* refactor: [EDXOLDMNG-224] code polishing for migrate cert config command.

* docs: [EDXOLDMNG-224] adds doc string for migrate_cert_config command's main class
NikolayBorovenskiy added a commit that referenced this pull request Jan 5, 2023
…rtificate configs to credentials (#2465)

* refactor: [EDXOLDMNG-224] Moves course certificate configuration creation and deletion to separate functions.

* feat: [EDXOLDMNG-218] uses course id instead of course key for CertificateConfigData container

* test: [EDXOLDMNG-224] updates SignalCourseCertificateConfigurationListenerTestCase tests in order refactoring the approach to send data to Credentials via http.

* test: [EDXOLDMNG-224] creates tests for course certificate configuration credentials utils apis.

* feat: [EDXOLDMNG-224] Creates manage.py command to migrate course certificate coniguration.

* refactor: [EDXOLDMNG-224] code polishing for migrate cert config command.

* docs: [EDXOLDMNG-224] adds doc string for migrate_cert_config command's main class
GlugovGrGlib pushed a commit that referenced this pull request Jun 12, 2023
…rtificate configs to credentials (#2465)

* refactor: [EDXOLDMNG-224] Moves course certificate configuration creation and deletion to separate functions.

* feat: [EDXOLDMNG-218] uses course id instead of course key for CertificateConfigData container

* test: [EDXOLDMNG-224] updates SignalCourseCertificateConfigurationListenerTestCase tests in order refactoring the approach to send data to Credentials via http.

* test: [EDXOLDMNG-224] creates tests for course certificate configuration credentials utils apis.

* feat: [EDXOLDMNG-224] Creates manage.py command to migrate course certificate coniguration.

* refactor: [EDXOLDMNG-224] code polishing for migrate cert config command.

* docs: [EDXOLDMNG-224] adds doc string for migrate_cert_config command's main class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants