Commit Graph

26 Commits

Author SHA1 Message Date
Sander van Harmelen
a79c987538 Reverting a few lines from PR #2406
As discussed with @mitchellh and @phinze we don’t need to randomize in
order to get infinite ID’s. When we hit the highest possible number and
add `1` it will just wrap back to `0`, which is just fine with regards
to how Terraform works and uses these ID’s.

Tested this by setting the initial value of `m.nextId` to `4294967293`
where the maximum is `4294967295 `. So with some additional logging it
clearly showed it wrapped and continued without any issues.
2015-06-25 16:28:04 +02:00
Sander van Harmelen
0b1dbf31a3 core: close provider/provisioner connections
Currently Terraform is leaking goroutines and with that memory. I know
strictly speaking this maybe isn’t a real concern for Terraform as it’s
mostly used as a short running command line executable.

But there are a few of us out there that are using Terraform in some
long running processes and then this starts to become a problem.

Next to that it’s of course good programming practise to clean up
resources when they're not needed anymore. So even for the standard
command line use case, this seems an improvement in resource management.

Personally I see no downsides as the primary connection to the plugin
is kept alive (the plugin is not killed) and only unused connections
that will never be used again are closed to free up any related
goroutines and memory.
2015-06-19 21:52:50 +02:00
Mitchell Hashimoto
02d01141ca rpc: implement provisioner update 2014-10-04 09:54:03 -07:00
Mitchell Hashimoto
509f293bea rpc: UIOutput 2014-10-04 09:11:51 -07:00
Mitchell Hashimoto
caf8e372f2 rpc: Speak new API with UIInput 2014-09-29 00:23:17 -07:00
Mitchell Hashimoto
3941dbac5d fmt 2014-09-28 11:51:49 -07:00
Mitchell Hashimoto
04858e1a15 plugin: Client/Server uses new RPC client/server 2014-09-28 11:19:24 -07:00
Mitchell Hashimoto
bc6db2bd1b rpc: ResourceProvisioner support on client/server 2014-09-28 10:55:12 -07:00
Mitchell Hashimoto
0281c1108e rpc: Create the Client/Server 2014-09-28 10:49:27 -07:00
Mitchell Hashimoto
9b2b3a963f ResourceDiff => InstanceDiff 2014-09-17 16:33:24 -07:00
Mitchell Hashimoto
585067c8f5 rpc: conform to new API 2014-09-16 16:48:33 -07:00
Mitchell Hashimoto
53ebc5cb51 rpc: fix interface impl 2014-07-22 10:36:37 -07:00
Armon Dadgar
a79e222ae3 rpc: Cleanup imports 2014-07-10 11:38:57 -07:00
Armon Dadgar
c952513aed rpc: Adding support for provisioners 2014-07-10 11:38:56 -07:00
Mitchell Hashimoto
9183068489 rpc: tests and impl of latest API 2014-07-03 11:51:38 -07:00
Mitchell Hashimoto
5dbb9c821a rpc: add Refresh method 2014-06-20 11:51:07 -07:00
Mitchell Hashimoto
8c1a69aa0a rpc: implement Apply 2014-06-18 16:49:34 -07:00
Mitchell Hashimoto
7980aa96a8 rpc: use a transport that supports nil pointers 2014-06-12 23:22:28 -07:00
Mitchell Hashimoto
cc491e61bc rpc: conform to new Validate method 2014-06-12 22:37:46 -07:00
Mitchell Hashimoto
f15746f692 rpc: conform to new types 2014-06-12 18:06:26 -07:00
Mitchell Hashimoto
02a3603a9a rpc: Diff implementation 2014-06-06 00:48:32 -07:00
Mitchell Hashimoto
0c1a341d90 terraform: Resources method for providers 2014-06-03 14:26:31 -07:00
Mitchell Hashimoto
0cda9a7539 some comments, package comments 2014-05-28 21:27:10 -07:00
Mitchell Hashimoto
91317a8608 rpc: Test errors, basic error 2014-05-28 15:31:09 -07:00
Mitchell Hashimoto
5ef20cf3a2 rpc: Make a Register function to make working with easier 2014-05-28 15:18:14 -07:00
Mitchell Hashimoto
f8dc3286d9 rpc: ResourceProvider over RPC 2014-05-28 15:07:47 -07:00