Skip to content

feat(cli): add --parameter flag to exp scaletest command #10132

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

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Oct 9, 2023

This PR adds support for passing parameters to workspaces built by exp scaletest.

@johnstcn johnstcn self-assigned this Oct 9, 2023
@johnstcn johnstcn marked this pull request as ready for review October 9, 2023 12:19
@johnstcn johnstcn requested review from mafredri and mtojek October 9, 2023 12:19
richParameters, err := prepWorkspaceBuild(inv, client, prepWorkspaceBuildArgs{
Action: WorkspaceCreate,
Template: tpl,
NewWorkspaceName: "scaletest-%", // TODO: the scaletest runner will pass in a different name here. Does this matter?
Copy link
Member Author

Choose a reason for hiding this comment

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

@mtojek Does the value here only matter for showing the plan output?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, only for dry-run purposes. Not sure what happens if there is a workspace with such name exists. In the worst case, you can append a random number.

Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

ok!

richParameters, err := prepWorkspaceBuild(inv, client, prepWorkspaceBuildArgs{
Action: WorkspaceCreate,
Template: tpl,
NewWorkspaceName: "scaletest-%", // TODO: the scaletest runner will pass in a different name here. Does this matter?
Copy link
Member

Choose a reason for hiding this comment

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

Yes, only for dry-run purposes. Not sure what happens if there is a workspace with such name exists. In the worst case, you can append a random number.

@@ -525,6 +525,8 @@ func (r *RootCmd) scaletestCreateWorkspaces() *clibase.Cmd {

useHostUser bool

parameterFlags workspaceParameterFlags
Copy link
Member

Choose a reason for hiding this comment

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

FYI This may also pull --build-options, not sure if you want to support them too. Probably not.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't see a need at present. We don't rebuild workspaces in this command, only create.

@johnstcn johnstcn merged commit 5673aca into main Oct 9, 2023
@johnstcn johnstcn deleted the cj/scaletest-parameter-flag branch October 9, 2023 13:08
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants