Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: podman attempt v2 #2518

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
59ba36d
fix: add enclave-manager/local to workspace
marijanp May 25, 2024
bc0e31c
feat: package kurtosis with nix
marijanp May 25, 2024
41bd2dc
feat: ignore nix related files
marijanp May 25, 2024
744e330
use podman socket
tedim52 Jul 12, 2024
70fa36a
turn off log collector
tedim52 Jul 12, 2024
df42701
fix volume inconsistency match
tedim52 Jul 12, 2024
68c1387
retrieve network id
tedim52 Jul 12, 2024
e062bf1
change host ip
tedim52 Jul 12, 2024
15aa10a
add xdg fallback
tedim52 Jul 12, 2024
555fcb3
use local goreleaser
tedim52 Jul 12, 2024
ca0da34
Merge branch 'nixify' into tedi/podman
tedim52 Jul 12, 2024
3e20f4c
Revert "use podman socket"
tedim52 Jul 12, 2024
f54369b
fix get engine logs and components
tedim52 Jul 12, 2024
e48fc23
bridge -> podman
tedim52 Jul 12, 2024
9789f1c
disable security opts
tedim52 Jul 25, 2024
4edfe23
use podman for image building
tedim52 Jul 25, 2024
aaca583
fix
tedim52 Jul 25, 2024
900a531
wait and list networks before connecting
tedim52 Jul 31, 2024
572f4b8
improve err logs for storing pkg contents
tedim52 Aug 1, 2024
aba722a
start dependency list
tedim52 Aug 23, 2024
507ef13
add images and package dependencies to plan yaml
tedim52 Aug 30, 2024
546c1c9
hook up to cli
tedim52 Aug 30, 2024
8df95e7
add get starlark plan yaml to api
tedim52 Aug 30, 2024
d0bba73
update tests
tedim52 Aug 30, 2024
3831674
make imgs unique and sort
tedim52 Aug 30, 2024
725cf84
Merge branch 'main' into tedi/dependencylist
tedim52 Aug 30, 2024
65da4ab
refactor plan yaml
tedim52 Aug 30, 2024
b712fe8
only add module prefix and dont add parent package
tedim52 Aug 30, 2024
c1cd1fc
maybe parse yaml
tedim52 Aug 30, 2024
554b754
pull dependencies locally
tedim52 Sep 11, 2024
18c2591
fix cloning pkgs
tedim52 Sep 12, 2024
7e56e5b
replace magic vlues
tedim52 Sep 12, 2024
24bbebb
exhaust struct
tedim52 Sep 12, 2024
2422cf2
Merge branch 'tedi/dependencylist' into tedi/podmansock
tedim52 Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,8 @@ lerna-debug.log
# contains several libraries that get shipped
yarn.lock
package.json
package-lock.json
package-lock.json

# Nix
# ignores the default result symlink created when building with nix
result

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

35 changes: 35 additions & 0 deletions api/golang/core/lib/enclaves/enclave_context.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,41 @@ func (enclaveCtx *EnclaveContext) GetStarlarkRun(ctx context.Context) (*kurtosis
return response, nil
}

func (enclaveCtx *EnclaveContext) GetStarlarkPackagePlanYaml(ctx context.Context, packageId string, serializedParams string, dependenciesOnly bool) (*kurtosis_core_rpc_api_bindings.PlanYaml, error) {
serializedParams, err := maybeParseYaml(serializedParams)
if err != nil {
return nil, stacktrace.Propagate(err, "An error occurred when parsing YAML args for package '%v'", serializedParams)
}
response, err := enclaveCtx.client.GetStarlarkPackagePlanYaml(ctx, &kurtosis_core_rpc_api_bindings.StarlarkPackagePlanYamlArgs{
PackageId: packageId,
SerializedParams: &serializedParams,
RelativePathToMainFile: nil,
MainFunctionName: nil,
DependenciesOnly: &dependenciesOnly,
})
if err != nil {
return nil, stacktrace.Propagate(err, "An error occurred while getting the starlark package plan yaml run.")
}
return response, nil
}

func (enclaveCtx *EnclaveContext) GetStarlarkScriptPlanYaml(ctx context.Context, serializedScript string, serializedParams string, dependenciesOnly bool) (*kurtosis_core_rpc_api_bindings.PlanYaml, error) {
serializedParams, err := maybeParseYaml(serializedParams)
if err != nil {
return nil, stacktrace.Propagate(err, "An error occurred when parsing YAML args for package '%v'", serializedParams)
}
response, err := enclaveCtx.client.GetStarlarkScriptPlanYaml(ctx, &kurtosis_core_rpc_api_bindings.StarlarkScriptPlanYamlArgs{
SerializedScript: serializedScript,
SerializedParams: &serializedParams,
MainFunctionName: nil,
DependenciesOnly: &dependenciesOnly,
})
if err != nil {
return nil, stacktrace.Propagate(err, "An error occurred while getting the last starlark script plan yaml run.")
}
return response, nil
}

// ====================================================================================================
//
// Private helper methods
Expand Down
6 changes: 6 additions & 0 deletions api/protobuf/core/api_container_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,9 @@ message StarlarkScriptPlanYamlArgs {

// The name of the main function, the default value is "run"
optional string main_function_name = 5;

// Whether to return only the dependencies of the starlark script
optional bool dependencies_only = 6;
}

message StarlarkPackagePlanYamlArgs {
Expand All @@ -612,4 +615,7 @@ message StarlarkPackagePlanYamlArgs {

// The name of the main function, the default value is "run"
optional string main_function_name = 4;

// Whether to return only the dependencies of the Starlark package
optional bool dependencies_only = 5;
}
6 changes: 6 additions & 0 deletions api/rust/src/api_container_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,9 @@ pub struct StarlarkScriptPlanYamlArgs {
/// The name of the main function, the default value is "run"
#[prost(string, optional, tag = "5")]
pub main_function_name: ::core::option::Option<::prost::alloc::string::String>,
/// Whether to return only the dependencies of the starlark script
#[prost(bool, optional, tag = "6")]
pub dependencies_only: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand All @@ -727,6 +730,9 @@ pub struct StarlarkPackagePlanYamlArgs {
/// The name of the main function, the default value is "run"
#[prost(string, optional, tag = "4")]
pub main_function_name: ::core::option::Option<::prost::alloc::string::String>,
/// Whether to return only the dependencies of the Starlark package
#[prost(bool, optional, tag = "5")]
pub dependencies_only: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,11 @@ export class StarlarkScriptPlanYamlArgs extends jspb.Message {
hasMainFunctionName(): boolean;
clearMainFunctionName(): StarlarkScriptPlanYamlArgs;

getDependenciesOnly(): boolean;
setDependenciesOnly(value: boolean): StarlarkScriptPlanYamlArgs;
hasDependenciesOnly(): boolean;
clearDependenciesOnly(): StarlarkScriptPlanYamlArgs;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): StarlarkScriptPlanYamlArgs.AsObject;
static toObject(includeInstance: boolean, msg: StarlarkScriptPlanYamlArgs): StarlarkScriptPlanYamlArgs.AsObject;
Expand All @@ -1524,6 +1529,7 @@ export namespace StarlarkScriptPlanYamlArgs {
serializedScript: string,
serializedParams?: string,
mainFunctionName?: string,
dependenciesOnly?: boolean,
}

export enum SerializedParamsCase {
Expand All @@ -1535,6 +1541,11 @@ export namespace StarlarkScriptPlanYamlArgs {
_MAIN_FUNCTION_NAME_NOT_SET = 0,
MAIN_FUNCTION_NAME = 5,
}

export enum DependenciesOnlyCase {
_DEPENDENCIES_ONLY_NOT_SET = 0,
DEPENDENCIES_ONLY = 6,
}
}

export class StarlarkPackagePlanYamlArgs extends jspb.Message {
Expand All @@ -1556,6 +1567,11 @@ export class StarlarkPackagePlanYamlArgs extends jspb.Message {
hasMainFunctionName(): boolean;
clearMainFunctionName(): StarlarkPackagePlanYamlArgs;

getDependenciesOnly(): boolean;
setDependenciesOnly(value: boolean): StarlarkPackagePlanYamlArgs;
hasDependenciesOnly(): boolean;
clearDependenciesOnly(): StarlarkPackagePlanYamlArgs;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): StarlarkPackagePlanYamlArgs.AsObject;
static toObject(includeInstance: boolean, msg: StarlarkPackagePlanYamlArgs): StarlarkPackagePlanYamlArgs.AsObject;
Expand All @@ -1570,6 +1586,7 @@ export namespace StarlarkPackagePlanYamlArgs {
serializedParams?: string,
relativePathToMainFile?: string,
mainFunctionName?: string,
dependenciesOnly?: boolean,
}

export enum SerializedParamsCase {
Expand All @@ -1586,6 +1603,11 @@ export namespace StarlarkPackagePlanYamlArgs {
_MAIN_FUNCTION_NAME_NOT_SET = 0,
MAIN_FUNCTION_NAME = 4,
}

export enum DependenciesOnlyCase {
_DEPENDENCIES_ONLY_NOT_SET = 0,
DEPENDENCIES_ONLY = 5,
}
}

export enum ServiceStatus {
Expand Down
Loading
Loading