bndl: Treat empty list args as None#506
Merged
huntc merged 1 commit intotypesafehub:masterfrom Jun 23, 2017
Merged
Conversation
Empty `bndl` list arguments such as annotations, tags and roles need to be treated as None in `bndl_utils.load_bundle_args_into_conf`. This was the case for annotations and tags, but not for roles. The PR is changes the roles logic so that empty lists are treated as None. Fixes the sbt-conductr build issues on Travis: https://travis-ci.org/typesafehub/sbt-conductr/builds/246078520#L1980-L2019 In other words, without fixing this bug, the roles of each loaded bundle during `conduct load` is overridden to an empty roles list in case no additional bundle configuration has been provided. This is because without this fix the `bndl_utils.load_bundle_args_into_conf` function always created a bundle configuration overlay with empty roles, considering that the defaults roles argument of `bndl` is `[]`, which got invoked during a `conduct load` and therefore overriding the roles of bundle itself. The original bug got introduced by PR typesafehub#503. Unit tests have been added to check that bndl arguments with an empty list are not added to the bundle configuration file.
huntc
approved these changes
Jun 23, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Empty
bndllist arguments such as annotations, tags and roles need to be treated as None inbndl_utils.load_bundle_args_into_conf. This was the case for annotations and tags, but not for roles.The PR is changes the roles logic so that empty lists are treated as None.
Fixes the sbt-conductr build issues on Travis: https://travis-ci.org/typesafehub/sbt-conductr/builds/246078520#L1980-L2019
In other words, without fixing this bug, the roles of each loaded bundle during
conduct loadis overridden to an empty roles list in case no additional bundle configuration has been provided. This is because without this fix thebndl_utils.load_bundle_args_into_conffunction always created a bundle configuration overlay with empty roles, considering that the defaults roles argument ofbndlis[], which got invoked during aconduct loadand therefore overriding the roles of bundle itself.The original bug got introduced by PR #503.
Unit tests have been added to check that bndl arguments with an empty list are not added to the bundle configuration file.