-
Notifications
You must be signed in to change notification settings - Fork 194
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: make lease expiration times configurable #2217
feat: make lease expiration times configurable #2217
Conversation
Thanks for the pull request, @0x29a! What's next?Please work through the following steps to get your changes 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. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by 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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2217 +/- ##
=======================================
Coverage 95.12% 95.12%
=======================================
Files 195 195
Lines 21601 21603 +2
Branches 1936 1936
=======================================
+ Hits 20547 20549 +2
Misses 786 786
Partials 268 268
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e64bca4
to
63e5e0c
Compare
Hey @0x29a, just checking in to see if this PR is still needed? |
@itsjeyd, yes, it is. I updated the description and marked it as ready for review. |
Thanks @0x29a. I requested a review from the maintaining team (see "Who will review my changes?" above). Hey @openedx/2u-aurora, please have a look at this PR when you can. |
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.
Makes sense to me, can you bump the version so we can do a release with the new feature.
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.
@0x29a Thank you for submitting this change :) It works perfectly.
Couple of requests below, and could you also bump the patch version in package.json
and openassessment/__init__.py
? That lets me create a new release, so this change can get into edx-platform.
@@ -108,7 +109,7 @@ class PeerWorkflow(models.Model): | |||
|
|||
""" | |||
# Amount of time before a lease on a submission expires | |||
TIME_LIMIT = timedelta(hours=8) | |||
TIME_LIMIT = timedelta(hours=getattr(settings, "PEER_LEASE_EXPIRATION_HOURS", 8)) |
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.
@0x29a Could you prefix these two new settings with ORA_
so we know what app they affect?
I also think we need to document these as SettingDictToggle
s in edx-platform somewhere so operators know they exist. I think they can go in cms.djangoapps.contentstore.toggles.
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.
@pomegranited, good catch, thanks. Fixed.
I also think we need to document these as SettingDictToggles in edx-platform somewhere so operators know they exist. I think they can go in cms.djangoapps.contentstore.toggles.
Hmm, this setting isn't a toggle and it's not CMS-specific. There are other ORA-prefixed settings here: https://docs.openedx.org/projects/edx-platform/en/latest/references/settings.html, which is auto-generated from common.py
. Perhaps we can add it there?
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.
Ah good points that this isn't a "toggle", and it's not used in the CMS. If you can add it to the lms.env.common and get into those docs, that would be great -- doesn't have to block merging this though, so I'll do that today.
63e5e0c
to
55b3bf1
Compare
55b3bf1
to
51d9765
Compare
Thanks for reviewing this, @feanil.
Done. ✅ |
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.
👍
- I tested this on my devstack making sure the settings get used as expected.
- I read through the code
-
I checked for accessibility issuesN/A -
Includes documentation-- discussed documenting these settings in lms.env.common -
User-facing strings are extracted for translationN/A
Description
By default, ORA hands off an assignment for which a peer review hasn’t been submitted to the next learner after 8 hours - some learners start a peer review, then come back the next morning and find the response gone. This PR makes lease expiration times configurable, thus preventing responses from disappearing if they're set to 24 hours, for example.
Testing instructions
1
.private-ref