-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added flatten interpolation function #15278
added flatten interpolation function #15278
Conversation
this should help in a few cases. let me know if there are any questions |
Updated the vendored consul which no longer requires the channel adapter to convert a `chan stuct{}` to a `<-chan struct{}`. Call testutil.NewTestServerConfigT with the new signature.
The default value for the -state flag was overriding the location of any remote state.
In order to use a backend for the state commands, we need an initialized meta. Use a single Meta instance rather than temporary ones to make sure the backends are initialized properly.
These already include detailed messages, and it's not a usage issue, it's a config or file location issue.
The field reader code path is extremely inefficient, but refactoring it all is much to invasive a change at the moment. Have DiffFieldReader internally cache results for ReadField.
Used to expand test coverage
This package is used for testing, so there needs to be an easy method for reinitializing the stored data between tests.
When remote backend imeplemtations create a new named state, they may need to acquire a lock and/or save an actual empty state to the backend. Copy this behavior in the inmem backend for testing.
Some remote backend would fail on `-state push -force`, or `workspace new -state` because of a new strict lineage check in remote.State.
Want to make sure we don't hit this again.
We can't check lineage in the remote state instance, because we may need to overwrite a state with a new lineage. Whil it's tempting to add an optional interface for this, like OverwriteState(), optional interfaces are never _really_ optional, and will have to be implemented by any wrapper types as well. Another solution may be to add a State.Supersedes field to indicate that we intend to replace an existing state, but that may not be worth the extra check either.
The existing test assumed local state files.
Adds `GetOkRaw` as a schema function. This should only be used to verify boolean attributes are either set or not set, regardless of their zero value for their type. There are a few small use cases outside of the boolean type where this will be helpful as well. Overall, this shouldn't detract from the zero-value checks that `GetOK()` currently has, and should only be used when absolutely needed. However, there are enough use-cases for this addition without checking for the zero-value of the type, that this is needed. Primary use case is for a boolean attribute that is `Optional` and `Computed`, without a default value. There's currently no way to verify that the boolean attribute was explicitly set to the zero-value literal with the current `GetOk()` function. This new function allows for that check, keeping the `Computed` check for the returned `exists` boolean. ``` $ make test TEST=./helper/schema TESTARGS="-run=TestResourceDataGetOkRaw" ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/08/02 11:17:32 Generated command/internal_plugin_list.go go test -i ./helper/schema || exit 1 echo ./helper/schema | \ xargs -t -n4 go test -run=TestResourceDataGetOkRaw -timeout=60s -parallel=4 go test -run=TestResourceDataGetOkRaw -timeout=60s -parallel=4 ./helper/schema ok github.com/hashicorp/terraform/helper/schema 0.005s ```
Any update on this PR? |
update dockerfile to not include version prerelease string
These links were casualties of the core/provider split. There was also an example that suggested cloning a subdirectory of a git repo.
Docs: Fix broken links and a broken example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mootpt! Thanks for working on this and sorry for the delay here. We've been focused on addressing some minor bugs from the 0.10.0 release but are getting past that now.
This seems like a fine idea to me! We're keeping the 0.10.1 release focused on bugfixes from 0.10.0 but I'll come back and merge it for a subsequent release.
The go-plugin package now uses hclog. The default Logger has a level set to Info, but all plugin output is relayed via Debug. Create a new named logger for plugins with the level set to Trace so that all output comes through.
specify a logger for go-plugin
Equality of schema.Sets gets tricky when dealing with nested sets - Set.Equal only superficially compares the underlying maps and hence any sets nested under the root sets cause issues. This adds a simple method, HashEqual, that does a top-level hash comparison, helping to work around this without any complex re-invention of things like reflect.DeepEqual. Of course, in order to make effective use of this function, the user needs to make sure they are properly hashing their nested sets, however this is trivial with things like HashResource.
Just to make sure equality on outer and inner values does not affect anything.
tools/terraform-bundle: Add missing Ui to ProviderInstaller (fix crash)
update go-plugin
helper/schema: Add Set.HashEqual
Input can be called concurrently from multiple nodes in the graph.
fix race in MockResourceProvider
This function turns a list of lists or any arbitrary number of nested lists into a flat list of primitive values.
Hi again @mootpt! Hopefully we're done with 0.10.0 bugfix releases for the time being, so we're resuming normal feature merging. Sorry for the delay here, and thanks again for working on this! |
Thanks @apparentlymart! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
added ability to flatten things like list of lists