Skip to main content

Hex - Check Run Status

Overview​

First time using this Blueprint? Make sure you follow our Hex authorization guide.​

Check for the status of a project run on Hex. By default, Hex will return a response that contains the status of the project run (COMPLETED on success)

This Blueprint allows you to verify the status of a specified project run. If this Vessel has an upstream Vessel that runs a Hex project and the Run ID is not provided as an argument, then the Vessel will use the Run ID generated upstream and located in shipyard-artifacts/hex-blueprints/variables/RUNID.pickle.

The Vessel's exit code and status will match the status of the Hex project run.

  • If the run status is COMPLETED, the Vessel will return an exit code of 0, interpreted by Shipyard as successful
  • If the run status is PENDING, the Vessel will return an exit code of 220, an error
  • If the run status is RUNNING, the Vessel will return an exit code of 221, an error
  • If the run status is ERRORED, the Vessel will return an exit code of 222, an error
  • If the run status is KILLED, the Vessel will return an exit code of 224, an error
  • If the run status is UNABLE_TO_ALLOCATE_KERNEL, the Vessel will return an exit code of 225, an error

The response for this request will be stored at shipyard-artifacts/hex-blueprints/responses/run_RUNID_status_response.json

Recommended Setup:

  1. A Vessel built with this Blueprint should be paired with guardrail retries. This will allow the Vessel to continually check for status until a final result is found.
  2. This Vessel should run immediately after a Vessel built with the Hex - Run Project Blueprint. With this setup, you can leave the Run ID field blank and this Vessel will check for the results of the recently created run.

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
Project IDHEX_PROJECT_IDAlphanumericβœ…--The Project Id can be acquired from the project URL itself or from within the project's variables section. See authorization page for more.
API TokenHEX_API_TOKENPasswordβž–--The API token is generated by Hex for a set amount of time. See authorization page for more
Run IDHEX_RUN_IDAlphanumericβž–--The run id is associated to a refresh of a project and is automatically created when the project refresh is triggered

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

source:
blueprint: Hex - Check Run Status
inputs:
HEX_PROJECT_ID: null ## REQUIRED
HEX_API_TOKEN: null
HEX_RUN_ID: null
type: BLUEPRINT
guardrails:
retry_count: 4
retry_wait: 5m0s
runtime_cutoff: 5m0s
exclude_exit_code_ranges:
- "201-207"
- "222"
- "224"