MB-X Bilibili Pipeline
6 days ago bc7279a8849d393c59b8c4c3b98007e805ed895e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "SHARED_CONTENT_POSTCOMMIT_ARCHIVE_ROLLBACK_CONFIG_V1",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "identity", "roots", "binding", "test_control"],
  "properties": {
    "schema_version": {"const": "SHARED_CONTENT_POSTCOMMIT_ARCHIVE_ROLLBACK_CONFIG_V1"},
    "identity": {
      "type": "object",
      "additionalProperties": false,
      "required": ["task_id", "case_id", "batch_id", "run_id", "attempt_id", "archive_id", "rollback_id", "operator", "rollback_authorization_id", "rollback_audit_id"],
      "properties": {
        "task_id": {"type": "string", "minLength": 1},
        "case_id": {"type": "string", "minLength": 1},
        "batch_id": {"type": "string", "minLength": 1},
        "run_id": {"type": "string", "minLength": 1},
        "attempt_id": {"type": "string", "minLength": 1},
        "archive_id": {"type": "string", "minLength": 1},
        "rollback_id": {"type": "string", "pattern": "^ROLLBACK-"},
        "operator": {"type": "string", "minLength": 1},
        "rollback_authorization_id": {"type": "string", "pattern": "^AUTH-"},
        "rollback_audit_id": {"type": "string", "pattern": "^AUDIT-"}
      }
    },
    "roots": {
      "type": "object",
      "additionalProperties": false,
      "required": ["operation_root", "resolved_root", "archive_config_path"],
      "properties": {
        "operation_root": {"type": "string", "minLength": 3},
        "resolved_root": {"type": "string", "minLength": 3},
        "archive_config_path": {"$ref": "#/$defs/relativePath"}
      }
    },
    "binding": {
      "type": "object",
      "additionalProperties": false,
      "required": ["archive_config_bytes", "archive_config_sha256", "archive_terminal_bytes", "archive_terminal_sha256"],
      "properties": {
        "archive_config_bytes": {"type": "integer", "minimum": 1},
        "archive_config_sha256": {"$ref": "#/$defs/sha256"},
        "archive_terminal_bytes": {"type": "integer", "minimum": 1},
        "archive_terminal_sha256": {"$ref": "#/$defs/sha256"}
      }
    },
    "test_control": {
      "type": "object",
      "additionalProperties": false,
      "required": ["environment", "fault"],
      "properties": {
        "environment": {"enum": ["PRODUCTION", "ISOLATED_TEST"]},
        "fault": {"enum": ["NONE", "INTERRUPT_AFTER_ROLLBACK_ANCHOR", "INTERRUPT_BEFORE_ROLLBACK_RENAME", "INTERRUPT_AFTER_ROLLBACK_RENAME", "INTERRUPT_AFTER_ROLLBACK_TERMINAL_TEMP"]}
      }
    }
  },
  "$defs": {
    "sha256": {"type": "string", "pattern": "^[0-9A-F]{64}$"},
    "relativePath": {"type": "string", "minLength": 1, "pattern": "^(?![A-Za-z]:)(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$"}
  }
}