The goal of the GEODE-7436 change is that when user deploys some-jar-0.1, then 
later deploys some-jar-0.2, we will do the intuitive thing and treat it as an 
update.  In Geode 1.11 and earlier, we instead wound up with *both* deployed, 
which is bad!

In the weird example below of spark-network-common_2.11-2.3.1.jar, it is 
harmless that we stem it as spark-network-common_2 (*if* for some very crazy 
reason a user NEEDS both spark-network-common_2.11-0.0.0.jar and 
spark-network-common_2.12-0.0.0.jar deployed side-by-side, they can simply 
rename the jar to something more sane)

On 10/7/20, 3:45 PM, "Anthony Baker" <bak...@vmware.com> wrote:

    Given the wide variety of filenames possible do we even need a 
classification scheme?  IOW, why not just take what the user gives us and say 
thank you :-).  Is this restriction imposed by our *implementation* choices?

    Anthony


    > On Oct 7, 2020, at 3:24 PM, Jinmei Liao <jil...@vmware.com> wrote:
    > 
    > Wait, that reason doesn't make much sense either. Dale/Darrel, do you 
remember why we did what we did?
    > 
    > On 10/7/20, 3:12 PM, "Jinmei Liao" <jil...@vmware.com> wrote:
    > 
    >    I believe we did this for a reason, can't remember exactly what 
though. Most probably drive by user's existing filenames. I believe we are 
probably concerned that user's jar name might contain "_" or "-" themselves, 
like common-logging.jar etc. So we had to resort to finding the first "." 
followed by a digit to determine where the version pattern begins.
    > 
    >    On 10/7/20, 1:44 PM, "Udo Kohlmeyer" <u...@vmware.com> wrote:
    > 
    >        Hi there Geode Dev List,
    > 
    >        Whilst doing work on 
GEODE-8466<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FGEODE-8466&amp;data=02%7C01%7Conichols%40vmware.com%7Cf9ff378882784286e29c08d86b12ae54%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637377075281339855&amp;sdata=GmmxzISGAfZNWKXf6XAsZon2UtJFCLdvlIE3yf%2F8TNM%3D&amp;reserved=0>
 and looking at the functionality that the 
ClassPathLoader.java<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fgeode%2Fblob%2Fdevelop%2Fgeode-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgeode%2Finternal%2FClassPathLoader.java&amp;data=02%7C01%7Conichols%40vmware.com%7Cf9ff378882784286e29c08d86b12ae54%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637377075281339855&amp;sdata=dMnFurVQYrs%2FKvekte%2B7Dpkkg%2B7Mb5ZkOUE2ZMLn31o%3D&amp;reserved=0>,
 
JarDeployer.java<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fgeode%2Fblob%2Fdevelop%2Fgeode-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgeode%2Finternal%2FJarDeployer.java&amp;data=02%7C01%7Conichols%40vmware.com%7Cf9ff378882784286e29c08d86b12ae54%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637377075281339855&amp;sdata=qtEQ5neQsCHEzla7CQRQmM7ypzaB5iJNrPwvLh%2BzyLI%3D&amp;reserved=0>
 and 
DeployedJar.java<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fgeode%2Fblob%2Fdevelop%2Fgeode-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgeode%2Finternal%2FDeployedJar.java&amp;data=02%7C01%7Conichols%40vmware.com%7Cf9ff378882784286e29c08d86b12ae54%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637377075281339855&amp;sdata=Sh%2F8ofTnfKXzazweevZYKgFCsiMUs0ExGDMwrNcLjjk%3D&amp;reserved=0>
 provide around the “Deploy Jar” functionality, we came across some interesting 
“supported” filename patterns.
    > 
    >        According to the 
JarDeployerFileTest.java<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fgeode%2Fblob%2Fdevelop%2Fgeode-core%2Fsrc%2FintegrationTest%2Fjava%2Forg%2Fapache%2Fgeode%2Finternal%2FJarDeployerFileTest.java&amp;data=02%7C01%7Conichols%40vmware.com%7Cf9ff378882784286e29c08d86b12ae54%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637377075281349851&amp;sdata=ZeJlDKN5Qy8rQfYo7W%2F5YyA6fryEe9%2FmIVD5APmysHQ%3D&amp;reserved=0>
 the “supported” formats are as follows:
    > 
    >        assertThat(JarDeployer.getArtifactId("abc.jar")).isEqualTo("abc");
    >        
assertThat(JarDeployer.getArtifactId("abc-1.jar")).isEqualTo("abc");
    >        
assertThat(JarDeployer.getArtifactId("ab.c.1.jar")).isEqualTo("ab.c");
    >        
assertThat(JarDeployer.getArtifactId("abc.v1.jar")).isEqualTo("abc.v1");
    >        
assertThat(JarDeployer.getArtifactId("abc-1.0.snapshot.jar")).isEqualTo("abc");
    >        
assertThat(JarDeployer.getArtifactId("abc-1.0.v1.jar")).isEqualTo("abc");
    >        
assertThat(JarDeployer.getArtifactId("spark-network-common_2.11-2.3.1.jar"))
    >            .isEqualTo("spark-network-common_2");
    >        Which don’t make any sense. As the generally accepted norm for a 
version jar file would be: “<artifact name>[ - <major> . <minor> . <patch> - 
<Release Tag> ] .jar”. (note the syntax in red)
    > 
    >        I want to suggest that we DISCONTINUE supporting all jar name 
formats other than the one mentioned above IMMEDIATELY. As the supported name 
format is just “funky” but also wrong and can lead to misclassification of the 
artifact name…. as some of you with a keen eye would have spotted already 😉
    > 
    >        For those who did not spot the mistake…  
“spark-network-common_2.11-2.3.1.jar” is incorrectly classified and has the 
WRONG artifact name. As “spark-network-common_2.11” is the correct artifact 
name NOT “spark-network-common_2”!
    > 
    >        I would like to introduce this change with 
GEODE-8466<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FGEODE-8466&amp;data=02%7C01%7Conichols%40vmware.com%7Cf9ff378882784286e29c08d86b12ae54%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637377075281349851&amp;sdata=gV08BIj96o%2Bl8W3o89ekXIa0EJ%2FRrB7WqXZO7TgcDfU%3D&amp;reserved=0>.
 This would be a “breaking” change, but we should change this sooner than 
later. There is no transition ability here, as it would be too hard to have 
Geode support both, as there is no simple way for the system to decide if the 
name conforms to the “correct” format or not.
    > 
    >        DISCUSS!!!
    > 
    >        --Udo
    > 
    > 
    > 


Reply via email to