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

[OldMongo FC-0004] ADR for migrate certificate signatures #31171

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

UvgenGen
Copy link
Contributor

@UvgenGen UvgenGen commented Oct 19, 2022

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 19, 2022
@openedx-webhooks
Copy link

Thanks for the pull request, @UvgenGen! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@UvgenGen UvgenGen force-pushed the sagirov/EDXOLDMNG-171 branch 2 times, most recently from 96140a6 to ace63fa Compare October 19, 2022 11:56
Copy link
Contributor

@ormsbee ormsbee left a comment

Choose a reason for hiding this comment

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

I don't have a good grasp on what the data models and views are for this today, and whether the signature data canonically belongs in this app or in the Credentials service. I'd love to get more clarity on exactly what's going where as part of this ADR.

@@ -0,0 +1,45 @@

Transfer certificate signatures from Mongo
Copy link
Contributor

Choose a reason for hiding this comment

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

The title should specify where they're being transferred to.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, updated


Context
*******
As a part of Old Mongo Deprecation work https://github.com/openedx/public-engineering/issues/62
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use the link syntax for rST here.

Copy link
Member

Choose a reason for hiding this comment

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

The links were changed


* credentials API must be extended to provide endpoints for adding and retrieving signatures

* `CourseCertificateViewSet` API
Copy link
Contributor

Choose a reason for hiding this comment

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

That's a viewset from the Credentials service, right? Is this going to involve the certificates app in edx-platform at all then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's a viewset from the Credentials service. For now we planning transfer only certificate signatures but get other certificate data from mongo.


* `CourseCertificateViewSet` API

* added signal to copy signatures from Mongo to Credentials on course publish, certificate or signature update
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* added signal to copy signatures from Mongo to Credentials on course publish, certificate or signature update
* add a new `OpenEdxPublicSignal` that is emitted from Studio whenever certificate-related data is changed (e.g. certificate image upload, course import). The signature image can be exposed as a URL.
* signal receiver will copy the signature image to [????]

Copy link
Member

Choose a reason for hiding this comment

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

Updated


* added signal to copy signatures from Mongo to Credentials on course publish, certificate or signature update
* added management command to copy signatures from (OLD or both?) Mongo to Credentials
* updated certifecate views for getting signatures from Credentials
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* updated certifecate views for getting signatures from Credentials
* update certificate views for getting signatures from Credentials

* `CourseCertificateViewSet` API

* added signal to copy signatures from Mongo to Credentials on course publish, certificate or signature update
* added management command to copy signatures from (OLD or both?) Mongo to Credentials
Copy link
Contributor

Choose a reason for hiding this comment

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

I would strongly push for copying signatures out of both Old and Split Mongo. The deprecation of Old Mongo is prompting this work, but Credentials should have its own copy of this data since it's needed for serving certificate information. Also, it'd be weird to special case it for only Old Mongo courses (which are very rare), while having a different code path for Split.

Copy link
Member

Choose a reason for hiding this comment

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

@ormsbee Course certs are served out of LMS not Credentials, so are you proposing that we should serve Course Certs out of LMS but globally serve the signatures out of Credentials (for both course and program certs) prior to migrating the Course Certs themselves?

Copy link
Member

Choose a reason for hiding this comment

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

@hurtstotouchfire in the ADR we stated that signatures and certificate configurations will be copied to Credentials, but the signatures will be used only when signature from MongoDB is not available (right now this case is specific for Old Mongo courses). The certificate configurations will be pushed to credentials using the management command (planned only for Old Mongo courses), and based on new course certificate update signal (for Split courses).

In the future, we would like to move certificate rendering logic from LMS to Credentials+MFEs, as was proposed in BD-11.
I hope the intermediate step, when we need to get certificates configuration from MongoDB, but signatures from Credentials for Split courses, wouldn't be required.

Copy link
Contributor

Choose a reason for hiding this comment

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

@hurtstotouchfire We are proposing that the complete migration of course certificates is out of scope for this project. The driver here is to unblock the full deprecation of the Old Mongo Modulestore. Achieving full deprecation requires moving signature assets and we want to do it in a way aligned with the future vision for all certificates living in the Credentials IDA.

@UvgenGen UvgenGen force-pushed the sagirov/EDXOLDMNG-171 branch 2 times, most recently from b2a9309 to 211706b Compare October 24, 2022 10:19

Decision
********
To keep access to the certificate signatures will be used external signatures from credentials on WEB/PDF
Copy link
Contributor

Choose a reason for hiding this comment

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

There's something garbled in this sentence.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you, we have updated it to be more specific


* credentials API must be extended to provide endpoints for adding and retrieving signatures

* `CourseCertificateViewSet` API must be updated with possibility uploading signature
Copy link
Contributor

Choose a reason for hiding this comment

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

by "possibility", do you mean "optionally"?

Copy link
Member

Choose a reason for hiding this comment

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

That's right, the signature create/update should be optional when pushing a certificate configuration to Credentials from LMS

Copy link
Member

Choose a reason for hiding this comment

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

Updated

@GlugovGrGlib
Copy link
Member

@ormsbee @cdeery
Please review the ADR once again, we have provided some updates to the unclear parts.

Copy link
Contributor

@cdeery cdeery left a comment

Choose a reason for hiding this comment

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

I am adding my approval, but I would like to hear if @ormsbee has any additional feedback before it is merged.

@GlugovGrGlib
Copy link
Member

@ormsbee I have changed the ADR's status to Accepted, squashed commits, rebased the changes to the latest master and force pushed them into working branch.
It is ready to be merged now.

@ormsbee
Copy link
Contributor

ormsbee commented Nov 30, 2022

Ack, sorry, forgot to merge this. But will do so once checks finish running.

@ormsbee ormsbee merged commit 33968fb into openedx:master Nov 30, 2022
@openedx-webhooks
Copy link

@UvgenGen 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Status: Done
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants