Skip to content

fix: run once command list#427

Merged
lbajolet-hashicorp merged 1 commit intomainfrom
fix/run-once-command-list
May 10, 2024
Merged

fix: run once command list#427
lbajolet-hashicorp merged 1 commit intomainfrom
fix/run-once-command-list

Conversation

@tenthirtyam
Copy link
Copy Markdown
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 the bug Bug label May 10, 2024
@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
Copy Markdown
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
Copy Markdown
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 <ryan.johnson@broadcom.com>
@tenthirtyam tenthirtyam force-pushed the fix/run-once-command-list branch from 10382f1 to 2a31f38 Compare May 10, 2024 18:13
@tenthirtyam
Copy link
Copy Markdown
Collaborator Author

Simplified in 2a31f38, @lbajolet-hashicorp.

Copy link
Copy Markdown
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
@lbajolet-hashicorp lbajolet-hashicorp deleted the fix/run-once-command-list branch May 10, 2024 18:17
@tenthirtyam
Copy link
Copy Markdown
Collaborator Author

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

@vmware vmware 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

bug Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vsphere-clone: unexpected EOF/Segmentation Violation

2 participants