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: allow custom engine, core, files images #2454

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

h4ck3rk3y
Copy link
Contributor

@h4ck3rk3y h4ck3rk3y commented May 16, 2024

this doesn't work at the moment, engine starts fine core doesn't

the bug is that the apiContainerVersion tag is empty

  • need to pass down engine version and use it if engine author is set
  • docs

@h4ck3rk3y h4ck3rk3y requested a review from leoporoli May 17, 2024 13:57
Copy link

Deploying kurtosis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 67c61a6
Status: ✅  Deploy successful!
Preview URL: https://d66b2771.kurtosis-docs.pages.dev
Branch Preview URL: https://gyani-other-repos.kurtosis-docs.pages.dev

View logs

@h4ck3rk3y h4ck3rk3y linked an issue May 17, 2024 that may be closed by this pull request
}

if engineAuthor != defaultEngineAuthor && engineVersion == defaultEngineVersion {
return stacktrace.NewError("Expected '%v' to be set as '%v' was set. Need to enter a custom engine veresion if a custom engine author is set", engineVersionFlagKey, engineAuthorFlagKey)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return stacktrace.NewError("Expected '%v' to be set as '%v' was set. Need to enter a custom engine veresion if a custom engine author is set", engineVersionFlagKey, engineAuthorFlagKey)
return stacktrace.NewError("Expected '%v' to be set as '%v' was set. Need to enter a custom engine version if a custom engine author is set", engineVersionFlagKey, engineAuthorFlagKey)

}

if engineAuthor != defaultEngineAuthor && engineVersion == defaultEngineVersion {
return stacktrace.NewError("Expected '%v' to be set as '%v' was set. Need to enter a custom engine veresion if a custom engine author is set", engineVersionFlagKey, engineAuthorFlagKey)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return stacktrace.NewError("Expected '%v' to be set as '%v' was set. Need to enter a custom engine veresion if a custom engine author is set", engineVersionFlagKey, engineAuthorFlagKey)
return stacktrace.NewError("Expected '%v' to be set as '%v' was set. Need to enter a custom engine version if a custom engine author is set", engineVersionFlagKey, engineAuthorFlagKey)

@@ -18,6 +18,7 @@ import (

const (
defaultEngineVersion = ""
defaultEngineAuthor = "kurtosistech"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this to this package: cli/cli/defaults/defaults.go ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now I wonder if this value shouldn't be in the launcher and an empty string makes the launcher use the default value. WDYT?

@@ -108,6 +110,7 @@ func NewEngineServerArgs(
grpcListenPortNum uint16,
logLevelStr string,
imageVersionTag string,
imageRepository string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you use imageRepository here instead of imageAuthor ?

@@ -14,7 +14,8 @@ This command will do nothing if the Kurtosis engine is already running.
You may optionally pass in the following flags with this command:
* `--log-level`: The level that the started engine should log at. Options include: `panic`, `fatal`, `error`, `warning`, `info`, `debug`, or `trace`. The engine logs at the `info` level by default.
* `--version`: The version (Docker tag) of the Kurtosis engine that should be started. If not set, the engine will start up with the default version.
* `--author`: "The author (Docker username) of the Kurtosis engine that should be started (blank will start the kurtosistech version). The same author and version are used for the API Container & Files Artifact Expander.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the same version also be used? or is it only the author? What happens if the user sets a custom version with the --api-container-version in the kurtosis enclave add command?

@@ -414,6 +426,7 @@ func (manager *EnclaveManager) RestartAllEnclaveAPIContainers(ctx context.Contex

// this way we are going to use always the same engine's version
useDefaultApiContainerVersionTag := ""
useDefaultImageAuthor := "kurtosistech"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use the defaultImageAuthor constant instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: make testing custom PRs easier
2 participants