-
Notifications
You must be signed in to change notification settings - Fork 31
Use Dataflow's oauth flow. #104
Conversation
@jean-philippe-martin the build of utils-java is in maven central now and travis-ci is happy |
Excellent! On Tue, Jun 30, 2015 at 3:51 PM, Nicole Deflaux notifications@github.com
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the current usage is that new apps will use or extend GenomicsOptions. But that would mean they all get the same app name, doesn't it?
It seems more reasonable to have the app write its own name somewhere. Either in the options as today, or we could just make it an argument go getGenomicsAuth if you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, but in addition the change was not needed anyway since Dataflow's storage directory for the StoredCredential is the same for all pipelines unless the user changes it via --credentialDir
. (Before when we were doing our own oauth flow, it was triggered for each different pipeline since appname was used in the directory path for the stored credential.)
I reverted that change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, happy end then!
On Wed, Jul 1, 2015 at 1:36 PM, Nicole Deflaux notifications@github.com
wrote:
In
src/main/java/com/google/cloud/genomics/dataflow/utils/GenomicsOptions.java
#104 (comment)
:@@ -33,28 +29,30 @@
- annotated with a @JsonIgnore annotation.
*/
public interface GenomicsOptions extends DataflowPipelineOptions {
+
- // Use the same appName for all pipelines in this collection so that the oauth flow only needs to happen once.
- public static final String APP_NAME = "dataflow-java";
You are right, but in addition the change was not needed anyway since
Dataflow's storage directory for the StoredCredential is the same for all
pipelines unless the user changes it via --credentialDir. (Before when we
were doing our own oauth flow, it was triggered for each different pipeline
since appname was used in the directory path for the stored credential.)I reverted that change.
—
Reply to this email directly or view it on GitHub
https://github.com/googlegenomics/dataflow-java/pull/104/files#r33721295
.
The change was not needed since Dataflow's storage directory for the StoredCredential is the same for all pipelines unless the user changes it via --credentialDir.
LGTM (assuming tests pass) |
Use Dataflow's oauth flow.
Tested via:
@iliat I think https://github.com/googlegenomics/dataflow-java/blob/master/src/main/java/com/google/cloud/genomics/dataflow/utils/GCSOptions.java is mostly obsolete now that Dataflow oauth flow includes the cloud platform scope which covers GCS and Google Genomics. Also, could use a rename - it doesn't add any new options, just makes it convenient to get a GCS client.