Skip to content

refactor: register virtual machine#224

Merged
lbajolet-hashicorp merged 1 commit intomainfrom
refactor/register
Jul 29, 2024
Merged

refactor: register virtual machine#224
lbajolet-hashicorp merged 1 commit intomainfrom
refactor/register

Conversation

@tenthirtyam
Copy link
Copy Markdown
Collaborator

Description

  • Moves the destroy timeout value to a constant.
  • Avoids logging an error before checking if it exists.
  • Combines the timeout error message logging and UI notification: Since both actions occur together, keep them within the same conditional block to avoid repetition.
  • Uses a ticker for periodic checks instead of manually sleeping and checking. This is more idiomatic and readable.

Testing

Standard

packer-plugin-vmware on  refactor/registergo fmt ./...                                 

packer-plugin-vmware on  refactor/registermake generate
2024/07/08 14:10:42 Copying "docs" to ".docs/"
2024/07/08 14:10:42 Replacing @include '...' calls in .docs/
Compiling MDX docs in '.docs' to Markdown in '.web-docs'...

packer-plugin-vmware on  refactor/registermake build

packer-plugin-vmware on  refactor/registermake test
?       github.com/hashicorp/packer-plugin-vmware       [no test files]
?       github.com/hashicorp/packer-plugin-vmware/version       [no test files]
ok      github.com/hashicorp/packer-plugin-vmware/builder/vmware/common 7.021s
ok      github.com/hashicorp/packer-plugin-vmware/builder/vmware/iso    2.631s
ok      github.com/hashicorp/packer-plugin-vmware/builder/vmware/vmx    3.403s

packer-plugin-vmware on  refactor/register make dev
packer plugins install --path packer-plugin-vmware "github.com/hashicorp/vmware"
Successfully installed plugin github.com/hashicorp/vmware from /Users/johnsonryan/Library/Mobile Documents/com~apple~CloudDocs/Code/Work/packer-plugin-vmware1/packer-plugin-vmware to /Users/johnsonryan/.packer.d/plugins/github.com/hashicorp/vmware/packer-plugin-vmware_v1.0.12-dev_x5.0_darwin_amd64

@tenthirtyam tenthirtyam added this to the v1.0.12 milestone Jul 8, 2024
@tenthirtyam tenthirtyam self-assigned this Jul 8, 2024
@tenthirtyam tenthirtyam requested a review from a team as a code owner July 8, 2024 18:14
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.

Just left one comment regarding usage of log.Printf in addition to ui.Error as it feels like a suspender+belt kind of situation, but aside from that LGTM!
Pre-approving to not delay a later merge.

@tenthirtyam tenthirtyam force-pushed the refactor/register branch 5 times, most recently from 271b60d to edde6b3 Compare July 26, 2024 22:56
- Moves the destroy timeout value to a constant.
- Avoids logging an error before checking if it exists.
- Combines the timeout error message logging and UI notification: Since both actions occur together, keep them within the same conditional block to avoid repetition.
- Uses a ticker for periodic checks instead of manually sleeping and checking. This is more idiomatic and readable.

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
@lbajolet-hashicorp
Copy link
Copy Markdown
Contributor

FYI: I replaced a couple of ui.Error(fmt.Sprintf... with ui.Errorf in a quick last reroll, if tests are green, I'll merge this

@lbajolet-hashicorp lbajolet-hashicorp merged commit 7e8a63d into main Jul 29, 2024
@lbajolet-hashicorp lbajolet-hashicorp deleted the refactor/register branch July 29, 2024 13:56
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 1, 2026

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

chore Chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants