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

fix: run once command list #427

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

tenthirtyam
Copy link
Collaborator

@tenthirtyam tenthirtyam commented May 10, 2024

Summary

Updates RunOnceCommandList to a slice of strings []string and updates guiRunOnce() to pass "" if no commands are provided. This will ensure that the function addresses each case.

Testing

Basic:

packer-plugin-vsphere git:(fix/run-once-command-list) make generate             
2024/05/09 22:24:23 Copying "docs" to ".docs/"
2024/05/09 22:24:23 Replacing @include '...' calls in .docs/
Compiling MDX docs in '.docs' to Markdown in '.web-docs'...packer-plugin-vsphere git:(fix/run-once-command-list) make buildpacker-plugin-vsphere git:(fix/run-once-command-list) make test
?       github.com/hashicorp/packer-plugin-vsphere      [no test files]
?       github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/common/testing       [no test files]
?       github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/examples/driver      [no test files]
?       github.com/hashicorp/packer-plugin-vsphere/version      [no test files]
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/clone        2.923s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/common       2.614s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/driver       7.161s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/iso  4.477s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/supervisor   8.391s
ok      github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere       3.897s
ok      github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere-template      4.728spacker-plugin-vsphere git:(fix/run-once-command-list) 

Scenarios:

run_once_command_list not provided.
run_once_command_list [] used.
run_once_command_list [""] used.
run_once_command_list ["command1", "command2"] used.

Reference

Closes #419

@tenthirtyam tenthirtyam added this to the v1.3.0 milestone May 10, 2024
@tenthirtyam tenthirtyam self-assigned this May 10, 2024
@tenthirtyam tenthirtyam requested a review from a team as a code owner May 10, 2024 02:27
Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

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

The change looks good to me! I'm a bit surprised at the amount of doc changes that are melded in one commit, there's a lot in there.
Would you be ok to split the PR in two commits? One for the doc improvements, and one for the command fix? That'd be easier to understand the scope of the change here.

@tenthirtyam
Copy link
Collaborator Author

Sure, I can happily split it out today.

Updates RunOnceCommandList to a slice of strings `[]string` and updates 'guiRunOnce()` to pass "" if no commands are provided. This will ensure that the function addresses each case.

Ref: #419

Signed-off-by: Ryan Johnson <[email protected]>
@tenthirtyam tenthirtyam force-pushed the fix/run-once-command-list branch from 10382f1 to 2a31f38 Compare May 10, 2024 18:13
@tenthirtyam
Copy link
Collaborator Author

Simplified in 2a31f38, @lbajolet-hashicorp.

Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the split!

@lbajolet-hashicorp lbajolet-hashicorp merged commit ac740b1 into main May 10, 2024
12 checks passed
@lbajolet-hashicorp lbajolet-hashicorp deleted the fix/run-once-command-list branch May 10, 2024 18:17
@tenthirtyam
Copy link
Collaborator Author

Posted the other half of the split from the original commit.

@hashicorp hashicorp locked as resolved and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vsphere-clone: unexpected EOF/Segmentation Violation
2 participants