canic_host/deployment_truth/model/promotion/plan/
mod.rs1use super::super::{
2 ArtifactSourceV1, DeploymentExecutionPreflightV1, DeploymentPlanV1, SafetyFindingV1,
3};
4use super::identity::PromotionArtifactIdentityReportV1;
5use super::materialization::RolePromotionMaterializationLinkV1;
6use super::source::{
7 PromotionArtifactLevelV1, PromotionReadinessStatusV1, RoleArtifactSourceKindV1,
8};
9use serde::{Deserialize, Serialize};
10
11#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
15pub struct PromotionReadinessV1 {
16 pub schema_version: u32,
17 pub readiness_id: String,
18 pub promotion_readiness_digest: String,
19 pub target_plan_id: String,
20 pub status: PromotionReadinessStatusV1,
21 pub roles: Vec<RolePromotionReadinessV1>,
22 pub blockers: Vec<SafetyFindingV1>,
23 pub warnings: Vec<SafetyFindingV1>,
24}
25
26#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
30pub struct PromotionPlanTransformV1 {
31 pub schema_version: u32,
32 pub transform_id: String,
33 pub target_plan_id: String,
34 pub promoted_plan_id: String,
35 pub promotion_plan_lineage_digest: String,
36 pub promoted_plan: DeploymentPlanV1,
37 pub roles: Vec<RolePromotionPlanTransformV1>,
38}
39
40#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
44pub struct ArtifactPromotionPlanV1 {
45 pub schema_version: u32,
46 pub plan_id: String,
47 pub artifact_promotion_plan_digest: String,
48 pub generated_at: String,
49 pub status: PromotionReadinessStatusV1,
50 pub target_plan_id: String,
51 pub promoted_plan_id: String,
52 pub promotion_plan_lineage_digest: String,
53 pub readiness: PromotionReadinessV1,
54 pub artifact_identity_report: PromotionArtifactIdentityReportV1,
55 pub transform: PromotionPlanTransformV1,
56 pub target_execution_lineage: Option<PromotionTargetExecutionLineageV1>,
57 pub blockers: Vec<SafetyFindingV1>,
58}
59
60#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
64pub struct PromotionPlanTransformEvidenceV1 {
65 pub schema_version: u32,
66 pub evidence_id: String,
67 pub promotion_plan_transform_evidence_digest: String,
68 pub generated_at: String,
69 pub transform: PromotionPlanTransformV1,
70}
71
72#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
76pub struct PromotionTargetExecutionLineageV1 {
77 pub schema_version: u32,
78 pub lineage_id: String,
79 pub generated_at: String,
80 pub target_execution_lineage_digest: String,
81 pub transform: PromotionPlanTransformV1,
82 pub execution_preflight: DeploymentExecutionPreflightV1,
83 pub execution_attempted: bool,
84}
85
86#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
90pub struct RolePromotionPlanTransformV1 {
91 pub role: String,
92 pub promotion_level: PromotionArtifactLevelV1,
93 pub source_kind: RoleArtifactSourceKindV1,
94 pub source_locator: Option<String>,
95 pub artifact_source_before: ArtifactSourceV1,
96 pub artifact_source_after: ArtifactSourceV1,
97 pub wasm_sha256_before: Option<String>,
98 pub wasm_sha256_after: Option<String>,
99 pub wasm_gz_sha256_before: Option<String>,
100 pub wasm_gz_sha256_after: Option<String>,
101 pub candid_sha256_before: Option<String>,
102 pub candid_sha256_after: Option<String>,
103 pub canonical_embedded_config_sha256_before: Option<String>,
104 pub canonical_embedded_config_sha256_after: Option<String>,
105 pub artifact_identity_changed: bool,
106 pub embedded_config_changed: bool,
107 pub target_materialization_preserved: bool,
108 pub source_build_materialization: Option<RolePromotionMaterializationLinkV1>,
109}
110
111#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
115pub struct RolePromotionReadinessV1 {
116 pub role: String,
117 pub promotion_level: PromotionArtifactLevelV1,
118 pub source_kind: RoleArtifactSourceKindV1,
119 pub source_locator: Option<String>,
120 pub source_wasm_sha256: Option<String>,
121 pub source_wasm_gz_sha256: Option<String>,
122 pub target_wasm_sha256: Option<String>,
123 pub target_wasm_gz_sha256: Option<String>,
124 pub source_canonical_embedded_config_sha256: Option<String>,
125 pub target_canonical_embedded_config_sha256: Option<String>,
126 pub byte_identical_wasm: Option<bool>,
127 pub embedded_config_identical: Option<bool>,
128 pub target_store_has_artifact: Option<bool>,
129 pub restage_required: bool,
130}