phacility/phabricator · error · Exception

Drydock lease PHID "%s" does not correspond to a valid lease

Error message

Drydock lease PHID "%s" does not correspond to a valid lease.

What it means

Error "Drydock lease PHID "%s" does not correspond to a valid lease." thrown in phacility/phabricator.

Source

Thrown at src/applications/harbormaster/artifact/HarbormasterDrydockLeaseArtifact.php:46

    return $viewer->renderHandle($lease_phid);
  }

  public function willCreateArtifact(PhabricatorUser $actor) {
    // We don't load the lease here because it's expected that artifacts are
    // created before leases actually exist. This guarantees that the leases
    // will be cleaned up.
  }

  public function loadArtifactLease(PhabricatorUser $viewer) {
    $artifact = $this->getBuildArtifact();
    $lease_phid = $artifact->getProperty('drydockLeasePHID');

    $lease = id(new DrydockLeaseQuery())
      ->setViewer($viewer)
      ->withPHIDs(array($lease_phid))
      ->executeOne();
    if (!$lease) {
      throw new Exception(
        pht(
          'Drydock lease PHID "%s" does not correspond to a valid lease.',
          $lease_phid));
    }

    return $lease;
  }

  public function releaseArtifact(PhabricatorUser $actor) {
    try {
      $lease = $this->loadArtifactLease($actor);
    } catch (Exception $ex) {
      // If we can't load the lease, treat it as already released. Artifacts
      // are generated before leases are queued, so it's possible to arrive
      // here under normal conditions.
      return;
    }

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/harbormaster/artifact/HarbormasterDrydockLeaseArtifact.php:46 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/461ab620060883ca. Report an issue: GitHub.