Skip to content

openagents_sdk::land

Submit and inspect changes in the shared landing queue (/v1/land).

ItemWhat it does
Land structA signed-in client's access to the shared landing queue.
LandBusy structA change the integrator is currently checking.
LandEntry structA submitted change and the results of its landing attempts, when requested.
LandHeartbeat structThe integrator's latest report of its work and capacity.
LandInstance structThe cloud computer that runs the integrator.
LandIntegrator structWhether the integrator has sent a recent heartbeat, and its latest report.
LandLane enumWhich checks the integrator runs for a change.
LandRecord structThe checks, result, and progress notes from one landing attempt.
LandState enumWhere a submitted change stands.
LandStatus structThe integrator and changes waiting, landing, or returned to their authors.
LandSubmit structA branch already pushed to its repository's `origin`, ready to land.

Land

pub struct Land<'a> {}

A signed-in client's access to the shared landing queue.

Land::submit

pub async fn submit(
    &self,
    request_id: &str,
    entry: LandSubmit,
    cancel: &CancellationToken,
) -> Result<LandEntry, Error>

Submits a pushed branch. Reuse request_id and the same body after an uncertain response.

Land::status

pub async fn status(&self, cancel: &CancellationToken) -> Result<LandStatus, Error>

Reads the integrator's state and waiting, active, and failed changes.

Land::show

pub async fn show(
    &self,
    id: &str,
    cancel: &CancellationToken,
) -> Result<LandEntry, Error>

Fetches a change and all recorded landing attempts.

Land::withdraw

pub async fn withdraw(&self, id: &str, cancel: &CancellationToken) -> Result<(), Error>

Removes a waiting change from the queue.

LandBusy

pub struct LandBusy {
    pub slot: String,
    pub lane: String,
    pub entry: String,
    pub since: u64,
}

A change the integrator is currently checking.

LandEntry

pub struct LandEntry {
    pub id: String,
    pub branch: String,
    pub target: String,
    pub issue: Option<u64>,
    pub close: bool,
    pub author: String,
    pub machine: String,
    pub summary: String,
    pub head: String,
    pub submitted_at: u64,
    pub state: LandState,
    pub updated_at: u64,
    pub tries: u32,
    pub commit: Option<String>,
    pub reason: Option<String>,
    pub worker: Option<String>,
    pub lane: Option<LandLane>,
    pub slot: Option<String>,
    pub started_at: Option<u64>,
    pub waiting_for: Option<String>,
    pub records: Vec<LandRecord>,
}

A submitted change and the results of its landing attempts, when requested.

LandHeartbeat

pub struct LandHeartbeat {
    pub machine: String,
    pub at: u64,
    pub current: Option<String>,
    pub instance: Option<LandInstance>,
    pub slots: Vec<LandBusy>,
    pub capacity: Option<u32>,
    pub draining: bool,
}

The integrator's latest report of its work and capacity.

LandInstance

pub struct LandInstance {
    pub project: String,
    pub zone: String,
    pub name: String,
}

The cloud computer that runs the integrator.

LandIntegrator

pub struct LandIntegrator {
    pub running: bool,
    pub heartbeat: Option<LandHeartbeat>,
}

Whether the integrator has sent a recent heartbeat, and its latest report.

LandLane

pub enum LandLane {
    Fast,
    Code,
}

Which checks the integrator runs for a change.

LandRecord

pub struct LandRecord {
    pub entry: String,
    pub number: u32,
    pub worker: String,
    pub started_at: u64,
    pub ended_at: u64,
    pub outcome: String,
    pub target_before: String,
    pub commit: Option<String>,
    pub landing: Vec<String>,
    pub checks: Vec<String>,
    pub problems: Vec<String>,
    pub repaired: bool,
    pub notes: Vec<String>,
    pub lane: String,
    pub slot: String,
    pub regenerated: Vec<String>,
}

The checks, result, and progress notes from one landing attempt.

LandState

pub enum LandState {
    Queued,
    Landing,
    Landed,
    Bounced,
    Withdrawn,
}

Where a submitted change stands.

LandStatus

pub struct LandStatus {
    pub queue: String,
    pub integrator: LandIntegrator,
    pub waiting: Vec<LandEntry>,
    pub landing: Vec<LandEntry>,
    pub failed: Vec<LandEntry>,
}

The integrator and changes waiting, landing, or returned to their authors.

LandSubmit

pub struct LandSubmit {
    pub repo: String,
    pub branch: String,
    pub issue: Option<u64>,
    pub summary: Option<String>,
}

A branch already pushed to its repository's origin, ready to land.