Skip to content

add PI group expiration#744

Open
simonLeary42 wants to merge 8 commits into
mainfrom
group-expiration
Open

add PI group expiration#744
simonLeary42 wants to merge 8 commits into
mainfrom
group-expiration

Conversation

@simonLeary42

@simonLeary42 simonLeary42 commented Jun 11, 2026

Copy link
Copy Markdown
Member

This can be useful for course groups and "trial" groups.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds support for expiring PI groups based on a stored expiration timestamp by introducing a new SQL table, SQL accessors, and a worker that disables groups whose expiration date has passed, along with a functional test validating the behavior.

Changes:

  • Add pi_group_expiration_dates table (dev bootstrap) and document its creation in the changelog.
  • Add UnitySQL APIs to set/get/list PI group expiration dates.
  • Add group-expiry.php worker plus a functional test to disable expired groups.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
workers/group-expiry.php New CLI worker to disable PI groups whose expiration date is in the past.
tools/docker-dev/sql/bootstrap.sql Adds pi_group_expiration_dates table to local/dev bootstrap schema.
resources/lib/UnitySQL.php Adds CRUD/list methods for PI group expiration dates.
test/functional/WorkerGroupExpiryTest.php New functional test covering worker behavior and cleanup.
test/functional/WorkerUnityCourseTest.php Removes LDAP-connection reset workaround after running worker subprocess.
resources/lib/UnityGroup.php Sorts group member objects returned by getGroupMembers().
CHANGELOG.md Notes new required SQL table for the feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/functional/WorkerGroupExpiryTest.php
Comment thread test/functional/WorkerGroupExpiryTest.php
Comment thread resources/lib/UnityGroup.php
@simonLeary42 simonLeary42 changed the title add PI expiration date table add PI group expiration Jun 11, 2026
Comment on lines -33 to -34
// our LDAP conn doesn't know about changes from subprocess
unset($GLOBALS["ldapconn"]);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is no longer necessary since executeWorker was updated to pullObject on all LDAP entries in #598

@simonLeary42 simonLeary42 requested a review from bryank-cs June 11, 2026 20:02
@simonLeary42 simonLeary42 marked this pull request as draft June 15, 2026 16:10
@simonLeary42 simonLeary42 marked this pull request as ready for review June 15, 2026 17:19
@simonLeary42

Copy link
Copy Markdown
Member Author

TODO unity-course.php re-enable

@simonLeary42

Copy link
Copy Markdown
Member Author

#620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants