brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Fix VanillaSoftwareProcess instal...
Date Wed, 07 Oct 2015 23:27:21 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/931#discussion_r41460984
  
    --- Diff: software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessSshDriver.java
---
    @@ -44,13 +47,20 @@ public VanillaSoftwareProcessSshDriver(EntityLocal entity, SshMachineLocation
ma
     
         String downloadedFilename = null;
     
    -    /** needed because the download url might be different! */
    +    /**
    +     * Needed because the download url and install commands are likely different for
different VanillaSoftwareProcesses!
    +     * This is particularly true for YAML entities. We take a hash of the download_url,
instal_command and environment variables.
    +     * We thus assume any templating of the script has already been done by this point.
    +     */
         @Override
         protected String getInstallLabelExtraSalt() {
    +        
             Maybe<Object> url = getEntity().getConfigRaw(SoftwareProcess.DOWNLOAD_URL,
true);
    -        if (url.isAbsent()) return null;
    +        String installCommand = getEntity().getConfig(VanillaSoftwareProcess.INSTALL_COMMAND);
    +        Map<String, Object> shellEnv = getEntity().getConfig(VanillaSoftwareProcess.SHELL_ENVIRONMENT);
    +        
             // TODO a user-friendly hash would be nice, but tricky since we don't want it
to be too long or contain path chars
    --- End diff --
    
    The hash is just a 4 (?) character hash generated from these fields, so does not look
user-friendly when someone lists the contents of the `apps` directory. I'll leave this comment
in for now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message