15730 Commits

Author SHA1 Message Date
Paul Hinze
71cc8ee7bb
Fix some bugs in provider options handling
- Defaultable needs to default to true when it's not specified
- We need to allow a non-defaultable provider to be selected if it shows
  up in the config
2022-06-08 17:25:16 -05:00
Sophia Castellarin
00829ba9e6
Merge pull request #277 from hashicorp/downloader-plugin
Downloader plugin
2022-06-08 11:06:36 -05:00
sophia
4289b1b7cd Bump sdk 2022-06-08 10:31:20 -05:00
sophia
c5a996000d Add deps on go-retryablehttp 2022-06-08 10:30:46 -05:00
sophia
0cdb63db58 Flush out http downloader 2022-06-08 10:30:46 -05:00
sophia
1af502ee9f Rename filedownloader -> httpdownloader 2022-06-08 10:30:46 -05:00
sophia
09f92f5ce9 Use http client as downloader 2022-06-08 10:30:46 -05:00
sophia
7282d43fae Make downloader plugin configurable 2022-06-08 10:30:46 -05:00
sophia
36081df049 Load filedownloader plugin 2022-06-08 10:30:46 -05:00
sophia
ec2e2a6e89 go generate 2022-06-08 10:30:46 -05:00
sophia
9c234618f3 Add downloader builtin plugin 2022-06-08 10:30:46 -05:00
sophia
90825f7086 go generate 2022-06-08 10:30:46 -05:00
Paul Hinze
42f5ca2621
Merge pull request #282 from hashicorp/synced-folder-options
Use plugin options for Synced Folder priorities
2022-06-07 16:21:49 -05:00
Paul Hinze
57a7ea8d5a
Bump SDK 2022-06-07 15:39:13 -05:00
Paul Hinze
8b08b3117c
Use plugin options for Synced Folder priorities
Now that plugin options are available, we can use them to interpret
synced folder priorities and remove the shim we had in place.
2022-06-06 17:39:09 -05:00
Paul Hinze
f2071c2a98
Merge pull request #281 from hashicorp/component-priorities-and-metadata
Use Component Options to implement ProviderOptions
2022-06-06 17:36:32 -05:00
Paul Hinze
2c27d5f125
Bump SDK 2022-06-06 17:08:24 -05:00
Paul Hinze
8dbe72a5a0
Use Component Options to implement ProviderOptions
* Populates ComponentOptions into plugin structs
* Maps options for legacy Provider Plugins into PluginOptions
* Demos use of PluginOptions in a stub provider
* Honors plugin priority and defaultable settings
2022-06-03 16:37:05 -05:00
Paul Hinze
7341d41c01
Merge pull request #280 from hashicorp/update-deps
nix: Update deps and rerun generate
2022-06-03 14:52:31 -05:00
Paul Hinze
c60f82d22f
go generate w/ latest version of deps 2022-06-03 14:40:00 -05:00
Paul Hinze
7e3066e7be
nix: Update protobuf & mockery to latest version
Also run `nix flake update` to get general package updates
2022-06-03 14:28:40 -05:00
Sophia Castellarin
fa1f45732b
Merge pull request #276 from hashicorp/machine-readable-flag
Machine readable flag
2022-06-03 12:11:15 -05:00
sophia
3f4ab04e3d Bump sdk 2022-06-03 09:28:53 -05:00
Sophia Castellarin
d258cc2174
Merge pull request #279 from hashicorp/command-remote-plugin
Add command remote plugin
2022-06-02 11:33:44 -05:00
sophia
1ad8dc5234 Add command remote plugin 2022-06-01 14:36:19 -05:00
sophia
194882214a Add machine readable bool endpoint to terminal ui 2022-05-31 15:47:47 -05:00
sophia
4ffe33461c go generate . 2022-05-31 15:47:27 -05:00
sophia
9ed92d2ab6 Recognize --machine-readable flag 2022-05-31 14:41:34 -05:00
sophia
32bb18e9b9 Only output machine readable data if the terminal is not interactive 2022-05-31 10:53:21 -05:00
sophia
65e851d646 Output machine readable data as table 2022-05-31 10:28:26 -05:00
sophia
313ba8655a Implement missing ui#machine method 2022-05-31 10:09:36 -05:00
sophia
58e8e6ff97 Remove unused machine initialization steps 2022-05-31 10:09:35 -05:00
sophia
079975fe2b Add machine readable flag 2022-05-31 10:09:35 -05:00
Paul Hinze
f21f76b41d
Merge pull request #268 from hashicorp/port-default-provider
Port default provider
2022-05-27 13:17:30 -05:00
Paul Hinze
6f9ea74e0e
Mark box_optional test as temporarily pending 2022-05-26 11:16:45 -05:00
Paul Hinze
4d79c95177
Update tests and address one thing caught by them
Namely, the specified synced folder type should override the default type
2022-05-25 17:56:40 -05:00
Paul Hinze
41933e9c11
Bump SDK 2022-05-25 16:19:51 -05:00
Paul Hinze
25fcf61364
Sort synced folder plugins by priority and honor allowed setting
It turns out that synced folder plugins aren't returned in a consistent
order, which was causing all kinds of mayhem.

We can tone down that mayhem by implementing a shim of priority sorting
the plugins. This shim can be removed once we have proper priority
registration in the SDK.
2022-05-25 16:19:50 -05:00
Paul Hinze
88822f5a96
Override provider for all non-active targets
Instead of only targets with empty providers. This helps address a
problem that @soapy1 found in review where machines that failed to come
up would get stuck with the wrong provider.
2022-05-25 16:19:50 -05:00
Paul Hinze
823b6d366c
More conservative nil checking on WithProvider to prevent panics 2022-05-25 16:19:50 -05:00
Paul Hinze
49aa226613
Temporary workaround to let Docker provider work
Comment has the details, but this should hopefully be short lived
2022-05-25 16:19:50 -05:00
sophia
8801e030b7
Get default synced folder type
(cherry picked from commit cd6baafb9238a58e992519e0576565d1a57bf8f5)
(but modified to work)
2022-05-25 16:19:50 -05:00
Paul Hinze
02a06bca45
Fixes for provider capability invocations
It looks like I might have been the first to hit provider cabability
invocation in testing these changes, and so I found these few missing
methods on the client. They're just copied over from the other
capability hosts.

Calling capabilities on a provider also revealed that the wrong Machine
type was being pulled out of the funcspec args, so we had to correct
that too in order to get the capability calls working.
2022-05-25 16:19:50 -05:00
Paul Hinze
e605132321
Pass along provider to environment.target
Mirrors change in https://github.com/hashicorp/vagrant-plugin-sdk/pull/157
2022-05-25 16:19:50 -05:00
Paul Hinze
52ed086644
Change TargetIndex to only search by uuid
Note this reverses a change made in
https://github.com/hashicorp/vagrant-ruby/pull/180 to attempt to address
issues losing track of machines. Further testing is in order to verify
we haven't re-broken that, but after discussion we agreed this is the
correct behavior for the index.
2022-05-25 16:19:50 -05:00
Paul Hinze
06350a7afc
Port default provider selection
- Pulls in the SDK changes to Project.DefaultProvider and Project.Target
- Implements the hefty default provider method
- Un-hard-codes provider from Target, and sets it when a Target is
  looked up from a Project
2022-05-25 16:19:50 -05:00
Paul Hinze
f221614187
Fix duplicate guess_provider call
No reason to call it twice when it's already being stored in a local
variable that's unmodified.

Also document the params for this method to help lay the groundwork for
porting.
2022-05-25 16:19:50 -05:00
Paul Hinze
9f9b3855b9
Remove unused GetDefaultProvider impl 2022-05-25 16:19:50 -05:00
Paul Hinze
16cd665257
gitignore: delve, solargraph, rubocop 2022-05-25 16:19:50 -05:00
Paul Hinze
102e100108
client/target_index: Make yard comments conformant 2022-05-25 16:19:49 -05:00