-
Notifications
You must be signed in to change notification settings - Fork 4k
feat: create Import and related models #36515
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
feat: create Import and related models #36515
Conversation
Thanks for the pull request, @NiedielnitsevIvan! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
1dea8a9
to
c4178a7
Compare
# PENDING: The import has been created, but the OLX and related data are not yet in the library. | ||
# It is not ready to be read. | ||
PENDING = 'pending', _('Pending') | ||
# READY: The content is staged and ready to be read. | ||
READY = 'ready', _('Ready') | ||
# IMPORTED: The content has been imported into the library. | ||
IMPORTED = 'imported', _('Imported') | ||
# CANCELED: The import was canceled before it was imported. | ||
CANCELED = 'canceled', _('Canceled') | ||
# ERROR: The content could not be imported. | ||
ERROR = 'error', _('Error') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# PENDING: The import has been created, but the OLX and related data are not yet in the library. | |
# It is not ready to be read. | |
PENDING = 'pending', _('Pending') | |
# READY: The content is staged and ready to be read. | |
READY = 'ready', _('Ready') | |
# IMPORTED: The content has been imported into the library. | |
IMPORTED = 'imported', _('Imported') | |
# CANCELED: The import was canceled before it was imported. | |
CANCELED = 'canceled', _('Canceled') | |
# ERROR: The content could not be imported. | |
ERROR = 'error', _('Error') | |
NOT_STARTED = 'not_started', _('Waiting to stage content') | |
STAGING = 'staging', _('Staging content for import') | |
STAGING_FAILED = _('Failed to stage content') | |
STAGING_CANCELED = _('Canceled while staging content') | |
STAGED = 'staged', _('Content is staged and ready for import') | |
IMPORTING = 'importing', _('Importing staged content') | |
IMPORTING_FAILED = 'importing_failed', _('Failed to import staged content') | |
IMPORTING_CANCELED = 'canceled', _('Canceled while importing staged content') | |
IMPORTED = 'imported', _('Successfully imported content') |
Since the import process happens in two major parts (staging, importing), I think we should reflect that in the statuses.
Also, we can make the human-readable names more informative, which removes the need for code comments, and makes these strings more useful for the end user.
How do these statuses look to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that 2 statuses STAGING_CANCELED
and IMPORTING_CANCELED
are redundant, since I can hardly imagine canceling an import that is already in the process of importing, so I left just 1 status for this, and all other changes to the ones you suggested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your quick work. Above are my final comments. Once those are resolved, I'll merge this.
b091bbc
to
d9c3959
Compare
Check Django Migrations is falling because openedx-learning has no commited migration. |
@kdmccormick I added the migration that was missing, I propose to merged it and update the version so that we can merge this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once tests pass
Please restart failed checkers, they have to pass now, I don't have the permissions to do that |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
2U Release Notice: This PR has been deployed to the edX production environment. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
2U Release Notice: This PR has been deployed to the edX production environment. |
@NiedielnitsevIvan @kdmccormick Any specific reason for not creating the migration file for this new model file? |
No reason @navinkarkera , I can fix forward shortly. I'm surprised the linter didn't catch it. |
A new application has been created, described in this ADR: openedx#36545 have been created, as well as related models for mapping original content and new content created during the import process. Python and Django APIs, as well as a Django admin interface, will soon follow.
A new application has been created, described in this ADR: #36545 have been created, as well as related models for mapping original content and new content created during the import process. Python and Django APIs, as well as a Django admin interface, will soon follow.
Description
A new application has been created, described in the following ADR
New models for saving events of legacy content imports to Content Libraries have been created, as well as related models for mapping original content and new content created during the import process.
Supporting information
More details about the new app can be found in the ADR, as well as the README file.
Testing instructions