Commit graph

1228 commits

Author SHA1 Message Date
oss-core-libraries-dashboard[bot]
206f8102c9
[COMPLIANCE] Update Copyright and License Headers (Batch 2 of 7) (#13761)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2025-12-22 16:46:17 +05:30
oss-core-libraries-dashboard[bot]
614fcb0549
[COMPLIANCE] Update Copyright and License Headers (Batch 1 of 7) (#13765)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2025-12-22 16:38:56 +05:30
oss-core-libraries-dashboard[bot]
ea57f40b89
[COMPLIANCE] Update Copyright and License Headers (#13752)
Some checks failed
/ sync-acceptance (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.1 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.2 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.3 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.4 (push) Has been cancelled
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2025-12-04 17:07:40 +05:30
Taru Garg
162b7c0d70
fix(commands/login): Load correct locales for the login command (#13747)
Some checks failed
/ sync-acceptance (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.1 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.2 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.3 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.4 (push) Has been cancelled
2025-11-22 09:34:58 +05:30
Sebastien Dionne
81e6dfa595
Merge pull request #13731 from survivant/main
Fix typos and linguistic errors in documentation / hacktoberfest
2025-11-21 10:52:25 +05:30
Chris Roberts
5543415424
Remove server mode checks
Remove service mode checks from command roots.
2025-04-24 13:04:07 -07:00
Chris Roberts
75e45505f5
Add some helpful debug logs for more context 2025-04-07 16:05:10 -07:00
Chris Roberts
ea25996b21
Update Vagrant behavior outside of installers
Remove customized require behaviors and modify the bin executable
to check for missing tools that Vagrant expects to exist when
running outside of an installer.
2025-04-02 11:40:17 -07:00
Chris Roberts
e3a8d7f2cf
Remove vagrant-go implementation 2025-03-17 14:14:42 -07:00
Allison Larson
11ca740311 Fix output message for box missing metadata 2025-03-03 14:58:45 -08:00
Allison Larson
5564b8a1fd Determine compatible version when checking outdated box
When a request to check an outdated box (or update a box), add explicit
architecture compatibility check in addition to ensuring the version is
newer than before.

The architecture compatibility checks allow boxes that were marked as an
"unknown" architecture to see new "unknown" architectures as viable
update options, if an architecture specific provider is not available.
In the scenario that the existing version/provider has an explicit
architecture defined, a new version/provider with an "unknown"
architecture is not considered compatible.

This architecture check can be bypassed by explicitly setting
`config.vm.box_architecture = nil` in the Vagrantfile.
2025-03-03 14:58:45 -08:00
Allison Larson
834e84fa6e Include arch constraint when checking global outdated boxes 2025-02-26 15:59:56 -08:00
Chris Roberts
37b294680c
Update authentication handling with client wrapper 2024-11-11 15:49:42 -08:00
Chris Roberts
8b06640fcf
Use helper for require calls 2024-11-06 17:33:00 -08:00
Chris Roberts
4fc1311f93 Fix cloud provider upload command
Fixes the cloud provider upload command to properly include the architecture
value when determining the correct provider.
2024-06-26 08:44:36 -07:00
Chris Roberts
51adb12547 Add architecture support for boxes
Introduce support for handling box architecture. Adds a new
`box_architecture` setting that defaults to `:auto` which will perform
automatic detection of the host system, but can be overridden with a
custom value. Can also be set to `nil` which will result in it fetching
the box flagged with the default architecture within the metadata.

Box collection has been modified to allow existing boxes already
downloaded and unpacked to still function as expected when architecture
information is not available.
2023-09-14 16:15:03 -07:00
Chris Roberts
e958c6183a Adds initial HCP config support
Adds initial basic support for HCP based configuration in vagrant-go.
The initalization process has been updated to remove Vagrantfile parsing
from the client, moving it to the runner using init jobs for the basis
and the project (if there is one). Detection is done on the file based
on extension for Ruby based parsing or HCP based parsing.

Current HCP parsing is extremely simple and currently just a base to
build off. Config components will be able to implement an `Init`
function to handle receiving configuration data from a non-native source
file. This will be extended to include a default approach for injecting
defined data in the future.

Some cleanup was done in the state around validations. Some logging
adjustments were applied on the Ruby side for better behavior
consistency.

VirtualBox provider now caches locale detection to prevent multiple
checks every time the driver is initialized.
2023-09-07 17:26:10 -07:00
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Chris Roberts
8e26495189 Project client and proc mapper fixes
Default the options for default provider so an options value is not
required when calling. The index for the proc lookup should use the key
method, not index.
2023-06-05 17:39:58 -07:00
Chris Roberts
1d991cb253 Rescue not found and return nil for machine box 2023-06-05 14:18:06 -07:00
Chris Roberts
0a20379b1a Enable deprecated key type and host key algorithm
Recent versions of OpenSSH remove support of ssh-rsa key types and host
key algorithms from the default conection configuration. Set options to
enable them and provide a configuration option which can disable them if
required.
2023-05-22 17:09:47 -07:00
Chris Roberts
b0c5852145 Move constants to isolated file to be loaded on-demand
Since the protos are only loaded when the serve command is invoked, move
the constant alias definitions into an isolated file so they are only
loaded when needed by the serve command
2023-05-18 12:02:07 -07:00
Sophia Castellarin
9f9d2fdfcb
Merge pull request #12652 from t2sa/typo
Fix sentense
2023-02-14 12:12:27 -08:00
Chris Roberts
1cd6ac3b31 Isolate loading dependencies for serve command
Only load the dependencies needed for the serve command if the serve
command is being run. This allows Vagrant to properly load on platforms
where some of the dependency libraries may not be available due to
incompatibilities or being EOL.
2022-12-07 15:35:00 -08:00
Derek Ditch
f581778c2c Fixes Google namespace resolution to global space 2022-11-08 08:50:01 -06:00
sophia
49280286ad Strip new lines from error details
The error details message should just be one string without spacing
so the terminal can set a output length. This will allow messages
from Ruby and Go errors to have similar formating.
2022-09-19 15:14:42 -04:00
sophia
add66c4c2a Include message in rpc status error from ruby 2022-09-19 15:14:42 -04:00
sophia
6d4f769c87 Validate provider 2022-09-19 15:14:42 -04:00
sophia
f7cd08b208 Pass terminal output color option from Ruby to terminal plugin 2022-09-14 11:42:52 -04:00
sophia
8bdb5e797d Pass in echo/secret ui input setting 2022-08-30 15:18:21 -05:00
Paul Hinze
7c56c74bb6
Support and honor the "primary" option for Command plugins 2022-07-27 11:36:04 -05:00
Sophia Castellarin
5170d83c21
Merge pull request #325 from hashicorp/load-external-plugin-config
Find type to unany objects when mapping
2022-07-26 14:15:33 -05:00
sophia
c2d8f892ac Find type to unany objects when mapping
find_types works fine until you have a module which has the same name but different case. For example, the VagrantVmware package is HashiCorp::VagrantVMwareDesktop. All the protos are at Hashicorp::Vagrant::… So, you end up with this fun

Object.constants.select { |n| n.to_s.downcase == "hashicorp" }
=> [:HashiCorp, :Hashicorp]

So, when trying to walk down the modules to find the right type to unany to, Vagrant sometimes takes the wrong path (eg. Down the HashiCorp module instead of the Hashicorp module).

This change will keep a list of the parent modules when walking down the module list. This way if a dead end is reached then Vagrant can go a level back and keep searching for the correct class.
2022-07-26 12:22:28 -05:00
Chris Roberts
54502d5d66
Merge pull request #324 from hashicorp/fix-packaged-hang
Fix hanging commands when using packaged installation
2022-07-26 09:12:50 -07:00
Chris Roberts
b917dc466a Implement stop on the ruby internal service 2022-07-25 14:30:45 -07:00
Chris Roberts
fda4aef9c7 Make server instance accessible, return integer value 2022-07-25 14:29:38 -07:00
Paul Hinze
fc76f71ffc
Fix vbox multimachine by setting provider parallel default correctly
Turns out I misinterpreted the behavior of a ruby method with a default
being passed nil so I assumed :parallel was effectively defaulting to
true when it is the opposite.
2022-07-25 15:52:11 -05:00
Sophia Castellarin
fe4956ac83
Merge pull request #314 from hashicorp/ruby-load-global-plugins
Load global ruby plugins
2022-07-25 09:40:00 -05:00
Paul Hinze
9ab94f9971
Fix crashes on Vagrantfiles with provisioners
I forgot to handle nil in the new PluginOptions stuff, and options are
nil for Provisioner plugins.
2022-07-20 17:36:05 -05:00
Paul Hinze
957d0d3779
Bring plugin options back to Ruby for providers and synced folders
This removes the need for the validation workaround for Docker, because
box_updated is once again available in that context.

We don't technically need the SyncedFolder priorities back on the Ruby
side, but wiring them through for symmetry.

Depends on https://github.com/hashicorp/vagrant-plugin-sdk/pull/183
2022-07-15 12:14:47 -05:00
sophia
5bc7218a70 Load global ruby plugins 2022-07-13 14:08:46 -05:00
Chris Roberts
da9892a62f Use #to_proto on class match, otherwise convert 2022-07-11 15:09:46 -07:00
Chris Roberts
2572d4f62b Include class where error originated 2022-07-11 15:09:21 -07:00
Chris Roberts
e082fd6359 Machine mapper no longer needs to load through environment 2022-07-11 15:09:08 -07:00
Chris Roberts
67895c927e Allow a machine client to load its target 2022-07-11 15:08:53 -07:00
Chris Roberts
d5ec939022 Request target in spec and allow conversion to machine 2022-07-08 16:38:03 -07:00
Chris Roberts
19b4adb3b8 Implement get_value rpc in vagrantfile client 2022-07-08 16:38:02 -07:00
Paul Hinze
ee8883153c
Make Docker provider work again post config refactor
- Allow machine.box to be empty without sadness (depends on
   https://github.com/hashicorp/vagrant-plugin-sdk/pull/182)
 - Get synced folder type from plugin name instead of defaulting to
   :virtualbox
2022-07-08 11:36:27 -05:00
Sophia Castellarin
66a22e5254
Merge pull request #303 from hashicorp/synced_folder_has_override_opts
Synced folder has override opts
2022-07-07 16:28:14 -05:00
Chris Roberts
f5d778d51a Revert "Merge pull request #300 from hashicorp/optimize-ruby-command-list"
This reverts commit 1c26a4abb0, reversing
changes made to 186824a568.

The changes broke plugin loading when using subcommands so these
changes will be reverted until the underlying issue can be
investigated and resolved.
2022-07-07 14:03:56 -07:00