You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2020/10/23 23:11:45 UTC

[GitHub] [incubator-gobblin] aplex opened a new pull request #3139: [GOBBLIN-1301] Add Azkaban OAuth token support

aplex opened a new pull request #3139:
URL: https://github.com/apache/incubator-gobblin/pull/3139


   Azkaban introduced a new job type with automatic authentication,
   based on OAuth. This type of authentication is used in Azure and
   with other cloud providers.
   
   https://issues.apache.org/jira/browse/GOBBLIN-1301
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-gobblin] codecov-io edited a comment on pull request #3139: [GOBBLIN-1301] Add Azkaban OAuth token support

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #3139:
URL: https://github.com/apache/incubator-gobblin/pull/3139#issuecomment-715635379


   # [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=h1) Report
   > Merging [#3139](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-gobblin/commit/4cc0cffa1791218dee07889e2da64eb091fe8a31?el=desc) will **increase** coverage by `0.00%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-gobblin/pull/3139/graphs/tree.svg?width=650&height=150&src=pr&token=4MgURJ0bGc)](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #3139   +/-   ##
   =========================================
     Coverage     46.03%   46.04%           
     Complexity     9587     9587           
   =========================================
     Files          1986     1986           
     Lines         75810    75810           
     Branches       8446     8446           
   =========================================
   + Hits          34900    34903    +3     
   + Misses        37633    37628    -5     
   - Partials       3277     3279    +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...org/apache/gobblin/azkaban/AzkabanJobLauncher.java](https://codecov.io/gh/apache/incubator-gobblin/pull/3139/diff?src=pr&el=tree#diff-Z29iYmxpbi1tb2R1bGVzL2dvYmJsaW4tYXprYWJhbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ29iYmxpbi9hemthYmFuL0F6a2FiYW5Kb2JMYXVuY2hlci5qYXZh) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...main/java/org/apache/gobblin/yarn/YarnService.java](https://codecov.io/gh/apache/incubator-gobblin/pull/3139/diff?src=pr&el=tree#diff-Z29iYmxpbi15YXJuL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3lhcm4vWWFyblNlcnZpY2UuamF2YQ==) | `15.20% <0.00%> (+0.77%)` | `5.00% <0.00%> (+1.00%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=footer). Last update [4cc0cff...6718c1c](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-gobblin] aplex commented on a change in pull request #3139: [GOBBLIN-1301] Add Azkaban OAuth token support

Posted by GitBox <gi...@apache.org>.
aplex commented on a change in pull request #3139:
URL: https://github.com/apache/incubator-gobblin/pull/3139#discussion_r513794805



##########
File path: gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/azkaban/AzkabanJobLauncher.java
##########
@@ -175,18 +169,14 @@ public AzkabanJobLauncher(String jobId, Properties props)
     this.props
         .setProperty(ConfigurationKeys.JOB_TRACKING_URL_KEY, Strings.nullToEmpty(conf.get(AZKABAN_LINK_JOBEXEC_URL)));
 
-    if (props.containsKey(JOB_TYPE) && JOB_TYPES_WITH_AUTOMATIC_TOKEN.contains(props.getProperty(JOB_TYPE))) {
-      // Necessary for compatibility with Azkaban's hadoopJava job type
-      // http://azkaban.github.io/azkaban/docs/2.5/#hadoopjava-type
-      LOG.info(
-          "Job type " + props.getProperty(JOB_TYPE) + " provides Hadoop tokens automatically. Using provided tokens.");
-      if (System.getenv(HADOOP_TOKEN_FILE_LOCATION) != null) {
-        this.props.setProperty(MAPREDUCE_JOB_CREDENTIALS_BINARY, System.getenv(HADOOP_TOKEN_FILE_LOCATION));
-      }
+    if (System.getenv(HADOOP_TOKEN_FILE_LOCATION) != null) {

Review comment:
       If the token is expired/incorrect/missing due to a bug or system problem, the job will fail when it tries to use it. I don't think we need to switch to internal authentication workflow in this case, as it can mask the original problem.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-gobblin] codecov-io commented on pull request #3139: [GOBBLIN-1301] Add Azkaban OAuth token support

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #3139:
URL: https://github.com/apache/incubator-gobblin/pull/3139#issuecomment-715635379


   # [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=h1) Report
   > Merging [#3139](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-gobblin/commit/4cc0cffa1791218dee07889e2da64eb091fe8a31?el=desc) will **increase** coverage by `0.00%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-gobblin/pull/3139/graphs/tree.svg?width=650&height=150&src=pr&token=4MgURJ0bGc)](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #3139   +/-   ##
   =========================================
     Coverage     46.03%   46.04%           
     Complexity     9587     9587           
   =========================================
     Files          1986     1986           
     Lines         75810    75810           
     Branches       8446     8446           
   =========================================
   + Hits          34900    34903    +3     
   + Misses        37633    37628    -5     
   - Partials       3277     3279    +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...org/apache/gobblin/azkaban/AzkabanJobLauncher.java](https://codecov.io/gh/apache/incubator-gobblin/pull/3139/diff?src=pr&el=tree#diff-Z29iYmxpbi1tb2R1bGVzL2dvYmJsaW4tYXprYWJhbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ29iYmxpbi9hemthYmFuL0F6a2FiYW5Kb2JMYXVuY2hlci5qYXZh) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...main/java/org/apache/gobblin/yarn/YarnService.java](https://codecov.io/gh/apache/incubator-gobblin/pull/3139/diff?src=pr&el=tree#diff-Z29iYmxpbi15YXJuL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3lhcm4vWWFyblNlcnZpY2UuamF2YQ==) | `15.20% <0.00%> (+0.77%)` | `5.00% <0.00%> (+1.00%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=footer). Last update [4cc0cff...6718c1c](https://codecov.io/gh/apache/incubator-gobblin/pull/3139?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-gobblin] sv2000 commented on a change in pull request #3139: [GOBBLIN-1301] Add Azkaban OAuth token support

Posted by GitBox <gi...@apache.org>.
sv2000 commented on a change in pull request #3139:
URL: https://github.com/apache/incubator-gobblin/pull/3139#discussion_r513671573



##########
File path: gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/azkaban/AzkabanJobLauncher.java
##########
@@ -175,18 +169,14 @@ public AzkabanJobLauncher(String jobId, Properties props)
     this.props
         .setProperty(ConfigurationKeys.JOB_TRACKING_URL_KEY, Strings.nullToEmpty(conf.get(AZKABAN_LINK_JOBEXEC_URL)));
 
-    if (props.containsKey(JOB_TYPE) && JOB_TYPES_WITH_AUTOMATIC_TOKEN.contains(props.getProperty(JOB_TYPE))) {
-      // Necessary for compatibility with Azkaban's hadoopJava job type
-      // http://azkaban.github.io/azkaban/docs/2.5/#hadoopjava-type
-      LOG.info(
-          "Job type " + props.getProperty(JOB_TYPE) + " provides Hadoop tokens automatically. Using provided tokens.");
-      if (System.getenv(HADOOP_TOKEN_FILE_LOCATION) != null) {
-        this.props.setProperty(MAPREDUCE_JOB_CREDENTIALS_BINARY, System.getenv(HADOOP_TOKEN_FILE_LOCATION));
-      }
+    if (System.getenv(HADOOP_TOKEN_FILE_LOCATION) != null) {

Review comment:
       So is the idea that if the token file location env variable set, then we assume that Azkaban automatically provides tokens for the job? That should work. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-gobblin] aplex commented on pull request #3139: [GOBBLIN-1301] Add Azkaban OAuth token support

Posted by GitBox <gi...@apache.org>.
aplex commented on pull request #3139:
URL: https://github.com/apache/incubator-gobblin/pull/3139#issuecomment-718088465


   @sv2000 , can you take a look?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-gobblin] asfgit closed pull request #3139: [GOBBLIN-1301] Add Azkaban OAuth token support

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #3139:
URL: https://github.com/apache/incubator-gobblin/pull/3139


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-gobblin] li-ygerchikov commented on a change in pull request #3139: [GOBBLIN-1301] Add Azkaban OAuth token support

Posted by GitBox <gi...@apache.org>.
li-ygerchikov commented on a change in pull request #3139:
URL: https://github.com/apache/incubator-gobblin/pull/3139#discussion_r513787406



##########
File path: gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/azkaban/AzkabanJobLauncher.java
##########
@@ -175,18 +169,14 @@ public AzkabanJobLauncher(String jobId, Properties props)
     this.props
         .setProperty(ConfigurationKeys.JOB_TRACKING_URL_KEY, Strings.nullToEmpty(conf.get(AZKABAN_LINK_JOBEXEC_URL)));
 
-    if (props.containsKey(JOB_TYPE) && JOB_TYPES_WITH_AUTOMATIC_TOKEN.contains(props.getProperty(JOB_TYPE))) {
-      // Necessary for compatibility with Azkaban's hadoopJava job type
-      // http://azkaban.github.io/azkaban/docs/2.5/#hadoopjava-type
-      LOG.info(
-          "Job type " + props.getProperty(JOB_TYPE) + " provides Hadoop tokens automatically. Using provided tokens.");
-      if (System.getenv(HADOOP_TOKEN_FILE_LOCATION) != null) {
-        this.props.setProperty(MAPREDUCE_JOB_CREDENTIALS_BINARY, System.getenv(HADOOP_TOKEN_FILE_LOCATION));
-      }
+    if (System.getenv(HADOOP_TOKEN_FILE_LOCATION) != null) {

Review comment:
       Yes, this should work. I just wander if there may be situations when the env var is set, but the file is either missing or obsolete or does not contain the right tokens... How much of this could (and is worth) checking? E.g. checking that the file exists should be fairly trivial.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org