Skip to content

Align role arg format#503

Merged
markusjura merged 1 commit intotypesafehub:masterfrom
markusjura:role-arg
Jun 22, 2017
Merged

Align role arg format#503
markusjura merged 1 commit intotypesafehub:masterfrom
markusjura:role-arg

Conversation

@markusjura
Copy link
Copy Markdown
Contributor

Currently, the bndl --roles argument had a different format as the annotation or tag argument:

bndl --roles backend web --tag tag-1 --tag tag-2

This PR is changing the role argument format to:

bndl --role web --role backend

Currently, the `bndl --roles` argument had a different format as the annotation or tag argument:

```
bndl --roles backend web --tag tag-1 --tag tag-2
```

This PR is changing the role argument format to:

```
bndl --role web --role backend
```
@markusjura markusjura merged commit 4da667f into typesafehub:master Jun 22, 2017
@markusjura markusjura deleted the role-arg branch June 22, 2017 19:41
markusjura added a commit to markusjura/conductr-cli that referenced this pull request Jun 23, 2017
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.
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.

2 participants