SpaceDeployFailedPayload space.deploy.failed@1

Generated at from openvibe-contracts v0.150.0 and openvibe-sdk v0.44.0.

Version
1.0.0
Owner
space
Visibility
first-party
Status
active
Compatibility
backward
Decision
ADR-004
Schema
https://openvibe.network/contracts/events/payloads/space.deploy.failed.v1.json

space.deploy.failed v1 (OpenVibe.Space, subject deploy dpl_…, visibility internal): an upload was refused and recorded as a failed deploy with its log, so the owner can see why. Problem codes only, at most ten; never file contents.

Fields

FieldTypeRequiredDescriptionConstraints
project_idstringyes
  • pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$
site_idstringyes
  • pattern ^sit_[0-9A-HJKMNP-TV-Z]{26}$
sitestringyesthe site name (one DNS label; the site is served at <site>.openvibe.website)
  • pattern ^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){2,39}$
codestringyesthe refusal problem code (for example deploy.too_large or storage.space_full)
  • pattern ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$
problemsarray of stringyesthe problem codes of the files that were refused
  • maxItems 10
  • items: pattern ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)*$

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: disk-full
{
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "site_id": "sit_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "site": "alpha-site",
  "code": "storage.space_full",
  "problems": []
}
Valid: too-large
{
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "site_id": "sit_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "site": "alpha-site",
  "code": "deploy.too_large",
  "problems": [
    "file.too_large"
  ]
}
Rejected: eleven-problems
{
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "site_id": "sit_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "site": "alpha-site",
  "code": "deploy.invalid",
  "problems": [
    "file.bad_path",
    "file.bad_path",
    "file.bad_path",
    "file.bad_path",
    "file.bad_path",
    "file.bad_path",
    "file.bad_path",
    "file.bad_path",
    "file.bad_path",
    "file.bad_path",
    "file.bad_path"
  ]
}
Rejected: file-contents
{
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "site_id": "sit_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "site": "alpha-site",
  "code": "deploy.too_large",
  "problems": [
    "file.too_large"
  ],
  "content": "<html>"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('space.deploy.failed@1', value);   // { valid, errors: [{ path, message }] }