Page MenuHomePhabricator

Allow Drydock leases to expire after a time limit
ClosedPublic

Authored by epriestley on Sep 23 2015, 8:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 20, 9:28 PM
Unknown Object (File)
Tue, Mar 19, 7:25 PM
Unknown Object (File)
Tue, Mar 19, 6:41 PM
Unknown Object (File)
Fri, Mar 8, 12:33 PM
Unknown Object (File)
Fri, Mar 8, 10:40 AM
Unknown Object (File)
Mon, Mar 4, 6:15 PM
Unknown Object (File)
Mon, Mar 4, 6:15 PM
Unknown Object (File)
Feb 18 2024, 3:22 PM
Subscribers

Details

Summary

Ref T6569. If a lease is activated with an expiration date, schedule a task to try to clean it up after that time.

Test Plan
  • Used bin/drydock lease ... --until ... to activate a lease in the near future.
  • Waited for a bit.
  • Saw it expire and get destroyed at the scheduled time.

Diff Detail

Repository
rP Phabricator
Branch
drydock4
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8033
Build 9098: [Placeholder Plan] Wait for 30 Seconds
Build 9097: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Allow Drydock leases to expire after a time limit.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: chad, hach-que.
chad edited edge metadata.
chad added inline comments.
src/applications/drydock/management/DrydockManagementLeaseWorkflow.php
18–20

align?

This revision is now accepted and ready to land.Sep 23 2015, 8:32 PM

I'm intentionally moving away from aligning stuff in the middle of blocks because it messes with blame and generally tends to produce churn without much benefit.

(In theory, blame would be smarter, and there is git blame -w which is somewhat smarter, but in practice I think it's easier to just not align things.)

This revision was automatically updated to reflect the committed changes.
artms added inline comments.
src/infrastructure/daemon/workers/PhabricatorWorker.php
122

If queue is empty and this is the only task into the queue - it will be immediately executed - is this expected behavior?

By default PhabricatorWorkerLeaseQuery fetches unleased tasks which are leaseOwner IS NULL (https://secure.phabricator.com/source/phabricator/browse/master/src/infrastructure/daemon/workers/query/PhabricatorWorkerLeaseQuery.php$226), so setting leaseExpire without setting leaseOwner looks like not to yield any delay at all...