15167 Commits

Author SHA1 Message Date
sophia
3dbd9286be
Merge targets with upserting 2022-04-25 12:26:23 -05:00
sophia
12de22a7db
Get machine state 2022-04-25 12:26:23 -05:00
sophia
371377ebfc
Use provider to get current state for now 2022-04-25 12:26:23 -05:00
sophia
8a39ee6960
Set target state in addition to machine state 2022-04-25 12:26:22 -05:00
sophia
c01a38b6e1
Load target index targets 2022-04-25 12:26:22 -05:00
sophia
2469016be1
Use remote machine/environment 2022-04-25 12:26:22 -05:00
sophia
5ed50277bd
Find target in index by uuid or name 2022-04-25 12:26:22 -05:00
Chris Roberts
9dbeca0492
Update SDK ref 2022-04-25 12:26:22 -05:00
Chris Roberts
d2738e43ee
Update getoptions version 2022-04-25 12:26:22 -05:00
Chris Roberts
d8145cdd52
Update flag value extraction for dynamic commands 2022-04-25 12:26:22 -05:00
Chris Roberts
e00f82fdee
Update to use component flags and update parsing 2022-04-25 12:26:22 -05:00
Chris Roberts
39439cf9fb
Register commands and subcommands during setup 2022-04-25 12:26:22 -05:00
Chris Roberts
66dc2fd259
Remove loading status during startup 2022-04-25 12:26:22 -05:00
Chris Roberts
bd9ba0654e
Update builtins to use component command flag 2022-04-25 12:26:22 -05:00
Chris Roberts
5115bc3fb3
Update to use component command flags 2022-04-25 12:26:21 -05:00
Chris Roberts
3933632216
Update flag mappers to use generic component flag struct 2022-04-25 12:26:21 -05:00
Chris Roberts
1a32e8c2f9
Fetch command banner and remove switch characters 2022-04-25 12:26:21 -05:00
Chris Roberts
5e6fe71a37
Use ruby command arguments type when executing command 2022-04-25 12:26:21 -05:00
Chris Roberts
7b82ba7ca0
Add ruby local command arguments type and mapper 2022-04-25 12:26:21 -05:00
Paul Hinze
bb2601586d
Bump vagrant-plugin-sdk to latest version 2022-04-25 12:26:21 -05:00
Paul Hinze
92c345b42d
Allow go push plugins to use config from Vagrantfile
* Populate push configs when parsing the vagrantfile
* Allow untyped configs to be shipped over GRPC
* In our demo plugin, walk the vagrantfile and snag the config

Example Vagrantfile that works with the demo plugin:

```ruby
Vagrant.configure("2") do |config|
  config.push.define "myplugin" do |push|
    push.coolkey = "coolvalue"
    push.alist = ["so", "many", "items"]
    push.ahash = { "hashkey" => "hashvalue" }
  end
end

```
2022-04-25 12:26:21 -05:00
Paul Hinze
a841da4fc6
Add a simple push plugin in Go
The only tweak required to get this to work was allowing a DummyConfig
to survive being passed through a remote plugin on the Ruby side.
2022-04-25 12:26:21 -05:00
Paul Hinze
737c1a5f8b
Use the simpler plugin interface for Push plugins
* Bumps the go.mod to the just-merged SDK version
* Returns empty results on success vs messing around with PushResponses
2022-04-25 12:26:21 -05:00
Paul Hinze
0fef7cc416
Port push plugins
This uses the new Push plugin support added to the plugin SDK in https://github.com/hashicorp/vagrant-plugin-sdk/pull/106 to make the following changes:

 * The plugin manager on the Go side now registers push plugins
 * The the _remote_ plugin manager on the Ruby side now calls over to
   the go side to get push plugins
 * All the wiring is hooked up such that when a push plugin is replaced
   with its remote GRPC-client-wielding equivalent, the messages are
   ferried around.
2022-04-25 12:26:21 -05:00
sophia
3005f7e274
Bump sdk 2022-04-25 12:26:21 -05:00
sophia
53f7b3f8eb
Update tests for GRPC errors 2022-04-25 12:26:20 -05:00
sophia
deb667ecd3
Use common rpc errdetails messages 2022-04-25 12:26:20 -05:00
sophia
df5f7d40e8
Rename exception logger to exception transformer
The exception logger no longer logs errors. Instead it transforms
the errors into a grpc friendly format. The exception that would
have been logged at this point gets logged when the task completes.
2022-04-25 12:26:20 -05:00
sophia
219473fb60
Seach for localized error message in error details 2022-04-25 12:26:20 -05:00
sophia
a62c3d69cf
Only wrap error in grpc error if not already 2022-04-25 12:26:20 -05:00
sophia
c4e97bb89b
Send localized message originating from plugin (if applicable) 2022-04-25 12:26:20 -05:00
sophia
45e64b9890
Add localized message proto 2022-04-25 12:26:20 -05:00
sophia
aeda0ec039
Pass error status with job completion results 2022-04-25 12:26:20 -05:00
sophia
d09c12dad3
Add status proto message to outgoing errors 2022-04-25 12:26:20 -05:00
sophia
c70da0f548
Raise Vagrant error 2022-04-25 12:26:20 -05:00
sophia
0dcefddae4
Only add exception logger to non-generic methods 2022-04-25 12:26:20 -05:00
sophia
441f82760b
Include exception logger and attach to all available methods 2022-04-25 12:26:19 -05:00
Chris Roberts
914530d26a
Use trace log level for noisy log messages 2022-04-25 12:26:19 -05:00
Chris Roberts
6b4e13c615
Use environment variable for logging level 2022-04-25 12:26:19 -05:00
Chris Roberts
42a89335d4
Set environment variable to persist logging level 2022-04-25 12:26:19 -05:00
Chris Roberts
4bcef5de84
Update initial logger configuration to properly apply 2022-04-25 12:26:19 -05:00
Chris Roberts
ec68f6d910
Allow trace to accept args when adding on undefine 2022-04-25 12:26:19 -05:00
Chris Roberts
1b8686d471
Use configurator for level configuration 2022-04-25 12:26:19 -05:00
Chris Roberts
fb1dc2cc59
Load log4r patches at startup 2022-04-25 12:26:19 -05:00
Chris Roberts
d746df4883
Patch Log4r to allow trace logging level 2022-04-25 12:26:19 -05:00
Paul Hinze
ab5a7f2b27
Remove httpfs package
You want to know something silly? There are multiple versions of
go-bindata floating around in the world, and they have different
features and flags.

This httpfs package was written with
https://github.com/go-bindata/go-bindata and uses the -fs flag. Most
everyone else (nixpkgs, homebrew) seems to have moved over to this fork
https://github.com/kevinburke/go-bindata, which does not have that
feature.

Run `go generate` with this installed and you'll get an error like `flag
provided but not defined: -fs`.

It looks like `httpfs` is the odd one out here, and it's not used
anywhere I can find either here or waypoint, so let's just remove it so
we can `go generate` cleanly with the version of go-bindata that most
people are using.
2022-04-25 12:26:19 -05:00
Chris Roberts
dc03dd9cad
Wrap remote manager setup/teardown within usage tracker 2022-04-25 12:26:19 -05:00
Chris Roberts
d5cf2b66ed
Define a manager tracker for enabling remote manager 2022-04-25 12:26:18 -05:00
Chris Roberts
1a80e6112b
Remove WithMapper module and add autoload for UsageTracker 2022-04-25 12:26:18 -05:00
Chris Roberts
1849e941f3
Add helper class for usage tracking 2022-04-25 12:26:18 -05:00