Skip to content

Commit

Permalink
regen rest api bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Feb 14, 2024
1 parent c43037c commit 0738875
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func NewRunStarlarkRemotePackageArgs(
cloudInstanceId string,
cloudUserId string,
imageDownloadMode kurtosis_core_rpc_api_bindings.ImageDownloadMode,
nonBlockingMode bool,
) *kurtosis_core_rpc_api_bindings.RunStarlarkPackageArgs {
parallelismCopy := new(int32)
*parallelismCopy = parallelism
Expand All @@ -139,6 +140,7 @@ func NewRunStarlarkRemotePackageArgs(
CloudInstanceId: cloudInstanceIdCopy,
CloudUserId: cloudUserIdCopy,
ImageDownloadMode: imageDownloadModeCopy,
NonBlockingMode: &nonBlockingMode,
}
}

Expand Down
2 changes: 1 addition & 1 deletion api/golang/core/lib/enclaves/enclave_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (enclaveCtx *EnclaveContext) RunStarlarkRemotePackage(
}()

starlarkResponseLineChan := make(chan *kurtosis_core_rpc_api_bindings.StarlarkRunResponseLine)
executeStartosisScriptArgs := binding_constructors.NewRunStarlarkRemotePackageArgs(packageId, runConfig.RelativePathToMainFile, runConfig.MainFunctionName, serializedParams, runConfig.DryRun, runConfig.Parallelism, runConfig.ExperimentalFeatureFlags, runConfig.CloudInstanceId, runConfig.CloudUserId, runConfig.ImageDownload)
executeStartosisScriptArgs := binding_constructors.NewRunStarlarkRemotePackageArgs(packageId, runConfig.RelativePathToMainFile, runConfig.MainFunctionName, serializedParams, runConfig.DryRun, runConfig.Parallelism, runConfig.ExperimentalFeatureFlags, runConfig.CloudInstanceId, runConfig.CloudUserId, runConfig.ImageDownload, runConfig.NonBlockingMode)

stream, err := enclaveCtx.client.RunStarlarkPackage(ctxWithCancel, executeStartosisScriptArgs)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func NewRunStarlarkConfig(opts ...starlarkRunConfigOption) *StarlarkRunConfig {
CloudInstanceId: defaultCloudInstanceId,
CloudUserId: defaultCloudUserId,
ImageDownload: defaultImageDownload,
NonBlockingMode: defaultNonBlockingMode,
}

for _, opt := range opts {
Expand Down
6 changes: 6 additions & 0 deletions api/golang/http_rest/api_types/api_types.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

154 changes: 77 additions & 77 deletions api/golang/http_rest/server/core_rest_api/api_container_server.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions api/openapi/specs/kurtosis_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,9 @@ components:
description: Defaults to empty
image_download_mode:
$ref: "#/components/schemas/ImageDownloadMode"
non_blocking_mode:
type: boolean
description: Defaults to false
required:
- serialized_script

Expand Down Expand Up @@ -1168,6 +1171,9 @@ components:
description: Defaults to empty
image_download_mode:
$ref: "#/components/schemas/ImageDownloadMode"
non_blocking_mode:
type: boolean
description: Defaults to false

KurtosisFeatureFlag:
type: string
Expand Down
4 changes: 4 additions & 0 deletions api/typescript/src/engine/rest_api_bindings/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,8 @@ export interface components {
/** @description Defaults to empty */
cloud_user_id?: string;
image_download_mode?: components["schemas"]["ImageDownloadMode"];
/** @description Defaults to false */
non_blocking_mode?: boolean;
};
RunStarlarkPackage: {
/** @description Parameters data for the Starlark package main function */
Expand Down Expand Up @@ -1354,6 +1356,8 @@ export interface components {
/** @description Defaults to empty */
cloud_user_id?: string;
image_download_mode?: components["schemas"]["ImageDownloadMode"];
/** @description Defaults to false */
non_blocking_mode?: boolean;
};
/**
* @description 0 - NO_INSTRUCTIONS_CACHING
Expand Down
2 changes: 2 additions & 0 deletions engine/server/engine/server/enclave_rest_api_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierStarlarkPackagesPack
// RunStarlarkPackage. If the package is remote and must be cloned within the APIC, use the standalone boolean flag
// clone_package below
StarlarkPackageContent: nil,
NonBlockingMode: request.Body.NonBlockingMode,
}

ctxWithCancel, cancelCtxFunc := context.WithCancel(context.Background())
Expand Down Expand Up @@ -673,6 +674,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx
CloudInstanceId: request.Body.CloudInstanceId,
CloudUserId: request.Body.CloudUserId,
ImageDownloadMode: utils.MapPointer(request.Body.ImageDownloadMode, to_grpc.ToGrpcImageDownloadMode),
NonBlockingMode: request.Body.NonBlockingMode,
}

ctxWithCancel, cancelCtxFunc := context.WithCancel(context.Background())
Expand Down

0 comments on commit 0738875

Please sign in to comment.