Skip to content

Commit 9be9a61

Browse files
authored
Merge pull request linkedin#229 from jamiesjc/fixVariableSubstitutionWhenGeneratingYaml
Fix variable substitution issue for dependency list.
2 parents 4723520 + 3a5fc55 commit 9be9a61

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,4 @@ The following were contributed by Jamie Sun. Thanks, Jamie!
156156
* `Add conditional workflow feature`
157157
* `Fix base properties scope for subflows when generating YAML files`
158158
* `Fix variable substitution issue when generating YAML files`
159+
* `Fix variable substitution issue for dependency list`

VERSIONS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ the License.
1717
Note that the LinkedIn build system occasionally requires that we skip a
1818
version bump, so you will see a few skipped version numbers in the list below.
1919

20+
0.14.29
21+
* Fix variable substitution issue for dependency list
22+
2023
0.14.28
2124
* Fix variable substitution issue when generating YAML files
2225

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
org.gradle.daemon=true
2-
version=0.14.28
2+
version=0.14.29

hadoop-plugin-test/src/main/gradle/positive/flowWithVariableSubstitution.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ apply plugin: com.linkedin.gradle.hadoop.HadoopPlugin
1515

1616
def projectPath = "."
1717
def jobName = "uploadResourceFilesJob"
18+
def jobName2 = "checkResultsJob"
19+
def dependList = ["${jobName}"]
20+
def targetList = ["${jobName2}"]
1821

1922
hadoop {
2023
buildPath "jobs/flowWithVariableSubstitution"
@@ -50,17 +53,17 @@ hadoop {
5053
set properties: [
5154
'force.output.overwrite': true
5255
]
53-
depends "${jobName}"
56+
depends dependList
5457
conditions '${' + "${jobName}" + ':param1} == "foo"'
5558
}
5659

5760
def keywordToCheck = "Government"
5861

59-
hadoopShellJob('checkResultsJob') {
62+
hadoopShellJob("${jobName2}") {
6063
uses "bash ./bash/checkResults.sh ${projectPath} ${keywordToCheck}"
6164
depends 'wordCountMapReduceJob'
6265
}
6366

64-
targets 'checkResultsJob'
67+
targets targetList
6568
}
6669
}

hadoop-plugin/src/main/groovy/com/linkedin/gradle/azkaban/AzkabanDslYamlCompiler.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ class AzkabanDslYamlCompiler extends BaseCompiler {
296296
yamlizedJob["type"] = job.jobProperties["type"];
297297
// Add job dependencies if there are any
298298
if (!job.dependencyNames.isEmpty()) {
299-
yamlizedJob["dependsOn"] = job.dependencyNames.toList();
299+
yamlizedJob["dependsOn"] = job.dependencyNames.toList().collect{ dep -> dep.toString() };
300300
}
301301
if(job.condition != null) {
302302
yamlizedJob["condition"] = job.condition;

0 commit comments

Comments
 (0)