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
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
625806f448
Don't delete machine datadir when SetId("") is called
...
Legacy's `Machine#id=()` has an important side effect when a nil ID is
specified - it clears the contents of the machine's DataDir.
We mirrored this behavior over to gogo, with a subtle difference - we
deleted the whole DataDir vs just its children.
It turns out the Docker provider relies on the DataDir being
cleared-but-not-removed by doing a SetId dance in its InitState action.
(see 1e6259dd00d702f83048c75c5c229ce6494c4c6e).
So here we need to mirror that behavior in order for the Docker provider
to work properly.
2022-05-25 13:41:48 -05:00
sophia
b0b3dc2a47
Remove unused target fields
2022-05-04 11:25:56 -05:00
sophia
6d1359b1f0
Get Provider from target
2022-05-04 11:22:41 -05:00
sophia
6dfca17d54
Get machine state from go impl
2022-05-04 09:32:36 -05:00
Chris Roberts
bd849581f6
Cache the machine instance of the target
2022-04-27 15:56:49 -07:00
Chris Roberts
4e6c24b631
Include target name in debug output
2022-04-27 15:56:27 -07:00
Chris Roberts
a80effe196
Do not set target into cache from options
2022-04-27 15:56:04 -07:00
Chris Roberts
7e68e25994
Seed target and machine into plugins directly
2022-04-25 12:26:58 -05:00
sophia
cfe4e71a42
Seed target ui
2022-04-25 12:26:54 -05:00
sophia
6e420689cb
Update Target State for updated states
2022-04-25 12:26:48 -05:00
Paul Hinze
61fbd0f622
Move Basis, Project, and Target seeding earlier
...
Having these objects populate their seeds during `Run` was too late for
those values to show up in command plugins, which would be seeded with
empty args instead.
h/t @chrisroberts for the debugging help and fix suggestion!
2022-04-25 12:26:47 -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
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
36dbd73945
Add endpoint for accessing basis/project/target config
2022-04-25 12:26:06 -05:00
sophia
0153f75b09
Remove unused core components
2022-04-25 12:26:06 -05:00
Chris Roberts
6b37b7ba55
Add seed functions and seed before running
2022-04-25 12:26:05 -05:00
sophia
d49944a25d
Only init targets when running a job scoped at the project or target
2022-04-25 12:26:01 -05:00
Chris Roberts
7595f1533f
Enable plugin mappers
2022-04-25 12:25:50 -05:00
sophia
b30bbcb13a
Don't check for 'found' in basis/project/target query results
2022-04-25 12:24:39 -05:00
Chris Roberts
f1a262c01f
Return stubbed value for provider name
2022-04-25 12:24:33 -05:00
Chris Roberts
71d5195fb3
Get provider name from target client
2022-04-25 12:24:33 -05:00
Chris Roberts
3f6aef88a2
Fix target loading from target index
2022-04-25 12:24:32 -05:00
Chris Roberts
87ecd2b017
Add destroy function for target, update save behavior
2022-04-25 12:24:31 -05:00
Chris Roberts
4f698c9ab2
Set resource ID into target proto for search
2022-04-25 12:24:30 -05:00
Chris Roberts
99e01aa9f9
Set target data after save
2022-04-25 12:24:29 -05:00
sophia
6cde007530
Get Vagrantfile path from project
2022-04-25 12:24:28 -05:00
sophia
0778e615e9
Remote NewTarget method
2022-04-25 12:24:28 -05:00
sophia
47a0a2d7d2
Record machine client in machine index entry
2022-04-25 12:24:27 -05:00
sophia
3bda8b24ef
Save point: Get a target successfully from target index
2022-04-25 12:24:26 -05:00
sophia
b22c128671
Get a target from target index
2022-04-25 12:24:26 -05:00
sophia
293af5de29
Fill in target index implementation
2022-04-25 12:24:26 -05:00
Chris Roberts
e10cd26407
Use plugin manager for plugins. Remove component specialization.
2022-04-25 12:24:22 -05:00
sophia
21a9827d53
Specialize a target given a type, and return an interface
2022-04-25 12:24:13 -05:00
sophia
b9076579bd
Fixes from rebase
2022-04-25 12:24:13 -05:00
sophia
70a9f2b0d5
Specify machine when specializing a target
2022-04-25 12:24:13 -05:00
sophia
0aa15c0759
Rename IndexUUID to GetUUID for consistency
2022-04-25 12:24:13 -05:00
sophia
cfcaeafec2
Flush out some of the machine component
2022-04-25 12:24:13 -05:00
Chris Roberts
29c3cf439b
Support passing exit code back to origin
2022-04-25 12:24:11 -05:00
Chris Roberts
716bcc694a
Update core to use shared dynamic functions
2022-04-25 12:24:10 -05:00
Chris Roberts
05d5634c83
Host component related work
2022-04-25 12:24:10 -05:00
sophia
c621b5f561
Get HasCapability working
2022-04-25 12:24:10 -05:00
sophia
a5b0642577
Make host cap function call work with arguments
2022-04-25 12:24:10 -05:00
sophia
10673990c7
Make capability work (without args)
2022-04-25 12:24:10 -05:00
sophia
e4c0f09925
HasCapability working
2022-04-25 12:24:10 -05:00