Update public large input metadata
This commit is contained in:
parent
c4141e0dee
commit
f8f91088d5
6 changed files with 113 additions and 4 deletions
|
|
@ -6068,6 +6068,35 @@ mod tests {
|
|||
assert!(inspection.metadata.debug_metadata.available);
|
||||
assert!(inspection.metadata.debug_metadata.source_level_breakpoints);
|
||||
assert!(inspection.metadata.debug_metadata.variables_pane_supported);
|
||||
assert!(
|
||||
inspection
|
||||
.metadata
|
||||
.large_input_policy
|
||||
.selected_inputs_are_content_digests
|
||||
);
|
||||
assert!(
|
||||
!inspection
|
||||
.metadata
|
||||
.large_input_policy
|
||||
.selected_input_bytes_included
|
||||
);
|
||||
assert!(
|
||||
!inspection
|
||||
.metadata
|
||||
.large_input_policy
|
||||
.full_repository_bytes_included
|
||||
);
|
||||
assert!(
|
||||
!inspection
|
||||
.metadata
|
||||
.large_input_policy
|
||||
.silent_task_argument_serialization
|
||||
);
|
||||
assert!(inspection
|
||||
.metadata
|
||||
.large_input_policy
|
||||
.supported_handle_types
|
||||
.contains(&"SourceSnapshot".to_owned()));
|
||||
assert!(!inspection.metadata.embeds_full_container_images);
|
||||
assert!(inspection
|
||||
.metadata
|
||||
|
|
@ -7658,6 +7687,31 @@ mod tests {
|
|||
report["bundle"]["metadata"]["debug_metadata"]["dap_virtual_process"],
|
||||
true
|
||||
);
|
||||
assert_eq!(
|
||||
report["bundle"]["metadata"]["large_input_policy"]
|
||||
["selected_inputs_are_content_digests"],
|
||||
true
|
||||
);
|
||||
assert_eq!(
|
||||
report["bundle"]["metadata"]["large_input_policy"]["selected_input_bytes_included"],
|
||||
false
|
||||
);
|
||||
assert_eq!(
|
||||
report["bundle"]["metadata"]["large_input_policy"]["full_repository_bytes_included"],
|
||||
false
|
||||
);
|
||||
assert_eq!(
|
||||
report["bundle"]["metadata"]["large_input_policy"]
|
||||
["silent_task_argument_serialization"],
|
||||
false
|
||||
);
|
||||
assert!(
|
||||
report["bundle"]["metadata"]["large_input_policy"]["supported_handle_types"]
|
||||
.as_array()
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|handle| handle == "Artifact")
|
||||
);
|
||||
assert_eq!(report["status"], "built");
|
||||
assert_eq!(report["scheduled_work"], false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ pub struct BundleMetadata {
|
|||
pub task_metadata: BundleTaskMetadata,
|
||||
pub source_metadata: BundleSourceMetadata,
|
||||
pub debug_metadata: BundleDebugMetadata,
|
||||
pub large_input_policy: BundleLargeInputPolicy,
|
||||
pub environments: Vec<EnvironmentResource>,
|
||||
pub selected_inputs: Vec<SelectedInput>,
|
||||
pub embeds_full_container_images: bool,
|
||||
|
|
@ -55,6 +56,15 @@ pub struct BundleDebugMetadata {
|
|||
pub variables_pane_supported: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct BundleLargeInputPolicy {
|
||||
pub selected_inputs_are_content_digests: bool,
|
||||
pub selected_input_bytes_included: bool,
|
||||
pub full_repository_bytes_included: bool,
|
||||
pub silent_task_argument_serialization: bool,
|
||||
pub supported_handle_types: Vec<String>,
|
||||
}
|
||||
|
||||
impl BundleIdentityInputs {
|
||||
pub fn identity(&self) -> Digest {
|
||||
let mut parts = vec![
|
||||
|
|
@ -114,6 +124,18 @@ impl BundleIdentityInputs {
|
|||
dap_virtual_process: true,
|
||||
variables_pane_supported: true,
|
||||
},
|
||||
large_input_policy: BundleLargeInputPolicy {
|
||||
selected_inputs_are_content_digests: true,
|
||||
selected_input_bytes_included: false,
|
||||
full_repository_bytes_included: false,
|
||||
silent_task_argument_serialization: false,
|
||||
supported_handle_types: vec![
|
||||
"SourceSnapshot".to_owned(),
|
||||
"Blob".to_owned(),
|
||||
"Artifact".to_owned(),
|
||||
"VFS".to_owned(),
|
||||
],
|
||||
},
|
||||
environments: self.environments.clone(),
|
||||
selected_inputs: self.selected_inputs.clone(),
|
||||
embeds_full_container_images: false,
|
||||
|
|
@ -189,6 +211,22 @@ mod tests {
|
|||
.transfer_policy
|
||||
.local_source_bytes_remain_node_local
|
||||
);
|
||||
assert!(
|
||||
metadata
|
||||
.large_input_policy
|
||||
.selected_inputs_are_content_digests
|
||||
);
|
||||
assert!(!metadata.large_input_policy.selected_input_bytes_included);
|
||||
assert!(!metadata.large_input_policy.full_repository_bytes_included);
|
||||
assert!(
|
||||
!metadata
|
||||
.large_input_policy
|
||||
.silent_task_argument_serialization
|
||||
);
|
||||
assert!(metadata
|
||||
.large_input_policy
|
||||
.supported_handle_types
|
||||
.contains(&"Artifact".to_owned()));
|
||||
assert_eq!(metadata.environments.len(), 1);
|
||||
assert!(!metadata.embeds_full_container_images);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ pub use auth::{
|
|||
PublicKeyIdentity, Scope,
|
||||
};
|
||||
pub use bundle::{
|
||||
BundleDebugMetadata, BundleIdentityInputs, BundleMetadata, BundleSourceMetadata,
|
||||
BundleTaskMetadata, SelectedInput,
|
||||
BundleDebugMetadata, BundleIdentityInputs, BundleLargeInputPolicy, BundleMetadata,
|
||||
BundleSourceMetadata, BundleTaskMetadata, SelectedInput,
|
||||
};
|
||||
pub use capability::{Capability, CapabilityReportError, EnvironmentBackend, NodeCapabilities, Os};
|
||||
pub use checkpoint::{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue