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

feat: make lease expiration times configurable #2217

Conversation

0x29a
Copy link
Contributor

@0x29a 0x29a commented Jul 16, 2024

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. Set both settings to 1.
  2. Start a peer review, but don't submit anything.
  3. After an hour, verify that your assignment has been handed off.

private-ref

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jul 16, 2024
@openedx-webhooks
Copy link

openedx-webhooks commented Jul 16, 2024

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If 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 @openedx/2u-aurora. Tag them in a comment and let them know that your changes are ready for review.

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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

Copy link

codecov bot commented Jul 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.12%. Comparing base (a8d0136) to head (51d9765).
Report is 7 commits behind head on master.

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           
Flag Coverage Δ
unittests 95.12% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@0x29a 0x29a force-pushed the 0x29a/BB-8990/configurable-lease-expiration-time branch 2 times, most recently from e64bca4 to 63e5e0c Compare July 16, 2024 13:29
@itsjeyd
Copy link

itsjeyd commented Sep 7, 2024

Hey @0x29a, just checking in to see if this PR is still needed?

@itsjeyd itsjeyd added the inactive PR author has been unresponsive for several months label Sep 7, 2024
@0x29a 0x29a marked this pull request as ready for review September 10, 2024 11:24
@0x29a 0x29a requested a review from a team as a code owner September 10, 2024 11:24
@0x29a
Copy link
Contributor Author

0x29a commented Sep 10, 2024

@itsjeyd, yes, it is. I updated the description and marked it as ready for review.

@0x29a 0x29a changed the title feat: make lease expiration times configurable [WIP] feat: make lease expiration times configurable Sep 10, 2024
@itsjeyd itsjeyd added waiting for eng review PR is ready for review. Review and merge it, or suggest changes. and removed inactive PR author has been unresponsive for several months labels Sep 11, 2024
@itsjeyd itsjeyd requested a review from a team September 11, 2024 08:21
@itsjeyd
Copy link

itsjeyd commented Sep 11, 2024

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.

@itsjeyd itsjeyd added the needs reviewer assigned PR needs to be (re-)assigned a new reviewer label Oct 11, 2024
Copy link
Contributor

@feanil feanil left a 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.

@itsjeyd itsjeyd added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed waiting for eng review PR is ready for review. Review and merge it, or suggest changes. needs reviewer assigned PR needs to be (re-)assigned a new reviewer labels Oct 17, 2024
Copy link
Contributor

@pomegranited pomegranited left a 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))
Copy link
Contributor

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 SettingDictToggles in edx-platform somewhere so operators know they exist. I think they can go in cms.djangoapps.contentstore.toggles.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@0x29a 0x29a force-pushed the 0x29a/BB-8990/configurable-lease-expiration-time branch from 63e5e0c to 55b3bf1 Compare October 18, 2024 11:58
@0x29a 0x29a force-pushed the 0x29a/BB-8990/configurable-lease-expiration-time branch from 55b3bf1 to 51d9765 Compare October 18, 2024 12:09
@0x29a
Copy link
Contributor Author

0x29a commented Oct 21, 2024

Thanks for reviewing this, @feanil.

Makes sense to me, can you bump the version so we can do a release with the new feature.

Done. ✅

Copy link
Contributor

@pomegranited pomegranited left a 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 issues N/A
  • Includes documentation -- discussed documenting these settings in lms.env.common
  • User-facing strings are extracted for translation N/A

@pomegranited pomegranited merged commit 9dd14c0 into openedx:master Oct 22, 2024
11 checks passed
@pomegranited pomegranited deleted the 0x29a/BB-8990/configurable-lease-expiration-time branch October 22, 2024 00:33
@itsjeyd itsjeyd removed the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Oct 24, 2024
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
Development

Successfully merging this pull request may close these issues.

5 participants