-
Notifications
You must be signed in to change notification settings - Fork 53
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: impl dependency list flag #2543
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't sure what level of detail you wanted on this so just did the full shebang
@@ -386,6 +391,16 @@ func (interpreter *StartosisInterpreter) buildBindings( | |||
return &predeclared, nil | |||
} | |||
|
|||
const ( | |||
moduleIdSeperator = "/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought: wouldn't this constant already be declared somewhere in the Startosis engine? Should we use that instead, so we don't have two constants doing the same thing?
) | ||
|
||
func getModulePrefix(moduleId string) string { | ||
return strings.Join(strings.SplitN(moduleId, moduleIdSeperator, numModuleIdSeparators)[:prefixNum], moduleIdSeperator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand of SplitN
, isn't numModuleIdSeparators
always just prefixNum
+ 1 (so we don't need to maintain the extra const)?
@@ -115,7 +115,7 @@ func (suite *StartosisIntepreterPlanYamlTestSuite) TestAddServiceWithFilesArtifa | |||
require.Nil(suite.T(), interpretationError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this file be renamed to startosis_interpreter_plan_yaml_generator_test
to match the name of PlanYaml -> PlanYamlGenerator?
@@ -813,6 +833,9 @@ tasks: | |||
command: | |||
- echo {{ kurtosis.4.code }} {{ kurtosis.4.output }} | |||
image: badouralix/curl-jq | |||
images: | |||
- badouralix/curl-jq | |||
- postgres:latest | |||
` | |||
require.Equal(suite.T(), expectedYaml, planYaml) | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a test case here where the dependenciesOnly
flag is true
? (assuming that, per the comment above, we maintain the dependenciesOnly
flag on the PlanYamlGenerator and it's not the responsibility of the CLI or user to pull out the info they want)
prefixNum = 3 | ||
) | ||
|
||
func getModulePrefix(moduleId string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing this, it'd have been helpful to have a comment giving an example of getModulePrefix
is supposed to return so that I know how to model its output in the above code
Description
kurtosis run github.com/kurtosis-tech/... --dependencies
returns ayaml
with a list of images and packages the run will need to depend on.Adding
--pull
will pull all the dependencies locally. Thekurtosis.yml
will be updated to use local versions of packages and Docker images are pulled onto the machine locallyIs this change user facing?
YES