Moving to V1 of the API, updating all deps #26

Merged
merged 1 commit into from Jul 29, 2016

Conversation

Projects
None yet
4 participants
Member

iliat commented Jul 25, 2016

  • Updating all the deps for Maven to reference latest versions of the API and other dependencies
  • Changing all urls to reference V1 API url
  • Adding support for default app credentials for auth.
  • Changing code to deal with API changes that return empty string instead of null for some REST APIs
  • Adding new ALPN jar required for a newer version of Java
  • Changing run_picard to use grpc

deflaux was assigned by iliat Jul 25, 2016

Coverage Status

Changes Unknown when pulling 5187415 on iliat:upgrade-api into * on googlegenomics:master*.

pgrosu commented Jul 25, 2016

Welcome back Ilia :) Looks great!

Two small things, you might want to update the Readme.md, and the Picard Readme to use v1 in these examples:

$ java -jar dist/picard.jar ViewSam \
INPUT=https://www.googleapis.com/genomics/v1beta2/readgroupsets/CK256frpGBD44IWHwLP22R4/ \
GA4GH_CLIENT_SECRETS=../client_secrets.json

and

java \
-Xbootclasspath/p:../gatk-tools-java/lib/alpn-boot-8.1.3.v20150130.jar \
-Dga4gh.using_grpc=true \
-jar dist/picard.jar ViewSam \
INPUT=https://www.googleapis.com/genomics/v1beta2/readgroupsets/CK256frpGBD44IWHwLP22R4/ \
GA4GH_CLIENT_SECRETS=../client_secrets.json

Thanks,
~p

@deflaux deflaux commented on the diff Jul 26, 2016

@@ -357,8 +407,9 @@
<jetty.version>6.1.26</jetty.version>
<jackson.version>2.4.2</jackson.version>
<junit.version>4.11</junit.version>
- <google.api.version>1.19.0</google.api.version>
- <google.api.genomics.version>v1beta2-rev7-1.19.0</google.api.genomics.version>
+ <google.api.version>1.22.0</google.api.version>
+ <google.api.genomics.version>v1-rev87-1.22.0</google.api.genomics.version>
@deflaux

deflaux Jul 26, 2016

Owner

Yay! Thanks @iliat

@pgrosu

pgrosu Jul 27, 2016

s/v1-rev87-1.22.0/v1-rev93-1.22.0

Just tested it and it looks to be working with the version released today.

@deflaux deflaux and 1 other commented on an outdated diff Jul 26, 2016

...oud/genomics/gatk/common/rest/GenomicsDataSource.java
readGroupSet.getReferenceSetId());
referenceSetIds.add(readGroupSet.getReferenceSetId());
}
if (readGroupSet.getReadGroups() != null) {
LOG.info("Found read groups");
for (ReadGroup readGroup : readGroupSet.getReadGroups()) {
- if (readGroup.getReferenceSetId() != null) {
+ if (readGroup.getReferenceSetId() != null && readGroup.getReferenceSetId().length() > 0) {
@deflaux

deflaux Jul 26, 2016

Owner

Here and elsewhere !Strings.isNullOrEmpty(readGroup.getReferenceSetId())

@iliat

iliat Jul 28, 2016

Member

Much better, will do!

@deflaux deflaux and 1 other commented on an outdated diff Jul 26, 2016

...oud/genomics/gatk/common/grpc/GenomicsDataSource.java
}
-
- channelImpl = NettyChannelBuilder.forAddress("genomics.googleapis.com", 443)
- .negotiationType(NegotiationType.TLS)
- .streamWindowSize(1000000)
- .sslContext(GrpcSslContexts.forClient().ciphers(performantCiphers).build())
- .build();
- /*userCredentials = userCredentials.createScoped(
- Arrays.asList("https://www.googleapis.com/auth/genomics"));*/
- ClientAuthInterceptor interceptor = new ClientAuthInterceptor(userCredentials,
- Executors.newSingleThreadExecutor());
- return ClientInterceptors.intercept(channelImpl, interceptor);
+ if (apiKey != null && apiKey.length() > 0) {
@deflaux

deflaux Jul 26, 2016

Owner

This can be removed. StreamReads and StreamVariants require authentication. Therefore an API key is not sufficient.

@iliat

iliat Jul 28, 2016

Member

Ok, will remove API key support.

@deflaux deflaux and 2 others commented on an outdated diff Jul 26, 2016

@@ -275,6 +300,31 @@
<version>2.2.0</version>
</plugin>
<plugin>
+ <groupId>org.xolstice.maven.plugins</groupId>
@deflaux

deflaux Jul 26, 2016

Owner

Why is the protoc plugin needed here? The utils-java release contains the classes.

jar -tvf ~/.m2/repository/com/google/cloud/genomics/google-genomics-utils/v1-0.6/google-genomics-utils-v1-0.6.jar | grep StreamVariant
 15847 Fri Jul 15 12:00:42 PDT 2016 com/google/genomics/v1/StreamVariantsRequest.class
 15880 Fri Jul 15 12:00:42 PDT 2016 com/google/genomics/v1/StreamVariantsResponse$Builder.class
  1546 Fri Jul 15 12:00:42 PDT 2016 com/google/genomics/v1/StreamVariantsRequest$1.class
 15861 Fri Jul 15 12:00:42 PDT 2016 com/google/genomics/v1/StreamVariantsRequest$Builder.class
 12018 Fri Jul 15 12:00:42 PDT 2016 com/google/genomics/v1/StreamVariantsResponse.class
   611 Fri Jul 15 12:00:42 PDT 2016 com/google/genomics/v1/StreamVariantsResponseOrBuilder.class
   700 Fri Jul 15 12:00:40 PDT 2016 com/google/genomics/v1/StreamVariantsRequestOrBuilder.class
  1553 Fri Jul 15 12:00:42 PDT 2016 com/google/genomics/v1/StreamVariantsResponse$1.class
@pgrosu

pgrosu Jul 27, 2016

With or without the plugin in pom.xml, the Jar file has the same exact size:

Without the plugin:

-rw-rw-r-- 1 pgrosu pgrosu 24397578 Jul 27 16:09 gatk-tools-java-v1-0.6-SNAPSHOT-jar-with-dependencies.jar

With the plugin:

-rw-rw-r-- 1 pgrosu pgrosu 24397578 Jul 27 16:38 gatk-tools-java-v1-0.6-SNAPSHOT-jar-with-dependencies.jar
@iliat

iliat Jul 28, 2016

Member

Not needed - I got it in when I was fixing other build issues since I was not sure if I was missing some deps and plugins but you are right - its will work without it.

@iliat iliat Moving to V1 of the API, updating all deps
33ad437

Coverage Status

Changes Unknown when pulling 33ad437 on iliat:upgrade-api into * on googlegenomics:master*.

Member

iliat commented Jul 28, 2016

@deflaux Addressed the comments. I'll clean up non def. cred. auth and update readme in the next PR.

pgrosu commented Jul 29, 2016

Cool thanks - look forward to the next PR :)

Owner

deflaux commented Jul 29, 2016

LGTM, thank you!

@iliat iliat merged commit 5521664 into googlegenomics:master Jul 29, 2016

3 checks passed

cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on master at 0.0%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment