396 Commits

Author SHA1 Message Date
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
deb667ecd3
Use common rpc errdetails messages 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
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
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
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
72b8547cce
Generated proto updates 2022-04-25 12:26:15 -05:00
Chris Roberts
acb32d33f7
Get parent count directly from plugin 2022-04-25 12:26:14 -05:00
Chris Roberts
1155e7be21
Configure plugins and use plugin local functions 2022-04-25 12:26:14 -05:00
Chris Roberts
b2c02428ae
Close plugin manager when closing runner 2022-04-25 12:26:14 -05:00
Chris Roberts
9f320145ff
Add support for custom component configuration 2022-04-25 12:26:14 -05:00
Chris Roberts
20a3f4d85c
Provide core.PluginManager implementation and server setup 2022-04-25 12:26:14 -05:00
Chris Roberts
27d0fee45f
Define plugin interfaces in plugin. Load parent from plugin.
Also applies registered configurations from the plugin
    manager when providing a requested component type.
2022-04-25 12:26:14 -05:00
Chris Roberts
b2dec1191a
Remove interfaces and add extra info to instance 2022-04-25 12:26:14 -05:00
sophia
9ea254735a
Set target uuid opposed to resource id
The uuid is the public identifier vs the resource id which should
be for internal operations.
The target uuid should correspond to the machine id (given by
the provider)
2022-04-25 12:26:13 -05:00
sophia
63a4b76c21
Add tests for setting machine id 2022-04-25 12:26:13 -05:00
sophia
294293097c
Set empty machine id when destroying 2022-04-25 12:26:13 -05:00
Paul Hinze
2460961749
Switch to centralized VagrantCWD implementation
Now depends on https://github.com/hashicorp/vagrant-plugin-sdk/pull/104
2022-04-25 12:26:12 -05:00
Paul Hinze
9bda64f78d
Handle crossplatform path discrepancy in CWD test 2022-04-25 12:26:12 -05:00
Paul Hinze
30774c7345
Fix VAGRANT_CWD handling
VAGRANT_CWD was not being honored in the Go-side Vagrantfile-finding
code. Add that in and also fix a couple of bugs in the path walking
logic.
2022-04-25 12:26:12 -05:00
sophia
ea680d78f7
Seed synced folder plugins with machine 2022-04-25 12:26:12 -05:00
Paul Hinze
c1c215e84e
Round out service tests
* Add tests for service Target and catch a panic
 * Add skipped stub test for Task w/ a note for future us
2022-04-25 12:26:11 -05:00
Paul Hinze
72c72c4f53
Test for server config service
Pretty simple stuff. Also renaming file to match service name
2022-04-25 12:26:11 -05:00
Paul Hinze
e7533103e8
Tests for service project & a small panic guard
Tests helped flush out that we would panic if a project was attempting
to be created without a basis.

Sometimes tests help!
2022-04-25 12:26:11 -05:00
sophia
a86bf277aa
Use guest specified in vagrantfile if available 2022-04-25 12:26:11 -05:00
sophia
eddc9d916e
Return empty result when deleting target 2022-04-25 12:26:11 -05:00
sophia
31e57414b4
Destroy machine + remove data dir when machine id is set to empty value 2022-04-25 12:26:11 -05:00
sophia
ba1dd33fff
Include seeds in ruby communicator 2022-04-25 12:26:09 -05:00
sophia
514b4e3d89
go generate 2022-04-25 12:26:09 -05:00
sophia
d57203f005
Get ruby communincator upload working 2022-04-25 12:26:09 -05:00
sophia
85f7aa1586
Make go communincator plugin work 2022-04-25 12:26:09 -05:00
sophia
b6dfff9679
Implement communicate method for core.Target 2022-04-25 12:26:07 -05:00
sophia
3a43cd35cb
Don't use config if it doesn't exist yet 2022-04-25 12:26:06 -05:00
sophia
04591646a3
Use host from vagrantfile if defined 2022-04-25 12:26:06 -05:00
sophia
1fe695bdf3
Use Vagrantfile info to configure target box 2022-04-25 12:26:06 -05:00
sophia
36dbd73945
Add endpoint for accessing basis/project/target config 2022-04-25 12:26:06 -05:00
sophia
01bc9a8430
Remove unused config from basis 2022-04-25 12:26:06 -05:00
sophia
25b9d829eb
Remove unused config files 2022-04-25 12:26:06 -05:00
sophia
bb43048813
Remove unused cli config code 2022-04-25 12:26:06 -05:00
sophia
309ff6a54e
Remote some config cruft 2022-04-25 12:26:06 -05:00
sophia
0153f75b09
Remove unused core components 2022-04-25 12:26:06 -05:00
Chris Roberts
ac8978eee3
Generated proto updates 2022-04-25 12:26:05 -05:00
Chris Roberts
e4f1e297ab
Update plugin seed function signature 2022-04-25 12:26:05 -05:00
Chris Roberts
6b37b7ba55
Add seed functions and seed before running 2022-04-25 12:26:05 -05:00
Chris Roberts
bd2d399951
Use function to get component type 2022-04-25 12:26:05 -05:00
sophia
f1dc606d11
Get plugins from basis 2022-04-25 12:26:04 -05:00
sophia
8f8b5d2078
Return synced folders plugin along with synced folder info 2022-04-25 12:26:04 -05:00