Skip to content

fix: version checks#262

Merged
lbajolet-hashicorp merged 1 commit intovmware:mainfrom
tenthirtyam:fix/player-version-checks
Dec 5, 2024
Merged

fix: version checks#262
lbajolet-hashicorp merged 1 commit intovmware:mainfrom
tenthirtyam:fix/player-version-checks

Conversation

@tenthirtyam
Copy link
Copy Markdown
Collaborator

@tenthirtyam tenthirtyam commented Nov 15, 2024

Summary

  • Updates the version checks, using hashicorp/go-version.
  • Updates log messages based on INFO or WARN context.
  • Moves constants to the driver.go for easier maintenance.

Tests

➜ make build

packer-plugin-vmware on  pr/262 via 🐹 v1.23.3 
➜ make 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.042s
ok      github.com/hashicorp/packer-plugin-vmware/builder/vmware/iso    2.665s
ok      github.com/hashicorp/packer-plugin-vmware/builder/vmware/vmx    3.531s

packer-plugin-vmware on  pr/262 via 🐹 v1.23.3 took 10.2s 
➜ make generate
2024/12/02 10:47:55 Copying "docs" to ".docs/"
2024/12/02 10:47:55 Replacing @include '...' calls in .docs/
Compiling MDX docs in '.docs' to Markdown in '.web-docs'...

Postive Tests: Min of 13.5.0; running 13.6.1.

2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] Checking VMware Fusion version...
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] VMware Fusion: 13.6.1
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] Checking VMware Fusion paths...
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] - VMware Fusion.app found at: /Applications/VMware Fusion.app
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] - vmware-vmx found at: /Applications/VMware Fusion.app/Contents/Library/vmware-vmx
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] - vmrun found at: /Applications/VMware Fusion.app/Contents/Library/vmrun
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] - vmware-vdiskmanager found at: /Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 Using driver *common.FusionDriver, Success: true

Negative Test: Min of 13.7.0 set as const; running 13.6.1.

packer build --force -var-file=photon-4.0-R2.pkrvars.hcl .
vmware-iso.vagrant-vmw: output will be in this color.

Build 'vmware-iso.vagrant-vmw' errored after 74 milliseconds 855 microseconds: failed creating driver : driver initialization failed. fix at least one driver to continue:
* [ERROR] Requires VMware Fusion 13.7.0 or later, 13.6.1 installed

@tenthirtyam tenthirtyam added the bug Bug label Nov 15, 2024
@tenthirtyam tenthirtyam added this to the v1.1.1 milestone Nov 15, 2024
@tenthirtyam tenthirtyam self-assigned this Nov 15, 2024
@tenthirtyam tenthirtyam marked this pull request as ready for review November 18, 2024 14:50
@tenthirtyam tenthirtyam requested a review from a team as a code owner November 18, 2024 14:50
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 @tenthirtyam !

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.

Hey @tenthirtyam,

Overall this looks good to me, thanks for the reroll with go-version! I left a few last comments regarding versions and error handling, I think there's some small improvements we can make there, but besides that, this looks good to me.

Pre-approving to not block later, I'll let you address my last comments and I'll do a final round of review before merging this.

@tenthirtyam tenthirtyam changed the title fix: player version checks fix: version checks Nov 27, 2024
@tenthirtyam tenthirtyam marked this pull request as draft November 27, 2024 00:54
@tenthirtyam tenthirtyam marked this pull request as ready for review December 2, 2024 15:48
- Updates the version checks.
- Updates log messages based on INFO or WARN context.
- Moves constants to the `driver.go` for easier maintenance.

Signed-off-by: Ryan Johnson <ryan@tenthirtyam.org>
@tenthirtyam
Copy link
Copy Markdown
Collaborator Author

@lbajolet-hashicorp - ready to go!

Postive Tests: Min of 13.5.0; running 13.6.1.

2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] Checking VMware Fusion version...
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] VMware Fusion: 13.6.1
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] Checking VMware Fusion paths...
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] - VMware Fusion.app found at: /Applications/VMware Fusion.app
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] - vmware-vmx found at: /Applications/VMware Fusion.app/Contents/Library/vmware-vmx
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] - vmrun found at: /Applications/VMware Fusion.app/Contents/Library/vmrun
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 [INFO] - vmware-vdiskmanager found at: /Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager
2024/12/03 20:51:37 packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_arm64 plugin: 2024/12/03 20:51:37 Using driver *common.FusionDriver, Success: true

Negative Test: Min of 13.7.0 set as const for testing; running 13.6.1.

packer build --force -var-file=photon-4.0-R2.pkrvars.hcl .
vmware-iso.vagrant-vmw: output will be in this color.

Build 'vmware-iso.vagrant-vmw' errored after 74 milliseconds 855 microseconds: failed creating driver : driver initialization failed. fix at least one driver to continue:
* [ERROR] Requires VMware Fusion 13.7.0 or later, 13.6.1 installed

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 rerolls @tenthirtyam

Merging now

@lbajolet-hashicorp lbajolet-hashicorp merged commit 1c153d8 into vmware:main Dec 5, 2024
@tenthirtyam tenthirtyam deleted the fix/player-version-checks branch January 30, 2025 02:00
@github-actions
Copy link
Copy Markdown

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 Jan 31, 2026
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.

3 participants