5311 Commits

Author SHA1 Message Date
sophia
6dfca17d54 Get machine state from go impl 2022-05-04 09:32:36 -05:00
sophia
b4fbf76a33 Plug machine#uid methods into remote go backend 2022-05-04 09:32:36 -05:00
sophia
adf2340712 Update Ruby clients for proto changes 2022-04-25 14:12:28 -05:00
sophia
cddcfef0a1
Update Box#UpdateInfo to use box metadata client 2022-04-25 12:26:57 -05:00
sophia
35c094f570
Get box update info 2022-04-25 12:26:57 -05:00
Chris Roberts
9ab74271cf
Add some comments and expand some method documentation 2022-04-25 12:26:57 -05:00
Chris Roberts
f220ac2f94
Add name based re-weight helper. Add documentation/comments. 2022-04-25 12:26:56 -05:00
Chris Roberts
f9e55a8f9d
Fill in vertex base methods 2022-04-25 12:26:56 -05:00
Chris Roberts
66c9fd45d6
Map key and value when converting Hash types 2022-04-25 12:26:56 -05:00
Chris Roberts
1bf4c8d090
Provide Graph#each_vertex helper to graph 2022-04-25 12:26:56 -05:00
Chris Roberts
12cb795392
Add name support for inputs 2022-04-25 12:26:56 -05:00
Paul Hinze
eacb798a71
Fix action hooks running twice in destroy_on_error scenarios
The "destroy_on_error" functionality for `vagrant up` is implemented in
the `recover()` action chain, and works by firing off a destroy action
from inside that chain.

This is all well and good, but it copies its existing `env` which has
had `action_name` set for the up action. This was causing action_hooks
for up actions to attach to this destroy action stack.

Setting the action_name explicitly in the env before firing the runner
should correct the behavior. I'm not sure if raw_action_name is used
anywhere but I figured it was better to be consistent vs conservative in
what we change.
2022-04-25 12:26:56 -05:00
Chris Roberts
305fddb49a
Retry cached path executions with full graph 2022-04-25 12:26:55 -05:00
Chris Roberts
f3a3bb83fd
Only register types for blind maps after a blind map 2022-04-25 12:26:55 -05:00
Chris Roberts
e8a4c35cf6
Remove any unpacking of value prior to mapping 2022-04-25 12:26:55 -05:00
Chris Roberts
2baea78820
Properly clone mappers 2022-04-25 12:26:55 -05:00
Chris Roberts
823e589a26
Freeze base mappers list to prevent direct modifications 2022-04-25 12:26:55 -05:00
Chris Roberts
2f9daa8498
Include value in error message when mappers not found 2022-04-25 12:26:55 -05:00
Chris Roberts
61b5d3549f
Don't use blind mapping when generating value 2022-04-25 12:26:54 -05:00
Chris Roberts
3917449552
Provide source information when mapping, register blind maps 2022-04-25 12:26:54 -05:00
Chris Roberts
f6a46634a5
When performing a blind map, if previous mapping found, use it 2022-04-25 12:26:54 -05:00
Chris Roberts
1d555b025f
Use global list of mappers and cache as defaults 2022-04-25 12:26:54 -05:00
Chris Roberts
7404ef89a6
Isolate generate class from instance so we can do class checks 2022-04-25 12:26:54 -05:00
Chris Roberts
8cc6116cdf
Store previous successful lookups for future graph generation 2022-04-25 12:26:54 -05:00
Chris Roberts
aaed7b2d82
Update Method vertex hash code and allow callable access 2022-04-25 12:26:54 -05:00
Chris Roberts
3a6308b7fc
Use blocks for logging content to reduce processing 2022-04-25 12:26:54 -05:00
sophia
7b470d4b25
Ensure box metadata has optional arguments 2022-04-25 12:26:53 -05:00
sophia
03ecb877e6
Update box metadata Name endpoint to boxName 2022-04-25 12:26:53 -05:00
sophia
66524426d0
Update ruby remote box metadata for proto changes 2022-04-25 12:26:53 -05:00
sophia
0556c804fd
Add load metadata client endpoint 2022-04-25 12:26:52 -05:00
sophia
1f5d66fd76
Get box metadata client from box 2022-04-25 12:26:52 -05:00
sophia
428c3b02fd
Use remote box metadata implementation 2022-04-25 12:26:52 -05:00
sophia
3e641fbe6b
Stub machine index proto mapper for environment test 2022-04-25 12:26:51 -05:00
sophia
333fc16096
Map provisioner config to Hash using mappers instead of assuming Struct type 2022-04-25 12:26:51 -05:00
sophia
7dd3649d73
Update Symbol proto mappers 2022-04-25 12:26:51 -05:00
sophia
d5aacc0bc6
Thrash around making to proto for config faster 2022-04-25 12:26:51 -05:00
sophia
f4811af759
Use symbol proto when protoizing plugin configs 2022-04-25 12:26:51 -05:00
sophia
ccf2bf6197
Pass config as a SDK hash in order to use the Symbol proto 2022-04-25 12:26:51 -05:00
sophia
9a61574f52
Add core plugin manager to default mapper list 2022-04-25 12:26:50 -05:00
sophia
b40dde3797
Module for core plugin manager mappers 2022-04-25 12:26:50 -05:00
sophia
afc6d1c27d
Extract core plugin manager from context 2022-04-25 12:26:50 -05:00
sophia
05244e67c1
Add mappers for core plugin manager 2022-04-25 12:26:50 -05:00
sophia
b3003e8cb6
Add core plugin service client 2022-04-25 12:26:50 -05:00
Paul Hinze
1341bfe0af
Tweak Ruby->Go error handling so exit codes match
In legacy Vagrant, any exception raised that's a subclass of
Vagrant::Errors::VagrantError is considered user-facing and so causes
the error message to be printed to the console and the process to use
exit code 1. Anything outside of that causes the process to use exit
code 255. (See `bin/vagrant` for the code.)

Here we mirror that behavior by treating errors that have a
LocalizedMessage as user-facing and those without as unexpected. This
allows the basic virtualbox component to pass in vagrant-spec!
2022-04-25 12:26:49 -05:00
Paul Hinze
09c03893b2
Simplify truncate_to per feedback
No need to spin up a full regexp if it's not necessary!
2022-04-25 12:26:49 -05:00
Paul Hinze
253c6658b3
Truncate error message to address RST_STREAM issues
This is the result of a whole journey of learning about GRPC errors! See
the hefty inline comment which has all the context for future
generations.
2022-04-25 12:26:49 -05:00
Paul Hinze
7f56168959
Work around a few global flag collisions for ssh command
* `vagrant ssh` has a --no-tty flag colliding with the one defined in
   `bin/vagrant` - in fact none of the flags in `bin/vagrant` are
   processed in `serve` mode, so remove the code that captures them from
   the CommandInfo OptionParser dance
 * `vagrant ssh` has a `--plain` flag colliding with the one defined in
   `internal/cli/base.go` - this flag was inherited from Waypoint, so we
   can just rename it to line up with the (inversely defined) `--color`
   flag used in legacy vagrant
2022-04-25 12:26:48 -05:00
Paul Hinze
8f9952089a
Fix commands that run without a project
Some commands like `vagrant init` and `vagrant box` should be able to
run successfully without a full Project available in VAGRANT_CWD (in
other words, they don't require that a valid Vagrantfile be available.)

Thus far we've been assuming that a Project is available when
dispatching commands, which mean that commands of this nature weren't
working.

Here we make the Basis available to serve as an alternative client to
Vagrant::Environment::Remote such that it can be instantiated and passed
through to commands. This required some changes to Environment::Remote
to make its interactions with the client more defensive, but we manage
to avoid needing to make any changes to the normal legacy codepaths.
2022-04-25 12:26:47 -05:00
sophia
128599ab68
Get local box metadata in remote box 2022-04-25 12:26:47 -05:00
sophia
b6d42d0695
Clean up machine client 2022-04-25 12:26:46 -05:00