[ https://issues.apache.org/jira/browse/BEAM-4176?focusedWorklogId=155032&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-155032 ]
ASF GitHub Bot logged work on BEAM-4176: ---------------------------------------- Author: ASF GitHub Bot Created on: 16/Oct/18 17:44 Start Date: 16/Oct/18 17:44 Worklog Time Spent: 10m Work Description: tweise closed pull request #6592: [BEAM-4176] Enable Post Commit JAVA PVR tests for Flink URL: https://github.com/apache/beam/pull/6592 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink.groovy b/.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink.groovy new file mode 100644 index 00000000000..ad09a0ab53d --- /dev/null +++ b/.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink.groovy @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import CommonJobProperties as commonJobProperties +import PostcommitJobBuilder + +// This job runs the suite of ValidatesRunner tests against the Flink runner. +PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_PVR_Flink', + 'Run Java Flink PortableValidatesRunner', 'Java Flink PortableValidatesRunner Tests', this) { + description('Runs the Java PortableValidatesRunner suite on the Flink runner.') + + // Set common parameters. + commonJobProperties.setTopLevelMainJobProperties(delegate) + + // Publish all test results to Jenkins + publishers { + archiveJunit('**/build/test-results/**/*.xml') + } + + // Gradle goals for this job. + steps { + gradle { + rootBuildScriptDir(commonJobProperties.checkoutDir) + tasks(':beam-runners-flink_2.11-job-server:validatesPortableRunner') + commonJobProperties.setGradleSwitches(delegate) + } + } +} diff --git a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy index d1a80dc5e29..28548c09ddd 100644 --- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy +++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy @@ -1499,6 +1499,7 @@ artifactId=${project.name} testClassesDirs = project.files(project.project(":beam-sdks-java-core").sourceSets.test.output.classesDirs, project.project(":beam-runners-core-java").sourceSets.test.output.classesDirs) maxParallelForks config.parallelism useJUnit(config.testCategories) + dependsOn ':beam-sdks-java-container:docker' } } } diff --git a/runners/flink/src/main/java/org/apache/beam/runners/flink/FlinkJobServerDriver.java b/runners/flink/src/main/java/org/apache/beam/runners/flink/FlinkJobServerDriver.java index 679c7cc4bb9..93dc6f0121c 100644 --- a/runners/flink/src/main/java/org/apache/beam/runners/flink/FlinkJobServerDriver.java +++ b/runners/flink/src/main/java/org/apache/beam/runners/flink/FlinkJobServerDriver.java @@ -170,6 +170,11 @@ public void run() { } } + public String start() throws IOException { + jobServer = createJobServer(); + return jobServer.getApiServiceDescriptor().getUrl(); + } + public void stop() { if (jobServer != null) { try { diff --git a/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/ReferenceCountingFlinkExecutableStageContextFactory.java b/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/ReferenceCountingFlinkExecutableStageContextFactory.java index bb2b9dcbe16..90d291ea28a 100644 --- a/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/ReferenceCountingFlinkExecutableStageContextFactory.java +++ b/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/ReferenceCountingFlinkExecutableStageContextFactory.java @@ -115,6 +115,7 @@ private void scheduleRelease(JobInfo jobInfo) { int environmentCacheTTLMillis = pipelineOptions.as(PortablePipelineOptions.class).getEnvironmentCacheMillis(); if (environmentCacheTTLMillis > 0) { + // Do immediate cleanup if this class is not loaded on Flink parent classloader. if (this.getClass().getClassLoader() != ExecutionEnvironment.class.getClassLoader()) { LOG.warn( "{} is not loaded on parent Flink classloader. " ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 155032) Time Spent: 36h 10m (was: 36h) > Java: Portable batch runner passes all ValidatesRunner tests that > non-portable runner passes > -------------------------------------------------------------------------------------------- > > Key: BEAM-4176 > URL: https://issues.apache.org/jira/browse/BEAM-4176 > Project: Beam > Issue Type: Bug > Components: runner-flink > Reporter: Ben Sidhom > Assignee: Ankur Goenka > Priority: Major > Attachments: 81VxNWtFtke.png, Screen Shot 2018-08-14 at 4.18.31 > PM.png, Screen Shot 2018-09-03 at 11.07.38 AM.png > > Time Spent: 36h 10m > Remaining Estimate: 0h > > We need this as a sanity check that runner execution is correct. -- This message was sent by Atlassian JIRA (v7.6.3#76005)