Skip to content
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

BROOKLYN-248: fix location displayName inheritance #104

Merged
merged 1 commit into from
Apr 6, 2016

Conversation

aledsage
Copy link
Contributor

@aledsage aledsage commented Apr 6, 2016

No description provided.

@aledsage
Copy link
Contributor Author

aledsage commented Apr 6, 2016

DO NOT MERGE: although this fixes it for the location test case, it breaks the expected behaviour for locations (see failing jenkins test).

@aledsage
Copy link
Contributor Author

aledsage commented Apr 6, 2016

STILL DO NOT MERGE. I've added more test cases, and reverted the change to CampResolver, because that broke things for entities. But the new tests for a app catalog type extending an existing catalog type fail (and same for locations): it uses the name from the super-type.

@aledsage
Copy link
Contributor Author

aledsage commented Apr 6, 2016

Good to review and merge now (assuming jenkins doesn't find any problems).

@johnmccabe
Copy link
Contributor

I pulled and built a few minutes ago and tried with this catalog:

brooklyn.catalog:
  version: 0.1.2
  items:
  - id: loc-common-base
    name: Base Location
    itemType: location
    item:
      type: localhost
      brooklyn.config:
        privateKeyFile: some common private key file
        privateKeyPassphrase: password
  - id: loc-based-on-common-base
    name: Derived Location
    itemType: location
    item:
      type: loc-common-base
      brooklyn.config:
        user: user-who-inherits-private-key-values
        password: password

And I still see both locations loc-common-base and loc-common-base display with the name Base Location

I also tried adding displayName: XXXX Location to each in brooklyn.config but see the same behaviour.

On a slight tangent, building up locations from other locations lends itself to adding base locations that aren't useable by themselves, for example a base that only sets common private keys - currently those building-block locs show up in the list of locations via the jsgui - it'd be nice to have some way of flagging whether a location gets presented to a user in the UI - either a param or naming convention. Worth considering as a future enhancement?

@neykov
Copy link
Member

neykov commented Apr 6, 2016

LGTM, merging.

@neykov
Copy link
Member

neykov commented Apr 6, 2016

oops, just saw @johnmccabe's comment. Can you retest as this was updated minutes ago as well. Tests suggest your case should be working.

@aledsage
Copy link
Contributor Author

aledsage commented Apr 6, 2016

@johnmccabe your example works for me when I build and run brooklyn locally. I don't have any files not committed or anything like that.

@johnmccabe
Copy link
Contributor

@aledsage I've deleted my PR branch and am rebuilding again (I'd rebuilt earlier to sanity check my observations... third time lucky)

@johnmccabe
Copy link
Contributor

@aledsage looks like something messed up my side... it works as expected now.

Previously I was deleting then pulling the pr into a branch on brooklyn-server, doing a mvn clean install both there and brooklyn-dist.

This time I deleting the pr branch and pulled it again, and instead built from the uber brooklyn project.

Sorry for the false alarm.

@johnmccabe
Copy link
Contributor

LGTM 👍

@neykov
Copy link
Member

neykov commented Apr 6, 2016

thanks @johnmccabe, merging.

@asfgit asfgit merged commit 4e2114d into apache:master Apr 6, 2016
asfgit pushed a commit that referenced this pull request Apr 6, 2016
BROOKLYN-248: fix location displayName inheritance
@aledsage aledsage deleted the fix/BROOKLYN-248 branch May 31, 2016 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants