Skip to content

Conversation

@aledsage
Copy link
Contributor

Ensure we use the ConfigBag that we pass into the methods (rather than location.config().get(...)) because the ConfigBag will contain the union of the location's config along with any overrides/additions that were passed in to methods like obtain() (e.g. via an entity's provisioning.properties).

See individual commits for details.

Much longer term, all this config usage is a bit worrying! For an entity, there is special config lookup so that it correctly handles inherited config etc. For locations, we don't have runtime-management inheritance (which is a relief!) so things are a lot simpler. But the big code differences between Location and Entity are worrying.

aledsage added 5 commits May 30, 2017 16:32
It now combines the config().getBag() with the config passed in.
Use `setup` (which combines location’s config and args passed to
obtain(), such as from entity’s `provisioning.properties`).
…pecial

Just rely on any `sshToolClass` config being passed in the ConfigBag
arg (rather than also looking up jcloudsLocation.config()). The passed
in ConfigBag should be a merger of the location’s config and any
additional config that has been passed in.
@aledsage aledsage force-pushed the fix-JcloudsLocation-config-usage branch from b414712 to 49543d0 Compare May 30, 2017 15:33
Copy link
Member

@drigodwin drigodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me and the tests all pass locally, thanks @aledsage

@asfgit asfgit merged commit 49543d0 into apache:master May 31, 2017
asfgit pushed a commit that referenced this pull request May 31, 2017
@aledsage aledsage deleted the fix-JcloudsLocation-config-usage branch June 5, 2017 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants