49 Commits

Author SHA1 Message Date
Paul Hinze
06ad1b4565
Fixup tests for Ruby 3.0
This is a pass through test failures and deprecation warnings:

 * Make all ambiguous `.with(..., key: val)` use explicit hashes to
   prevent test failures for argument mismatch in Ruby 3.0
 * Scope down all unbounded `raise_error` to address warnings (remove
   one test that was revealed to be referencing a nonexistent variable
   once the raise_error was scoped.)
 * Update all `any_instance` usage to new syntax to address warnings
 * Allow the service cache to be cleared and do so between some tests
 * Fix a small bug in with_plugin's plugin not found code path (revealed
   by a scoped and_raise)
2022-04-25 12:26:40 -05:00
Chris Roberts
74ff5da434
Trace item registration in the cache 2022-04-25 12:26:39 -05:00
Chris Roberts
6dd5a3ae9b
Load plugins within #with_plugin helper 2022-04-25 12:26:39 -05:00
Chris Roberts
b0b5d1191e
Update and document cacher 2022-04-25 12:26:38 -05:00
Chris Roberts
f88254eb23
Let #with_plugin load plugins by type 2022-04-25 12:26:38 -05:00
Chris Roberts
3e7f72b9b0
Extract direct arguments to use for spec 2022-04-25 12:26:37 -05:00
Chris Roberts
987998aa41
Grab cacher from local instance 2022-04-25 12:26:37 -05:00
Chris Roberts
b976be72bd
Simplify cacher 2022-04-25 12:26:37 -05:00
Chris Roberts
d82702064f
Only deactivate remote plugin manager if activated 2022-04-25 12:26:37 -05:00
Chris Roberts
83ca40e239
Refactor Ruby service implementations
Update the Ruby service implementations to use the funcspec util
    module for generating spec content. A helper method is now used
    for generating a parent class for services to subclass which
    automatically includes all required modules for usage.
2022-04-25 12:26:37 -05:00
Paul Hinze
ff86d86ac8
Provisioner Plugins 2022-04-25 12:26:37 -05:00
Chris Roberts
095a0f8847
WIP checkpoint with callable remote provider action 2022-04-25 12:26:35 -05:00
Chris Roberts
d2f795e11b
Provide client to manager enable helper method 2022-04-25 12:26:35 -05:00
sophia
6c28de9ea9
Refactor named plugin service/client endpoints 2022-04-25 12:26:33 -05:00
Chris Roberts
cd99ff6525
Add logging to funcspec helper and build named types correctly 2022-04-25 12:26:30 -05:00
Chris Roberts
14895eded1
Grab value from cache when mapping 2022-04-25 12:26:29 -05:00
Chris Roberts
58dd2e491f
Update cacher implementation 2022-04-25 12:26:28 -05:00
Chris Roberts
e29011d0b3
Add FuncSpec module
This module provides helper methods for handling FuncSpecs
    and generating FuncSpec::Args protos. At this stage it is
    intended for use in client implementations
2022-04-25 12:26:28 -05:00
sophia
891eb27e9a
Rename plugin "target" to "addr" 2022-04-25 12:26:27 -05:00
sophia
93ec8c1571
Refactor with_plugins util 2022-04-25 12:26:24 -05:00
sophia
f3a1a9caa6
Add dependency on common protos for error details 2022-04-25 12:26:24 -05:00
sophia
75e6081e6d
Fill in provider ruby service 2022-04-25 12:26:23 -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
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
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
dc03dd9cad
Wrap remote manager setup/teardown within usage tracker 2022-04-25 12:26:19 -05:00
Chris Roberts
1849e941f3
Add helper class for usage tracking 2022-04-25 12:26:18 -05:00
Chris Roberts
53d15203f9
Remove any mapper setup in the initializer 2022-04-25 12:26:17 -05:00
Chris Roberts
19d695cc78
Attempt to decode via JSON before failing 2022-04-25 12:26:15 -05:00
Chris Roberts
105c877551
Add a seed_protos helper method and remove debug logging 2022-04-25 12:26:15 -05:00
Chris Roberts
0989edb794
Update with_info to require broker and load plugin manager when available 2022-04-25 12:26:15 -05:00
Chris Roberts
262a4fa099
Add HasSeeds util module for client/service 2022-04-25 12:26:05 -05:00
Chris Roberts
675bea93cc
Persist cache for thread 2022-04-25 12:26:01 -05:00
Chris Roberts
63e253b506
Update cacher to use monitor mixin 2022-04-25 12:25:59 -05:00
Chris Roberts
22e34e87e9
Include a #to_proto method for all clients 2022-04-25 12:25:57 -05:00
Chris Roberts
8cd6b5a05b
Initialize logger in method and remove initialize override 2022-04-25 12:24:46 -05:00
Chris Roberts
d25f61e3ef
Force name to string type before downcasing 2022-04-25 12:24:45 -05:00
Chris Roberts
2a4eba8435
Be more prescriptive on super usage to make Ruby 2.6 happy 2022-04-25 12:24:43 -05:00
Chris Roberts
71ce491197
Allow name lookup overrides for proto integration 2022-04-25 12:24:42 -05:00
Chris Roberts
4420feb9cf
Disable cacher usage until mapper is updated 2022-04-25 12:24:42 -05:00
Chris Roberts
84d2dc1c60
Always extend connector when prepending the client setup module 2022-04-25 12:24:42 -05:00
Chris Roberts
0401f9cad4
Check super method to be called and force no arguments if none expected
This fixes an issue with Ruby 2.6 where `super` usage when no
    arguments are passed results in an argument error
2022-04-25 12:24:42 -05:00
Chris Roberts
e89d344770
Extract utility modules into isolated files and add more utils 2022-04-25 12:24:41 -05:00