diff --git a/api/golang/core/kurtosis_core_rest_api_bindings/api_container_server.gen.go b/api/golang/core/kurtosis_core_rest_api_bindings/api_container_server.gen.go index 7f10a57f21..8d6799f73c 100644 --- a/api/golang/core/kurtosis_core_rest_api_bindings/api_container_server.gen.go +++ b/api/golang/core/kurtosis_core_rest_api_bindings/api_container_server.gen.go @@ -536,7 +536,7 @@ type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponseObject inter VisitGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONResponse InspectFilesArtifactContents +type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONResponse []FileArtifactDescription func (response GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONResponse) VisitGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -1321,68 +1321,70 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.C // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+xce28bOZL/KkTfAZlZKFY2u1gc/J/j2ImwiSxY9voO46CX6i5JnLDJXj5sawJ99wNf", - "/VBTcsuvZAbzzySjJotk1a+K9WK+JRkvSs6AKZkcfktKLHABCoT9PywUmeNMpSQHpsicgDA/5yAzQUpF", - "OEsOk4sloDAQMVwA4gJpTfJkkBAzoMRqmQwS8yk5jNIcJAL+o4mAPDlUQsMgkdkSCmwWU6vSTJNKELZI", - "1utBAiyj+AY2NhVZKjJw10rdY5U4+4oXgGoCSC2xQreEUjQDBHeQaQXmpN1t+skpyR9NPHK2BvX9uFdy", - "oVKmi9k2WZoByA1AiqNsCdlXhG8woXhGKFGrLRtq0N21ozkXBVbJYUKY+tvbmnOEKViAsHuUIG5IBvfC", - "zo9rspDPkVoCyjhTmLDAU/dTUWCWI7nkmuZN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ikXylYQmpWx76Tk+1dVv830XGeir9QY0MJ6sVGLq6vg+HgXZqBeu76DTn9FI0exVLtXbqJk", + "h/kgfosfwfkY0mNSC9uf0IQ48CPXqS+HVDOabwuP0NWKSCQVFPadklUP/5K/+u4/xaz2nS9TCA18X+Ew", + "C1FfLH/wGsgTnIytuEZfd08sNgN8jorw7Dji9l12KUG8kmgOK0wX38Z+9+/4pdyMyiOT5zKlAQ19hlTt", + "QY34zdbA0Ge0frzskNdfC0x+Z42dOSx+4NxB+4sD/1G8tuJtNv8fAAD//22Zx2Q3VQAA", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/api/golang/core/kurtosis_core_rest_api_bindings/api_container_types.gen.go b/api/golang/core/kurtosis_core_rest_api_bindings/api_container_types.gen.go index 21058c92d9..6e1f416801 100644 --- a/api/golang/core/kurtosis_core_rest_api_bindings/api_container_types.gen.go +++ b/api/golang/core/kurtosis_core_rest_api_bindings/api_container_types.gen.go @@ -4,6 +4,9 @@ package kurtosis_core_rest_api_bindings import ( + "encoding/json" + + "github.com/deepmap/oapi-codegen/pkg/runtime" openapi_types "github.com/deepmap/oapi-codegen/pkg/types" ) @@ -61,24 +64,17 @@ const ( // 1 - NO_CONNECT // Port forwarding disabled type Connect string -// ConnectServices defines model for ConnectServices. -type ConnectServices struct { - // Connect 0 - CONNECT // Best effort port forwarding - // 1 - NO_CONNECT // Port forwarding disabled - Connect *Connect `json:"connect,omitempty"` -} - // Container defines model for Container. type Container struct { - CmdArgs *[]string `json:"cmd_args,omitempty"` - EntrypointArgs *[]string `json:"entrypoint_args,omitempty"` - EnvVars *map[string]string `json:"env_vars,omitempty"` - ImageName *string `json:"image_name,omitempty"` + CmdArgs []string `json:"cmd_args"` + EntrypointArgs []string `json:"entrypoint_args"` + EnvVars map[string]string `json:"env_vars"` + ImageName string `json:"image_name"` // Status 0 - STOPPED // 1 - RUNNING // 2 - UNKNOWN - Status *ContainerStatus `json:"status,omitempty"` + Status ContainerStatus `json:"status"` } // ContainerStatus 0 - STOPPED @@ -88,24 +84,24 @@ type ContainerStatus string // ExecCommand Exec Command type ExecCommand struct { - CommandArgs *[]string `json:"command_args,omitempty"` + CommandArgs []string `json:"command_args"` } // ExecCommandResult defines model for ExecCommandResult. type ExecCommandResult struct { - ExitCode *int32 `json:"exit_code,omitempty"` + ExitCode int32 `json:"exit_code"` // LogOutput Assumes UTF-8 encoding - LogOutput *string `json:"log_output,omitempty"` + LogOutput string `json:"log_output"` } // FileArtifactDescription defines model for FileArtifactDescription. type FileArtifactDescription struct { // Path Path relative to the file artifact - Path *string `json:"path,omitempty"` + Path string `json:"path"` // Size Size of the file, in bytes - Size *int64 `json:"size,omitempty"` + Size int64 `json:"size"` // TextPreview A bit of text content, if the file allows (similar to UNIX's 'head') TextPreview *string `json:"text_preview,omitempty"` @@ -114,36 +110,31 @@ type FileArtifactDescription struct { // FileArtifactReference Files Artifact identifier type FileArtifactReference struct { // Name UUID of the files artifact, for use when referencing it in the future - Name *string `json:"name,omitempty"` + Name string `json:"name"` // Uuid UUID of the files artifact, for use when referencing it in the future - Uuid *string `json:"uuid,omitempty"` + Uuid string `json:"uuid"` } // ImageDownloadMode 0 - ALWAYS // 1 - MISSING type ImageDownloadMode string -// InspectFilesArtifactContents defines model for InspectFilesArtifactContents. -type InspectFilesArtifactContents struct { - FileDescriptions *[]FileArtifactDescription `json:"file_descriptions,omitempty"` -} - // KurtosisFeatureFlag 0 - NO_INSTRUCTIONS_CACHING type KurtosisFeatureFlag string // Port Shared Objects (Used By Multiple Endpoints) type Port struct { - MaybeApplicationProtocol *string `json:"maybe_application_protocol,omitempty"` - - // MaybeWaitTimeout The wait timeout duration in string - MaybeWaitTimeout *string `json:"maybe_wait_timeout,omitempty"` - Number int32 `json:"number"` + ApplicationProtocol *string `json:"application_protocol,omitempty"` + Number int32 `json:"number"` // TransportProtocol 0 - TCP // 1 - SCTP // 2 - UDP TransportProtocol TransportProtocol `json:"transport_protocol"` + + // WaitTimeout The wait timeout duration in string + WaitTimeout *string `json:"wait_timeout,omitempty"` } // RestartPolicy 0 - NEVER @@ -222,41 +213,41 @@ type RunStarlarkScript struct { // ServiceIdentifiers An service identifier is a collection of uuid, name and shortened uuid type ServiceIdentifiers struct { // Name Name of the service - Name *string `json:"name,omitempty"` + Name string `json:"name"` // ServiceUuid UUID of the service - ServiceUuid *string `json:"service_uuid,omitempty"` + ServiceUuid string `json:"service_uuid"` // ShortenedUuid The shortened uuid of the service - ShortenedUuid *string `json:"shortened_uuid,omitempty"` + ShortenedUuid string `json:"shortened_uuid"` } // ServiceInfo defines model for ServiceInfo. type ServiceInfo struct { - Container *Container `json:"container,omitempty"` - - // MaybePublicIpAddr Public IP address *outside* the enclave where the service is reachable - // NOTE: Will be empty if the service isn't running, the service didn't define any ports, or the backend doesn't support reporting public service info - MaybePublicIpAddr *string `json:"maybe_public_ip_addr,omitempty"` - MaybePublicPorts *map[string]Port `json:"maybe_public_ports,omitempty"` + Container Container `json:"container"` // Name Name of the service - Name *string `json:"name,omitempty"` + Name string `json:"name"` // PrivateIpAddr The IP address of the service inside the enclave - PrivateIpAddr *string `json:"private_ip_addr,omitempty"` - PrivatePorts *map[string]Port `json:"private_ports,omitempty"` + PrivateIpAddr string `json:"private_ip_addr"` + PrivatePorts map[string]Port `json:"private_ports"` + + // PublicIpAddr Public IP address *outside* the enclave where the service is reachable + // NOTE: Will be empty if the service isn't running, the service didn't define any ports, or the backend doesn't support reporting public service info + PublicIpAddr *string `json:"public_ip_addr,omitempty"` + PublicPorts *map[string]Port `json:"public_ports,omitempty"` // ServiceStatus 0 - STOPPED // 1 - RUNNING // 2 - UNKNOWN - ServiceStatus *ServiceStatus `json:"service_status,omitempty"` + ServiceStatus ServiceStatus `json:"service_status"` // ServiceUuid UUID of the service - ServiceUuid *string `json:"service_uuid,omitempty"` + ServiceUuid string `json:"service_uuid"` // ShortenedUuid Shortened uuid of the service - ShortenedUuid *string `json:"shortened_uuid,omitempty"` + ShortenedUuid string `json:"shortened_uuid"` } // ServiceStatus 0 - STOPPED @@ -266,101 +257,116 @@ type ServiceStatus string // StarlarkDescription defines model for StarlarkDescription. type StarlarkDescription struct { - ExperimentalFeatures *[]KurtosisFeatureFlag `json:"experimental_features,omitempty"` - MainFunctionName *string `json:"main_function_name,omitempty"` - PackageId *string `json:"package_id,omitempty"` - Parallelism *int32 `json:"parallelism,omitempty"` - RelativePathToMainFile *string `json:"relative_path_to_main_file,omitempty"` + ExperimentalFeatures []KurtosisFeatureFlag `json:"experimental_features"` + MainFunctionName string `json:"main_function_name"` + PackageId string `json:"package_id"` + Parallelism int32 `json:"parallelism"` + RelativePathToMainFile string `json:"relative_path_to_main_file"` // RestartPolicy 0 - NEVER // 1 - ALWAYS - RestartPolicy *RestartPolicy `json:"restart_policy,omitempty"` - SerializedParams *string `json:"serialized_params,omitempty"` - SerializedScript *string `json:"serialized_script,omitempty"` + RestartPolicy RestartPolicy `json:"restart_policy"` + SerializedParams string `json:"serialized_params"` + SerializedScript string `json:"serialized_script"` } // StarlarkError defines model for StarlarkError. type StarlarkError struct { - ExecutionError *StarlarkExecutionError `json:"execution_error,omitempty"` - InterpretationError *StarlarkInterpretationError `json:"interpretation_error,omitempty"` - ValidationError *StarlarkValidationError `json:"validation_error,omitempty"` + Error StarlarkError_Error `json:"error"` +} + +// StarlarkError_Error defines model for StarlarkError.Error. +type StarlarkError_Error struct { + union json.RawMessage } // StarlarkExecutionError defines model for StarlarkExecutionError. type StarlarkExecutionError struct { - ErrorMessage *string `json:"error_message,omitempty"` + ExecutionError struct { + ErrorMessage string `json:"error_message"` + } `json:"execution_error"` } // StarlarkInfo defines model for StarlarkInfo. type StarlarkInfo struct { - InfoMessage *string `json:"info_message,omitempty"` + Info struct { + Instruction struct { + InfoMessage string `json:"info_message"` + } `json:"instruction"` + } `json:"info"` } // StarlarkInstruction defines model for StarlarkInstruction. type StarlarkInstruction struct { - Arguments *[]StarlarkInstructionArgument `json:"arguments,omitempty"` - ExecutableInstruction *string `json:"executable_instruction,omitempty"` - InstructionName *string `json:"instruction_name,omitempty"` - IsSkipped *bool `json:"is_skipped,omitempty"` - Position *StarlarkInstructionPosition `json:"position,omitempty"` + Arguments []StarlarkInstructionArgument `json:"arguments"` + ExecutableInstruction string `json:"executable_instruction"` + InstructionName string `json:"instruction_name"` + IsSkipped bool `json:"is_skipped"` + Position StarlarkInstructionPosition `json:"position"` } // StarlarkInstructionArgument defines model for StarlarkInstructionArgument. type StarlarkInstructionArgument struct { ArgName *string `json:"arg_name,omitempty"` - IsRepresentative *bool `json:"is_representative,omitempty"` - SerializedArgValue *string `json:"serialized_arg_value,omitempty"` + IsRepresentative bool `json:"is_representative"` + SerializedArgValue string `json:"serialized_arg_value"` } // StarlarkInstructionPosition defines model for StarlarkInstructionPosition. type StarlarkInstructionPosition struct { - Column *int32 `json:"column,omitempty"` - Filename *string `json:"filename,omitempty"` - Line *int32 `json:"line,omitempty"` + Column int32 `json:"column"` + Filename string `json:"filename"` + Line int32 `json:"line"` } // StarlarkInstructionResult defines model for StarlarkInstructionResult. type StarlarkInstructionResult struct { - SerializedInstructionResult *string `json:"serialized_instruction_result,omitempty"` + InstructionResult struct { + SerializedInstructionResult string `json:"serialized_instruction_result"` + } `json:"instruction_result"` } // StarlarkInterpretationError defines model for StarlarkInterpretationError. type StarlarkInterpretationError struct { - ErrorMessage *string `json:"error_message,omitempty"` + InterpretationError struct { + ErrorMessage string `json:"error_message"` + } `json:"interpretation_error"` } // StarlarkRunFinishedEvent defines model for StarlarkRunFinishedEvent. type StarlarkRunFinishedEvent struct { - IsRunSuccessful *bool `json:"is_run_successful,omitempty"` - SerializedOutput *string `json:"serialized_output,omitempty"` + RunFinishedEvent struct { + IsRunSuccessful bool `json:"is_run_successful"` + SerializedOutput string `json:"serialized_output"` + } `json:"run_finished_event"` } // StarlarkRunProgress defines model for StarlarkRunProgress. type StarlarkRunProgress struct { - CurrentStepInfo *[]string `json:"current_step_info,omitempty"` - CurrentStepNumber *int32 `json:"current_step_number,omitempty"` - TotalSteps *int32 `json:"total_steps,omitempty"` + ProgressInfo struct { + CurrentStepInfo []string `json:"current_step_info"` + CurrentStepNumber int32 `json:"current_step_number"` + TotalSteps int32 `json:"total_steps"` + } `json:"progress_info"` } // StarlarkRunResponseLine Starlark Execution Response type StarlarkRunResponseLine struct { - Error *StarlarkError `json:"error,omitempty"` - Info *StarlarkInfo `json:"info,omitempty"` - Instruction *StarlarkInstruction `json:"instruction,omitempty"` - InstructionResult *StarlarkInstructionResult `json:"instruction_result,omitempty"` - ProgressInfo *StarlarkRunProgress `json:"progress_info,omitempty"` - RunFinishedEvent *StarlarkRunFinishedEvent `json:"run_finished_event,omitempty"` - Warning *StarlarkWarning `json:"warning,omitempty"` + union json.RawMessage } // StarlarkValidationError defines model for StarlarkValidationError. type StarlarkValidationError struct { - ErrorMessage *string `json:"error_message,omitempty"` + ValidationError struct { + ErrorMessage string `json:"error_message"` + } `json:"validation_error"` } // StarlarkWarning defines model for StarlarkWarning. type StarlarkWarning struct { - WarningMessage *string `json:"warning_message,omitempty"` + Warning struct { + WarningMessage string `json:"warning_message"` + } `json:"warning"` } // StoreFilesArtifactFromService defines model for StoreFilesArtifactFromService. @@ -389,8 +395,8 @@ type TransportProtocol string // WaitForEndpointAvailability Wait For HTTP Endpoint Availability type WaitForEndpointAvailability struct { // BodyText If the endpoint returns this value, the service will be marked as available (e.g. Hello World). - BodyText *string `json:"body_text,omitempty"` - HttpMethod *WaitForEndpointAvailabilityHttpMethod `json:"http_method,omitempty"` + BodyText *string `json:"body_text,omitempty"` + HttpMethod WaitForEndpointAvailabilityHttpMethod `json:"http_method"` // InitialDelayMilliseconds The number of milliseconds to wait until executing the first HTTP call InitialDelayMilliseconds *int32 `json:"initial_delay_milliseconds,omitempty"` @@ -445,7 +451,7 @@ type PutEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody = StoreWebFi type PutEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody = StoreFilesArtifactFromService // PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody defines body for PostEnclavesEnclaveIdentifierServicesConnection for application/json ContentType. -type PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody = ConnectServices +type PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody = Connect // PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody defines body for PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand for application/json ContentType. type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody = ExecCommand @@ -461,3 +467,283 @@ type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody = Run // PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody defines body for PostEnclavesEnclaveIdentifierStarlarkScripts for application/json ContentType. type PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody = RunStarlarkScript + +// AsStarlarkInterpretationError returns the union data inside the StarlarkError_Error as a StarlarkInterpretationError +func (t StarlarkError_Error) AsStarlarkInterpretationError() (StarlarkInterpretationError, error) { + var body StarlarkInterpretationError + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStarlarkInterpretationError overwrites any union data inside the StarlarkError_Error as the provided StarlarkInterpretationError +func (t *StarlarkError_Error) FromStarlarkInterpretationError(v StarlarkInterpretationError) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStarlarkInterpretationError performs a merge with any union data inside the StarlarkError_Error, using the provided StarlarkInterpretationError +func (t *StarlarkError_Error) MergeStarlarkInterpretationError(v StarlarkInterpretationError) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsStarlarkValidationError returns the union data inside the StarlarkError_Error as a StarlarkValidationError +func (t StarlarkError_Error) AsStarlarkValidationError() (StarlarkValidationError, error) { + var body StarlarkValidationError + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStarlarkValidationError overwrites any union data inside the StarlarkError_Error as the provided StarlarkValidationError +func (t *StarlarkError_Error) FromStarlarkValidationError(v StarlarkValidationError) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStarlarkValidationError performs a merge with any union data inside the StarlarkError_Error, using the provided StarlarkValidationError +func (t *StarlarkError_Error) MergeStarlarkValidationError(v StarlarkValidationError) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsStarlarkExecutionError returns the union data inside the StarlarkError_Error as a StarlarkExecutionError +func (t StarlarkError_Error) AsStarlarkExecutionError() (StarlarkExecutionError, error) { + var body StarlarkExecutionError + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStarlarkExecutionError overwrites any union data inside the StarlarkError_Error as the provided StarlarkExecutionError +func (t *StarlarkError_Error) FromStarlarkExecutionError(v StarlarkExecutionError) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStarlarkExecutionError performs a merge with any union data inside the StarlarkError_Error, using the provided StarlarkExecutionError +func (t *StarlarkError_Error) MergeStarlarkExecutionError(v StarlarkExecutionError) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +func (t StarlarkError_Error) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *StarlarkError_Error) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsStarlarkInstruction returns the union data inside the StarlarkRunResponseLine as a StarlarkInstruction +func (t StarlarkRunResponseLine) AsStarlarkInstruction() (StarlarkInstruction, error) { + var body StarlarkInstruction + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStarlarkInstruction overwrites any union data inside the StarlarkRunResponseLine as the provided StarlarkInstruction +func (t *StarlarkRunResponseLine) FromStarlarkInstruction(v StarlarkInstruction) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStarlarkInstruction performs a merge with any union data inside the StarlarkRunResponseLine, using the provided StarlarkInstruction +func (t *StarlarkRunResponseLine) MergeStarlarkInstruction(v StarlarkInstruction) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsStarlarkError returns the union data inside the StarlarkRunResponseLine as a StarlarkError +func (t StarlarkRunResponseLine) AsStarlarkError() (StarlarkError, error) { + var body StarlarkError + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStarlarkError overwrites any union data inside the StarlarkRunResponseLine as the provided StarlarkError +func (t *StarlarkRunResponseLine) FromStarlarkError(v StarlarkError) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStarlarkError performs a merge with any union data inside the StarlarkRunResponseLine, using the provided StarlarkError +func (t *StarlarkRunResponseLine) MergeStarlarkError(v StarlarkError) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsStarlarkRunProgress returns the union data inside the StarlarkRunResponseLine as a StarlarkRunProgress +func (t StarlarkRunResponseLine) AsStarlarkRunProgress() (StarlarkRunProgress, error) { + var body StarlarkRunProgress + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStarlarkRunProgress overwrites any union data inside the StarlarkRunResponseLine as the provided StarlarkRunProgress +func (t *StarlarkRunResponseLine) FromStarlarkRunProgress(v StarlarkRunProgress) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStarlarkRunProgress performs a merge with any union data inside the StarlarkRunResponseLine, using the provided StarlarkRunProgress +func (t *StarlarkRunResponseLine) MergeStarlarkRunProgress(v StarlarkRunProgress) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsStarlarkInstructionResult returns the union data inside the StarlarkRunResponseLine as a StarlarkInstructionResult +func (t StarlarkRunResponseLine) AsStarlarkInstructionResult() (StarlarkInstructionResult, error) { + var body StarlarkInstructionResult + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStarlarkInstructionResult overwrites any union data inside the StarlarkRunResponseLine as the provided StarlarkInstructionResult +func (t *StarlarkRunResponseLine) FromStarlarkInstructionResult(v StarlarkInstructionResult) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStarlarkInstructionResult performs a merge with any union data inside the StarlarkRunResponseLine, using the provided StarlarkInstructionResult +func (t *StarlarkRunResponseLine) MergeStarlarkInstructionResult(v StarlarkInstructionResult) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsStarlarkRunFinishedEvent returns the union data inside the StarlarkRunResponseLine as a StarlarkRunFinishedEvent +func (t StarlarkRunResponseLine) AsStarlarkRunFinishedEvent() (StarlarkRunFinishedEvent, error) { + var body StarlarkRunFinishedEvent + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStarlarkRunFinishedEvent overwrites any union data inside the StarlarkRunResponseLine as the provided StarlarkRunFinishedEvent +func (t *StarlarkRunResponseLine) FromStarlarkRunFinishedEvent(v StarlarkRunFinishedEvent) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStarlarkRunFinishedEvent performs a merge with any union data inside the StarlarkRunResponseLine, using the provided StarlarkRunFinishedEvent +func (t *StarlarkRunResponseLine) MergeStarlarkRunFinishedEvent(v StarlarkRunFinishedEvent) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsStarlarkWarning returns the union data inside the StarlarkRunResponseLine as a StarlarkWarning +func (t StarlarkRunResponseLine) AsStarlarkWarning() (StarlarkWarning, error) { + var body StarlarkWarning + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStarlarkWarning overwrites any union data inside the StarlarkRunResponseLine as the provided StarlarkWarning +func (t *StarlarkRunResponseLine) FromStarlarkWarning(v StarlarkWarning) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStarlarkWarning performs a merge with any union data inside the StarlarkRunResponseLine, using the provided StarlarkWarning +func (t *StarlarkRunResponseLine) MergeStarlarkWarning(v StarlarkWarning) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsStarlarkInfo returns the union data inside the StarlarkRunResponseLine as a StarlarkInfo +func (t StarlarkRunResponseLine) AsStarlarkInfo() (StarlarkInfo, error) { + var body StarlarkInfo + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStarlarkInfo overwrites any union data inside the StarlarkRunResponseLine as the provided StarlarkInfo +func (t *StarlarkRunResponseLine) FromStarlarkInfo(v StarlarkInfo) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStarlarkInfo performs a merge with any union data inside the StarlarkRunResponseLine, using the provided StarlarkInfo +func (t *StarlarkRunResponseLine) MergeStarlarkInfo(v StarlarkInfo) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +func (t StarlarkRunResponseLine) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *StarlarkRunResponseLine) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} diff --git a/api/openapi/core/core_service.yaml b/api/openapi/core/core_service.yaml index a54aa8b007..366709d92c 100644 --- a/api/openapi/core/core_service.yaml +++ b/api/openapi/core/core_service.yaml @@ -1,8 +1,10 @@ openapi: 3.0.0 + info: title: Enclave API description: API to manipulate the enclaves - version: "1" + version: 0.1.0 + paths: /enclaves/{enclave_identifier}/starlark: @@ -195,7 +197,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/InspectFilesArtifactContents" + type: array + items: + $ref: "#/components/schemas/FileArtifactDescription" /enclaves/{enclave_identifier}/artifacts/{artifact_identifier}/download: get: @@ -278,7 +282,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ConnectServices" + $ref: "#/components/schemas/Connect" required: true responses: "200": @@ -354,9 +358,9 @@ components: format: int32 transport_protocol: $ref: "#/components/schemas/TransportProtocol" - maybe_application_protocol: + application_protocol: type: string - maybe_wait_timeout: + wait_timeout: type: string description: The wait timeout duration in string required: @@ -383,6 +387,12 @@ components: type: object additionalProperties: type: string + required: + - status + - image_name + - entrypoint_args + - cmd_args + - env_vars ServiceStatus: type: string @@ -417,12 +427,12 @@ components: type: object additionalProperties: $ref: "#/components/schemas/Port" - maybe_public_ip_addr: + public_ip_addr: type: string description: |- Public IP address *outside* the enclave where the service is reachable NOTE: Will be empty if the service isn't running, the service didn't define any ports, or the backend doesn't support reporting public service info - maybe_public_ports: + public_ports: type: object additionalProperties: $ref: "#/components/schemas/Port" @@ -436,6 +446,14 @@ components: $ref: "#/components/schemas/ServiceStatus" container: $ref: "#/components/schemas/Container" + required: + - service_uuid + - private_ip_addr + - private_ports + - name + - shortened_uuid + - service_status + - container Connect: type: string @@ -537,39 +555,51 @@ components: type: string enum: - NO_INSTRUCTIONS_CACHING - description: "0 - NO_INSTRUCTIONS_CACHING " + description: |- + 0 - NO_INSTRUCTIONS_CACHING StarlarkRunResponseLine: - type: object - properties: - instruction: - $ref: "#/components/schemas/StarlarkInstruction" - error: - $ref: "#/components/schemas/StarlarkError" - progress_info: - $ref: "#/components/schemas/StarlarkRunProgress" - instruction_result: - $ref: "#/components/schemas/StarlarkInstructionResult" - run_finished_event: - $ref: "#/components/schemas/StarlarkRunFinishedEvent" - warning: - $ref: "#/components/schemas/StarlarkWarning" - info: - $ref: "#/components/schemas/StarlarkInfo" + oneOf: + - $ref: "#/components/schemas/StarlarkInstruction" + - $ref: "#/components/schemas/StarlarkError" + - $ref: "#/components/schemas/StarlarkRunProgress" + - $ref: "#/components/schemas/StarlarkInstructionResult" + - $ref: "#/components/schemas/StarlarkRunFinishedEvent" + - $ref: "#/components/schemas/StarlarkWarning" + - $ref: "#/components/schemas/StarlarkInfo" description: |- Starlark Execution Response StarlarkInfo: type: object properties: - info_message: - type: string + info: + type: object + properties: + instruction: + type: object + properties: + info_message: + type: string + required: + - info_message + required: + - instruction + required: + - info StarlarkWarning: type: object properties: - warning_message: - type: string + warning: + type: object + properties: + warning_message: + type: string + required: + - warning_message + required: + - warning StarlarkInstruction: type: object @@ -586,12 +616,25 @@ components: type: string is_skipped: type: boolean + required: + - position + - instruction_name + - arguments + - executable_instruction + - is_skipped StarlarkInstructionResult: type: object properties: - serialized_instruction_result: - type: string + instruction_result: + type: object + properties: + serialized_instruction_result: + type: string + required: + - serialized_instruction_result + required: + - instruction_result StarlarkInstructionArgument: type: object @@ -602,6 +645,9 @@ components: type: string is_representative: type: boolean + required: + - serialized_arg_value + - is_representative StarlarkInstructionPosition: type: object @@ -614,62 +660,99 @@ components: column: type: integer format: int32 + required: + - filename + - line + - column StarlarkError: type: object properties: - interpretation_error: - $ref: "#/components/schemas/StarlarkInterpretationError" - validation_error: - $ref: "#/components/schemas/StarlarkValidationError" - execution_error: - $ref: "#/components/schemas/StarlarkExecutionError" + error: + oneOf: + - $ref: "#/components/schemas/StarlarkInterpretationError" + - $ref: "#/components/schemas/StarlarkValidationError" + - $ref: "#/components/schemas/StarlarkExecutionError" + required: + - error StarlarkInterpretationError: type: object properties: - error_message: - type: string + interpretation_error: + type: object + properties: + error_message: + type: string + required: + - error_message + required: + - interpretation_error StarlarkValidationError: type: object properties: - error_message: - type: string + validation_error: + type: object + properties: + error_message: + type: string + required: + - error_message + required: + - validation_error StarlarkExecutionError: type: object properties: - error_message: - type: string + execution_error: + type: object + properties: + error_message: + type: string + required: + - error_message + required: + - execution_error StarlarkRunProgress: type: object properties: - current_step_info: - type: array - items: - type: string - total_steps: - type: integer - format: int32 - current_step_number: - type: integer - format: int32 + progress_info: + type: object + properties: + current_step_info: + type: array + items: + type: string + total_steps: + type: integer + format: int32 + current_step_number: + type: integer + format: int32 + required: + - current_step_info + - total_steps + - current_step_number + required: + - progress_info StarlarkRunFinishedEvent: type: object properties: - is_run_successful: - type: boolean - serialized_output: - type: string - - GetServicesResponse: - type: object - properties: - service_info: - $ref: "#/components/schemas/ServiceInfo" + run_finished_event: + type: object + properties: + is_run_successful: + type: boolean + serialized_output: + type: string + required: + - is_run_successful + - serialized_output + required: + - run_finished_event ServiceIdentifiers: type: object @@ -684,6 +767,10 @@ components: type: string description: The shortened uuid of the service description: An service identifier is a collection of uuid, name and shortened uuid + required: + - service_uuid + - name + - shortened_uuid ExecCommand: type: object @@ -692,8 +779,9 @@ components: type: array items: type: string - description: |- - Exec Command + description: Exec Command + required: + - command_args ExecCommandResult: type: object @@ -704,6 +792,9 @@ components: log_output: type: string description: Assumes UTF-8 encoding + required: + - exit_code + - log_output WaitForEndpointAvailability: type: object @@ -730,6 +821,8 @@ components: type: string description: If the endpoint returns this value, the service will be marked as available (e.g. Hello World). description: Wait For HTTP Endpoint Availability + required: + - http_method FileArtifactReference: type: object @@ -742,6 +835,9 @@ components: description: UUID of the files artifact, for use when referencing it in the future description: |- Files Artifact identifier + required: + - uuid + - name StoreWebFilesArtifact: type: object @@ -771,14 +867,6 @@ components: - source_path - name - InspectFilesArtifactContents: - type: object - properties: - file_descriptions: - type: array - items: - $ref: "#/components/schemas/FileArtifactDescription" - FileArtifactDescription: type: object properties: @@ -792,12 +880,9 @@ components: text_preview: type: string description: A bit of text content, if the file allows (similar to UNIX's 'head') - - ConnectServices: - type: object - properties: - connect: - $ref: "#/components/schemas/Connect" + required: + - path + - size RestartPolicy: type: string @@ -830,6 +915,15 @@ components: $ref: "#/components/schemas/KurtosisFeatureFlag" restart_policy: $ref: "#/components/schemas/RestartPolicy" + required: + - package_id + - serialized_script + - serialized_params + - parallelism + - relative_path_to_main_file + - main_function_name + - experimental_features + - restart_policy TransportProtocol: type: string diff --git a/engine/server/engine/server/enclave_rest_api_handler.go b/engine/server/engine/server/enclave_rest_api_handler.go index b7858cf4ba..5038cc47ab 100644 --- a/engine/server/engine/server/enclave_rest_api_handler.go +++ b/engine/server/engine/server/enclave_rest_api_handler.go @@ -70,8 +70,8 @@ func (manager *enclaveRuntime) GetEnclavesEnclaveIdentifierArtifacts(ctx context artifacts.FileNamesAndUuids, func(x *kurtosis_core_rpc_api_bindings.FilesArtifactNameAndUuid) kurtosis_core_rest_api_bindings.FileArtifactReference { return kurtosis_core_rest_api_bindings.FileArtifactReference{ - Name: &x.FileName, - Uuid: &x.FileUuid, + Name: x.FileName, + Uuid: x.FileUuid, } }) @@ -118,8 +118,8 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierArtifactsLocalFile(c // TODO (edgar) Is this the expected behavior? If so, we should be explicit about it. if response != nil { artifact_response := api.FileArtifactReference{ - Name: &response.Name, - Uuid: &response.Uuid, + Name: response.Name, + Uuid: response.Uuid, } uploaded_artifacts[filename] = artifact_response } @@ -145,8 +145,8 @@ func (manager *enclaveRuntime) PutEnclavesEnclaveIdentifierArtifactsRemoteFile(c } artifact_response := api.FileArtifactReference{ - Uuid: &stored_artifact.Uuid, - Name: &request.Body.Name, + Uuid: stored_artifact.Uuid, + Name: request.Body.Name, } return api.PutEnclavesEnclaveIdentifierArtifactsRemoteFile200JSONResponse(artifact_response), nil } @@ -170,8 +170,8 @@ func (manager *enclaveRuntime) PutEnclavesEnclaveIdentifierArtifactsServicesServ } artifact_response := api.FileArtifactReference{ - Uuid: &stored_artifact.Uuid, - Name: &request.Body.Name, + Uuid: stored_artifact.Uuid, + Name: request.Body.Name, } return api.PutEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier200JSONResponse(artifact_response), nil } @@ -200,17 +200,13 @@ func (manager *enclaveRuntime) GetEnclavesEnclaveIdentifierArtifactsArtifactIden func(x *kurtosis_core_rpc_api_bindings.FileArtifactContentsFileDescription) api.FileArtifactDescription { size := int64(x.Size) return api.FileArtifactDescription{ - Path: &x.Path, - Size: &size, + Path: x.Path, + Size: size, TextPreview: x.TextPreview, } }) - artifact_response := api.InspectFilesArtifactContents{ - FileDescriptions: &artifact_content_list, - } - - return api.GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONResponse(artifact_response), nil + return api.GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONResponse(artifact_content_list), nil } // (GET /enclaves/{enclave_identifier}/artifacts/{artifact_identifier}/download) @@ -279,9 +275,9 @@ func (manager *enclaveRuntime) GetEnclavesEnclaveIdentifierServicesHistory(ctx c response := utils.MapList(services.AllIdentifiers, func(service *kurtosis_core_rpc_api_bindings.ServiceIdentifiers) api.ServiceIdentifiers { return api.ServiceIdentifiers{ - ServiceUuid: &service.ServiceUuid, - ShortenedUuid: &service.ShortenedUuid, - Name: &service.Name, + ServiceUuid: service.ServiceUuid, + ShortenedUuid: service.ShortenedUuid, + Name: service.Name, } }) @@ -295,7 +291,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierServicesConnection(c logrus.Infof("Listing services from enclave %s", enclave_identifier) connectServicesArgs := kurtosis_core_rpc_api_bindings.ConnectServicesArgs{ - Connect: toGrpcConnect(*request.Body.Connect), + Connect: toGrpcConnect(*request.Body), } _, err := apiContainerClient.ConnectServices(ctx, &connectServicesArgs) if err != nil { @@ -340,7 +336,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierServicesServiceIdent execCommandArgs := kurtosis_core_rpc_api_bindings.ExecCommandArgs{ ServiceIdentifier: service_identifier, - CommandArgs: *request.Body.CommandArgs, + CommandArgs: request.Body.CommandArgs, } exec_result, err := apiContainerClient.ExecCommand(ctx, &execCommandArgs) if err != nil { @@ -349,8 +345,8 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierServicesServiceIdent } response := api.ExecCommandResult{ - ExitCode: &exec_result.ExitCode, - LogOutput: &exec_result.LogOutput, + ExitCode: exec_result.ExitCode, + LogOutput: exec_result.LogOutput, } return api.PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand200JSONResponse(response), nil } @@ -363,7 +359,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierServicesServiceIdent apiContainerClient := manager.GetGrpcClientForEnclaveUUID(enclave_identifier) logrus.Infof("Getting info about service %s from enclave %s", service_identifier, enclave_identifier) - endpoint_method := *request.Body.HttpMethod + endpoint_method := request.Body.HttpMethod castToUInt32 := func(v int32) uint32 { return uint32(v) } @@ -418,14 +414,14 @@ func (manager *enclaveRuntime) GetEnclavesEnclaveIdentifierStarlark(ctx context. flags := utils.MapList(starlark_result.ExperimentalFeatures, toHttpFeatureFlag) policy := toHttpRestartPolicy(starlark_result.RestartPolicy) response := api.StarlarkDescription{ - ExperimentalFeatures: &flags, - MainFunctionName: &starlark_result.MainFunctionName, - PackageId: &starlark_result.PackageId, - Parallelism: &starlark_result.Parallelism, - RelativePathToMainFile: &starlark_result.RelativePathToMainFile, - RestartPolicy: &policy, - SerializedParams: &starlark_result.SerializedParams, - SerializedScript: &starlark_result.SerializedScript, + ExperimentalFeatures: flags, + MainFunctionName: starlark_result.MainFunctionName, + PackageId: starlark_result.PackageId, + Parallelism: starlark_result.Parallelism, + RelativePathToMainFile: starlark_result.RelativePathToMainFile, + RestartPolicy: policy, + SerializedParams: starlark_result.SerializedParams, + SerializedScript: starlark_result.SerializedScript, } return api.GetEnclavesEnclaveIdentifierStarlark200JSONResponse(response), nil @@ -651,21 +647,21 @@ func toHttpServiceStatus(status kurtosis_core_rpc_api_bindings.ServiceStatus) ap func toHttpContainer(container *kurtosis_core_rpc_api_bindings.Container) api.Container { status := toHttpContainerStatus(container.Status) return api.Container{ - CmdArgs: &container.CmdArgs, - EntrypointArgs: &container.EntrypointArgs, - EnvVars: &container.EnvVars, - ImageName: &container.ImageName, - Status: &status, + CmdArgs: container.CmdArgs, + EntrypointArgs: container.EntrypointArgs, + EnvVars: container.EnvVars, + ImageName: container.ImageName, + Status: status, } } func toHttpPorts(port *kurtosis_core_rpc_api_bindings.Port) api.Port { protocol := toHttpTransportProtocol(port.TransportProtocol) return api.Port{ - MaybeApplicationProtocol: &port.MaybeApplicationProtocol, - MaybeWaitTimeout: &port.MaybeWaitTimeout, - Number: int32(port.Number), - TransportProtocol: protocol, + ApplicationProtocol: &port.MaybeApplicationProtocol, + WaitTimeout: &port.MaybeWaitTimeout, + Number: int32(port.Number), + TransportProtocol: protocol, } } @@ -675,15 +671,15 @@ func toHttpServiceInfo(service *kurtosis_core_rpc_api_bindings.ServiceInfo) api. publicPorts := utils.MapMapValues(service.MaybePublicPorts, toHttpPorts) privatePorts := utils.MapMapValues(service.PrivatePorts, toHttpPorts) return api.ServiceInfo{ - Container: &container, - MaybePublicIpAddr: &service.MaybePublicIpAddr, - MaybePublicPorts: &publicPorts, - Name: &service.Name, - PrivateIpAddr: &service.PrivateIpAddr, - PrivatePorts: &privatePorts, - ServiceStatus: &serviceStatus, - ServiceUuid: &service.ServiceUuid, - ShortenedUuid: &service.ShortenedUuid, + Container: container, + PublicIpAddr: &service.MaybePublicIpAddr, + PublicPorts: &publicPorts, + Name: service.Name, + PrivateIpAddr: service.PrivateIpAddr, + PrivatePorts: privatePorts, + ServiceStatus: serviceStatus, + ServiceUuid: service.ServiceUuid, + ShortenedUuid: service.ShortenedUuid, } }