You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2022/04/05 15:23:01 UTC
[flink] branch exp_github_actions created (now 7cee4135587)
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a change to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
at 7cee4135587 Use self-hosted runners
This branch includes the following new commits:
new 7c093b9852a upgrade checkstyle
new 8a491821238 [FLINK-26993] Crude fix
new 1d615b11b4a [FLINK-27035][python][tests] Reduce memory usage of ByteArrayWrapperSerializerTest
new 5b28af27839 port gcp test to testcontainers
new 2f7c88fe64f GitHub Actions prototype
new a6e86bd346e Use docker
new d68b69fefb2 Use J 11 for testing purposes
new 981a1a275ff add dedicated validation job
new c6e0c83f2c7 Work outside github workspace
new f508ad6c13d improve xargs
new 3f254bbb31d disable tests
new 7bd98131c59 Mark TaskExecutorRecoveryTest as an ITCase due to memory consumption and starting up TaskManagers
new b2e3bdbfac5 forkCount
new ebcb5e1ac00 Fix es e2e test
new c0a3ccd3c22 MOve docker tests into separate group
new c035187696b disable azure builds
new 7eafe4300bd Separate packaging/licensing test job
new 343e4233bfe notice checker hardening
new 9483276c5b2 add default for forknumber
new e06ac301c9f always run license checks
new 5ff3ceff139 cached repo
new 22a8cd4115e + timeout
new 7cee4135587 Use self-hosted runners
The 23 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[flink] 16/23: disable azure builds
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit c035187696b502642c1904445246f58ecdaf9b1d
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Fri Apr 1 10:17:24 2022 +0200
disable azure builds
---
azure-pipelines.yml | 98 -----------------------------------------------------
1 file changed, 98 deletions(-)
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
deleted file mode 100644
index 649643ff170..00000000000
--- a/azure-pipelines.yml
+++ /dev/null
@@ -1,98 +0,0 @@
-# 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.
-
-#
-# This file defines an Azure Pipeline build for testing Flink. It is intended to be used
-# with a free Azure Pipelines account.
-# It has the following features:
-# - default builds for pushes / pull requests
-# - end-to-end tests
-#
-#
-# For the "apache/flink" repository, we are using the pipeline definition located in
-# tools/azure-pipelines/build-apache-repo.yml
-# That file points to custom, self-hosted build agents for faster pull request build processing and
-# integration with Flinkbot.
-# The custom pipeline definition file is configured in the "Pipeline settings" screen
-# of the Azure Pipelines web ui.
-#
-
-trigger:
- branches:
- include:
- - '*' # must quote since "*" is a YAML reserved character; we want a string
-
-resources:
- containers:
- # Container with Maven 3.2.5, SSL to have the same environment everywhere.
- # see https://github.com/flink-ci/flink-ci-docker
- - container: flink-build-container
- image: chesnay/flink-ci:java_8_11_17
- # On AZP provided machines, set this flag to allow writing coredumps in docker
- options: --privileged
-
-# Define variables:
-# - See tools/azure-pipelines/jobs-template.yml for a short summary of the caching
-# - See https://stackoverflow.com/questions/60742105/how-can-i-access-a-secret-value-from-an-azure-pipelines-expression
-# to understand why the secrets are handled like this
-variables:
- MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository
- E2E_CACHE_FOLDER: $(Pipeline.Workspace)/e2e_cache
- E2E_TARBALL_CACHE: $(Pipeline.Workspace)/e2e_artifact_cache
- MAVEN_ARGS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
- CACHE_KEY: maven | $(Agent.OS) | **/pom.xml, !**/target/**
- CACHE_FALLBACK_KEY: maven | $(Agent.OS)
- DOCKER_IMAGES_CACHE_KEY: docker-images-cache | $(Agent.OS) | **/cache_docker_images.sh | flink-test-utils-parent/**/DockerImageVersions.java
- DOCKER_IMAGES_CACHE_FOLDER: $(Pipeline.Workspace)/.docker-cache
- FLINK_ARTIFACT_DIR: $(Pipeline.Workspace)/flink_artifact
- SECRET_S3_BUCKET: $[variables.IT_CASE_S3_BUCKET]
- SECRET_S3_ACCESS_KEY: $[variables.IT_CASE_S3_ACCESS_KEY]
- SECRET_S3_SECRET_KEY: $[variables.IT_CASE_S3_SECRET_KEY]
- SECRET_GLUE_SCHEMA_ACCESS_KEY: $[variables.IT_CASE_GLUE_SCHEMA_ACCESS_KEY]
- SECRET_GLUE_SCHEMA_SECRET_KEY: $[variables.IT_CASE_GLUE_SCHEMA_SECRET_KEY]
-
-
-stages:
- # CI / PR triggered stage:
- - stage: ci
- displayName: "CI build (custom builders)"
- condition: not(eq(variables['MODE'], 'release'))
- jobs:
- - template: tools/azure-pipelines/jobs-template.yml
- parameters: # see template file for a definition of the parameters.
- stage_name: ci_build
- test_pool_definition:
- vmImage: 'ubuntu-20.04'
- e2e_pool_definition:
- vmImage: 'ubuntu-20.04'
- environment: PROFILE="-Dhadoop.version=2.8.5 -Dinclude_hadoop_aws -Dscala-2.12"
- run_end_to_end: false
- container: flink-build-container
- jdk: 8
- - job: docs_404_check # run on a MSFT provided machine
- pool:
- vmImage: 'ubuntu-20.04'
- steps:
- - script: ./tools/ci/docs.sh
- # CI / Special stage for release, e.g. building PyFlink wheel packages, etc:
- - stage: ci_release
- displayName: "CI build (release)"
- condition: and(eq(variables['Build.Reason'], 'Manual'), eq(variables['MODE'], 'release'))
- jobs:
- - template: tools/azure-pipelines/build-python-wheels.yml
- parameters:
- stage_name: cron_python_wheels
- environment: PROFILE="-Dhadoop.version=2.8.5 -Dinclude_hadoop_aws -Dscala-2.12"
- container: flink-build-container
[flink] 01/23: upgrade checkstyle
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 7c093b9852ae2facb8873bdda7db8e05d4baca09
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue Mar 29 17:24:28 2022 +0200
upgrade checkstyle
newer version no longer require dependency resolution
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6ff87705776..00384ec13be 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1917,7 +1917,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.17</version>
+ <version>3.1.2</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
[flink] 02/23: [FLINK-26993] Crude fix
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 8a491821238d93581ad50f0811d3fe03e34f21a6
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Fri Apr 1 22:29:57 2022 +0200
[FLINK-26993] Crude fix
---
.../apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
index 30af82fbe7d..34efb5437c6 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
@@ -388,8 +388,9 @@ public class CheckpointCoordinatorTest extends TestLogger {
coordinator.triggerCheckpoint(
true); // enqueue and later see if it gets executed in the middle of
// receiveAcknowledgeMessage
- while (coordinator.getNumberOfPendingCheckpoints()
- == 0) { // wait for at least 1 request to be fully processed
+ while (coordinator.getPendingCheckpoints().values().stream()
+ .noneMatch(pc -> pc.getCheckpointStorageLocation() != null)) {
+ // wait for at least 1 request to be fully processed
Thread.sleep(10);
}
coordinator.receiveAcknowledgeMessage(
[flink] 08/23: add dedicated validation job
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 981a1a275ffcf6ee0115f66cc8bd15ba1494200c
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue Mar 29 16:06:26 2022 +0200
add dedicated validation job
---
.github/workflows/flink-ci-template.yml | 23 ++++++++++++++++++++
tools/ci/compile.sh | 2 +-
tools/ci/validate.sh | 38 +++++++++++++++++++++++++++++++++
3 files changed, 62 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/flink-ci-template.yml b/.github/workflows/flink-ci-template.yml
index af080f3d162..a5c957ba8a6 100644
--- a/.github/workflows/flink-ci-template.yml
+++ b/.github/workflows/flink-ci-template.yml
@@ -47,6 +47,29 @@ env:
CHECKOUT_DIR: ${{ github.workspace }}/flink-checkout
jobs:
+ qa:
+ name: "Basic QA"
+ runs-on: ubuntu-latest
+ container:
+ image: chesnay/flink-ci:java_8_11_xenial
+ options: --init
+
+ steps:
+ - name: "Set JDK version"
+ run: |
+ echo "JAVA_HOME=$JAVA_HOME_${{inputs.jdk-version}}_X64" >> ${GITHUB_ENV}
+ echo "PATH=$JAVA_HOME_${{inputs.jdk-version}}_X64/bin:$PATH" >> ${GITHUB_ENV}
+
+ - name: "Flink Checkout"
+ uses: actions/checkout@v2
+ - name: "Codestyle"
+ run: |
+ ${{ inputs.environment }} ./tools/ci/validate.sh "checkstyle:check spotless:check -T2" || exit $?
+
+ - name: "License Headers"
+ run: |
+ ${{ inputs.environment }} ./tools/ci/validate.sh "org.apache.rat:apache-rat-plugin:check -N" || exit $?
+
compile:
name: "Compile"
runs-on: ubuntu-latest
diff --git a/tools/ci/compile.sh b/tools/ci/compile.sh
index e6013f9650f..043755b5a0b 100755
--- a/tools/ci/compile.sh
+++ b/tools/ci/compile.sh
@@ -48,7 +48,7 @@ echo "==========================================================================
EXIT_CODE=0
run_mvn clean deploy -DaltDeploymentRepository=validation_repository::default::file:$MVN_VALIDATION_DIR -Dflink.convergence.phase=install -Pcheck-convergence -Dflink.forkCount=2 \
- -Dflink.forkCountTestPackage=2 -Dmaven.javadoc.skip=true -U -DskipTests | tee $MVN_CLEAN_COMPILE_OUT
+ -Dflink.forkCountTestPackage=2 -Dmaven.javadoc.skip=true -U -DskipTests -Dcheckstyle.skip=true -Drat.skip=true -Dspotless.skip=true | tee $MVN_CLEAN_COMPILE_OUT
EXIT_CODE=${PIPESTATUS[0]}
diff --git a/tools/ci/validate.sh b/tools/ci/validate.sh
new file mode 100755
index 00000000000..de639e0582c
--- /dev/null
+++ b/tools/ci/validate.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+################################################################################
+# 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.
+################################################################################
+
+#
+# This file contains tooling for validating Flink
+#
+
+HERE="`dirname \"$0\"`" # relative
+HERE="`( cd \"$HERE\" && pwd )`" # absolutized and normalized
+if [ -z "$HERE" ] ; then
+ exit 1 # fail
+fi
+CI_DIR="$HERE/../ci"
+
+# source required ci scripts
+source "${CI_DIR}/maven-utils.sh"
+
+echo "Maven version:"
+run_mvn -version
+
+run_mvn ${1}
+
[flink] 22/23: + timeout
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 22a8cd4115e6c15626951c2a2170811440c7b3b2
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Sun Apr 3 13:22:42 2022 +0200
+ timeout
---
.../flink/runtime/taskexecutor/TaskExecutorPartitionLifecycleTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorPartitionLifecycleTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorPartitionLifecycleTest.java
index fa67ff022a2..3361390d405 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorPartitionLifecycleTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorPartitionLifecycleTest.java
@@ -104,7 +104,7 @@ import static org.junit.Assert.assertTrue;
/** Tests for the partition-lifecycle logic in the {@link TaskExecutor}. */
public class TaskExecutorPartitionLifecycleTest extends TestLogger {
- private static final Time timeout = Time.seconds(10L);
+ private static final Time timeout = Time.minutes(10L);
private static TestingRpcService rpc;
[flink] 10/23: improve xargs
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit f508ad6c13d33de2b03d6bb62140be7bda46034b
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Wed Mar 30 16:42:30 2022 +0200
improve xargs
---
tools/azure-pipelines/unpack_build_artifact.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/azure-pipelines/unpack_build_artifact.sh b/tools/azure-pipelines/unpack_build_artifact.sh
index ab012170b23..da8a715b153 100755
--- a/tools/azure-pipelines/unpack_build_artifact.sh
+++ b/tools/azure-pipelines/unpack_build_artifact.sh
@@ -40,15 +40,15 @@ tar -xzf ${FLINK_ARTIFACT_DIR} ${TARGET_FOLDER_PARAMETER}
echo "Adjusting timestamps"
# adjust timestamps of proto file to avoid re-generation
-find . -type f -name '*.proto' | xargs touch
+find . -type f -name '*.proto' | xargs --no-run-if-empty touch
# wait a bit for better odds of different timestamps
sleep 5
# adjust timestamps to prevent recompilation
-find . -type f -name '*.java' | xargs touch
-find . -type f -name '*.scala' | xargs touch
+find . -type f -name '*.java' | xargs --no-run-if-empty touch
+find . -type f -name '*.scala' | xargs --no-run-if-empty touch
# wait a bit for better odds of different timestamps
sleep 5
-find . -type f -name '*.class' | xargs touch
-find . -type f -name '*.timestamp' | xargs touch
+find . -type f -name '*.class' | xargs --no-run-if-empty touch
+find . -type f -name '*.timestamp' | xargs --no-run-if-empty touch
[flink] 11/23: disable tests
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 3f254bbb31de18f52fd8fa1f1840ca675ec80153
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Wed Mar 30 20:14:34 2022 +0200
disable tests
---
.../org/apache/flink/core/fs/local/LocalFileSystemTest.java | 2 ++
.../src/test/java/org/apache/flink/util/FileUtilsTest.java | 8 ++++++--
.../org/apache/flink/runtime/blob/BlobCacheDeleteTest.java | 3 +++
.../java/org/apache/flink/runtime/blob/BlobCacheGetTest.java | 9 +++++++++
.../java/org/apache/flink/runtime/blob/BlobCachePutTest.java | 10 ++++++++++
.../org/apache/flink/runtime/blob/BlobServerDeleteTest.java | 4 ++++
.../java/org/apache/flink/runtime/blob/BlobServerGetTest.java | 3 +++
.../java/org/apache/flink/runtime/blob/BlobServerPutTest.java | 10 ++++++++++
.../apache/flink/runtime/blob/BlobUtilsNonWritableTest.java | 2 ++
.../execution/librarycache/BlobLibraryCacheManagerTest.java | 2 ++
.../org/apache/flink/runtime/rest/RestServerEndpointTest.java | 2 ++
.../state/filesystem/FsCheckpointStateOutputStreamTest.java | 2 ++
.../runtime/taskexecutor/TaskManagerRunnerStartupTest.java | 2 ++
.../contrib/streaming/state/RocksDBStateBackendConfigTest.java | 2 ++
.../runtime/jobmaster/JobMasterStopWithSavepointITCase.java | 2 ++
.../runtime/jobmaster/JobMasterTriggerSavepointITCase.java | 2 ++
16 files changed, 63 insertions(+), 2 deletions(-)
diff --git a/flink-core/src/test/java/org/apache/flink/core/fs/local/LocalFileSystemTest.java b/flink-core/src/test/java/org/apache/flink/core/fs/local/LocalFileSystemTest.java
index 2a7bcc6c5d5..b61577498ad 100644
--- a/flink-core/src/test/java/org/apache/flink/core/fs/local/LocalFileSystemTest.java
+++ b/flink-core/src/test/java/org/apache/flink/core/fs/local/LocalFileSystemTest.java
@@ -31,6 +31,7 @@ import org.apache.flink.util.TestLogger;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Assume;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -274,6 +275,7 @@ public class LocalFileSystemTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testRenameFileWithNoAccess() throws IOException {
final FileSystem fs = FileSystem.getLocalFileSystem();
diff --git a/flink-core/src/test/java/org/apache/flink/util/FileUtilsTest.java b/flink-core/src/test/java/org/apache/flink/util/FileUtilsTest.java
index 52beed1f44b..0100e565e47 100644
--- a/flink-core/src/test/java/org/apache/flink/util/FileUtilsTest.java
+++ b/flink-core/src/test/java/org/apache/flink/util/FileUtilsTest.java
@@ -23,6 +23,7 @@ import org.apache.flink.core.fs.FileSystem;
import org.apache.flink.core.fs.Path;
import org.apache.flink.core.testutils.CheckedThread;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -158,13 +159,16 @@ public class FileUtilsTest extends TestLogger {
}
@Test
- public void testDeleteDirectory() throws Exception {
-
+ public void testDeleteNonExistentDirectory() throws Exception {
// deleting a non-existent file should not cause an error
File doesNotExist = new File(tmp.newFolder(), "abc");
FileUtils.deleteDirectory(doesNotExist);
+ }
+ @Test
+ @Ignore("fails in docker with root")
+ public void testDeleteProtectedDirectory() throws Exception {
// deleting a write protected file should throw an error
File cannotDeleteParent = tmp.newFolder();
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheDeleteTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheDeleteTest.java
index a47e98579ed..1472dfce677 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheDeleteTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheDeleteTest.java
@@ -25,6 +25,7 @@ import org.apache.flink.util.OperatingSystem;
import org.apache.flink.util.TestLogger;
import org.apache.flink.util.concurrent.FutureUtils;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -211,11 +212,13 @@ public class BlobCacheDeleteTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testDeleteTransientLocalFailsNoJob() throws IOException, InterruptedException {
testDeleteTransientLocalFails(null);
}
@Test
+ @Ignore("fails in docker with root")
public void testDeleteTransientLocalFailsForJob() throws IOException, InterruptedException {
testDeleteTransientLocalFails(new JobID());
}
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheGetTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheGetTest.java
index 9b16d66c387..7b019fb5b28 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheGetTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheGetTest.java
@@ -26,6 +26,7 @@ import org.apache.flink.util.TestLogger;
import org.apache.flink.util.concurrent.FutureUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -188,16 +189,19 @@ public class BlobCacheGetTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testGetFailsIncomingNoJob() throws IOException {
testGetFailsIncoming(null, TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testGetFailsIncomingForJob() throws IOException {
testGetFailsIncoming(new JobID(), TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testGetFailsIncomingForJobHa() throws IOException {
testGetFailsIncoming(new JobID(), PERMANENT_BLOB);
}
@@ -290,16 +294,19 @@ public class BlobCacheGetTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testGetTransientFailsStoreNoJob() throws IOException, InterruptedException {
testGetFailsStore(null, TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testGetTransientFailsStoreForJob() throws IOException, InterruptedException {
testGetFailsStore(new JobID(), TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testGetPermanentFailsStoreForJob() throws IOException, InterruptedException {
testGetFailsStore(new JobID(), PERMANENT_BLOB);
}
@@ -432,11 +439,13 @@ public class BlobCacheGetTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testGetTransientRemoteDeleteFailsNoJob() throws IOException {
testGetTransientRemoteDeleteFails(null);
}
@Test
+ @Ignore("fails in docker with root")
public void testGetTransientRemoteDeleteFailsForJob() throws IOException {
testGetTransientRemoteDeleteFails(new JobID());
}
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCachePutTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCachePutTest.java
index f5cb95da84a..03f92c4cf9d 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCachePutTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCachePutTest.java
@@ -28,6 +28,7 @@ import org.apache.flink.util.TestLogger;
import org.apache.flink.util.concurrent.FutureUtils;
import org.apache.commons.io.FileUtils;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -559,16 +560,19 @@ public class BlobCachePutTest extends TestLogger {
// --------------------------------------------------------------------------------------------
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsNoJob() throws IOException {
testPutBufferFails(null, TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsForJob() throws IOException {
testPutBufferFails(new JobID(), TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsForJobHa() throws IOException {
testPutBufferFails(new JobID(), PERMANENT_BLOB);
}
@@ -622,16 +626,19 @@ public class BlobCachePutTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsIncomingNoJob() throws IOException {
testPutBufferFailsIncoming(null, TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsIncomingForJob() throws IOException {
testPutBufferFailsIncoming(new JobID(), TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsIncomingForJobHa() throws IOException {
testPutBufferFailsIncoming(new JobID(), PERMANENT_BLOB);
}
@@ -690,16 +697,19 @@ public class BlobCachePutTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsStoreNoJob() throws IOException {
testPutBufferFailsStore(null, TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsStoreForJob() throws IOException {
testPutBufferFailsStore(new JobID(), TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsStoreForJobHa() throws IOException {
testPutBufferFailsStore(new JobID(), PERMANENT_BLOB);
}
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerDeleteTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerDeleteTest.java
index 91ad3ff2338..4a036dedbf8 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerDeleteTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerDeleteTest.java
@@ -27,6 +27,7 @@ import org.apache.flink.util.TestLogger;
import org.apache.flink.util.concurrent.FutureUtils;
import org.hamcrest.collection.IsEmptyCollection;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -204,16 +205,19 @@ public class BlobServerDeleteTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testDeleteTransientFailsNoJob() throws IOException {
testDeleteBlobFails(null, TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testDeleteTransientFailsForJob() throws IOException {
testDeleteBlobFails(new JobID(), TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testDeletePermanentFailsForJob() throws IOException {
testDeleteBlobFails(new JobID(), PERMANENT_BLOB);
}
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerGetTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerGetTest.java
index 9ff57281226..fc7281c900c 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerGetTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerGetTest.java
@@ -30,6 +30,7 @@ import org.apache.flink.util.TestLogger;
import org.apache.flink.util.concurrent.FutureUtils;
import org.apache.commons.io.FileUtils;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -154,6 +155,7 @@ public class BlobServerGetTest extends TestLogger {
* files. File transfers should fail.
*/
@Test
+ @Ignore("fails in docker with root")
public void testGetFailsIncomingForJobHa() throws IOException {
assumeTrue(!OperatingSystem.isWindows()); // setWritable doesn't work on Windows.
@@ -226,6 +228,7 @@ public class BlobServerGetTest extends TestLogger {
* storage file. File transfers should fail.
*/
@Test
+ @Ignore("fails in docker with root")
public void testGetFailsStoreForJobHa() throws IOException {
assumeTrue(!OperatingSystem.isWindows()); // setWritable doesn't work on Windows.
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerPutTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerPutTest.java
index e3154c56ebd..e9e5ec94fe7 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerPutTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerPutTest.java
@@ -29,6 +29,7 @@ import org.apache.flink.util.TestLogger;
import org.apache.flink.util.concurrent.FutureUtils;
import org.apache.commons.io.FileUtils;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -427,16 +428,19 @@ public class BlobServerPutTest extends TestLogger {
// --------------------------------------------------------------------------------------------
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsNoJob() throws IOException {
testPutBufferFails(null, TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsForJob() throws IOException {
testPutBufferFails(new JobID(), TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsForJobHa() throws IOException {
testPutBufferFails(new JobID(), PERMANENT_BLOB);
}
@@ -484,16 +488,19 @@ public class BlobServerPutTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsIncomingNoJob() throws IOException {
testPutBufferFailsIncoming(null, TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsIncomingForJob() throws IOException {
testPutBufferFailsIncoming(new JobID(), TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsIncomingForJobHa() throws IOException {
testPutBufferFailsIncoming(new JobID(), PERMANENT_BLOB);
}
@@ -547,16 +554,19 @@ public class BlobServerPutTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsStoreNoJob() throws IOException {
testPutBufferFailsStore(null, TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsStoreForJob() throws IOException {
testPutBufferFailsStore(new JobID(), TRANSIENT_BLOB);
}
@Test
+ @Ignore("fails in docker with root")
public void testPutBufferFailsStoreForJobHa() throws IOException {
testPutBufferFailsStore(new JobID(), PERMANENT_BLOB);
}
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobUtilsNonWritableTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobUtilsNonWritableTest.java
index 336389866aa..52482c2fae6 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobUtilsNonWritableTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobUtilsNonWritableTest.java
@@ -26,6 +26,7 @@ import org.apache.flink.util.TestLogger;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -37,6 +38,7 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;
/** Tests for {@link BlobUtils} working on non-writable directories. */
+@Ignore("fails in docker with root")
public class BlobUtilsNonWritableTest extends TestLogger {
private static final String CANNOT_CREATE_THIS = "cannot-create-this";
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManagerTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManagerTest.java
index d11c6d8d22f..efe782ab760 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManagerTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManagerTest.java
@@ -31,6 +31,7 @@ import org.apache.flink.util.OperatingSystem;
import org.apache.flink.util.TestLogger;
import org.apache.flink.util.UserCodeClassLoader;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -311,6 +312,7 @@ public class BlobLibraryCacheManagerTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testRegisterAndDownload() throws IOException {
assumeTrue(!OperatingSystem.isWindows()); // setWritable doesn't work on Windows.
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestServerEndpointTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestServerEndpointTest.java
index 8ff85020c25..68dd3127ecc 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestServerEndpointTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestServerEndpointTest.java
@@ -21,6 +21,7 @@ package org.apache.flink.runtime.rest;
import org.apache.flink.util.TestLogger;
import org.junit.Assume;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -82,6 +83,7 @@ public class RestServerEndpointTest extends TestLogger {
}
@Test
+ @Ignore("fails in docker with root")
public void testCreateUploadDirFails() throws Exception {
final File file = temporaryFolder.newFolder();
Assume.assumeTrue(file.setWritable(false));
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStateOutputStreamTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStateOutputStreamTest.java
index 472c35c4137..eed48c7687a 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStateOutputStreamTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStateOutputStreamTest.java
@@ -28,6 +28,7 @@ import org.apache.flink.runtime.state.filesystem.FsCheckpointStreamFactory.FsChe
import org.apache.flink.runtime.state.memory.ByteStreamStateHandle;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -377,6 +378,7 @@ public class FsCheckpointStateOutputStreamTest {
* encountering a write error.
*/
@Test
+ @Ignore("fails in docker with root")
public void testStreamDoesNotTryToCleanUpParentOnError() throws Exception {
final File directory = tempDir.newFolder();
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunnerStartupTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunnerStartupTest.java
index 2ea9bacaa8a..5f3d912d15d 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunnerStartupTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunnerStartupTest.java
@@ -49,6 +49,7 @@ import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.ClassRule;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -108,6 +109,7 @@ public class TaskManagerRunnerStartupTest extends TestLogger {
* writable.
*/
@Test
+ @Ignore("fails in docker with root")
public void testIODirectoryNotWritable() throws Exception {
File nonWritable = tempFolder.newFolder();
Assume.assumeTrue(
diff --git a/flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackendConfigTest.java b/flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackendConfigTest.java
index a3be47c600f..a6c8df418dd 100644
--- a/flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackendConfigTest.java
+++ b/flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackendConfigTest.java
@@ -46,6 +46,7 @@ import org.apache.flink.util.IOUtils;
import org.junit.Assert;
import org.junit.Assume;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -363,6 +364,7 @@ public class RocksDBStateBackendConfigTest {
// ------------------------------------------------------------------------
@Test
+ @Ignore("fails in docker with root")
public void testFailWhenNoLocalStorageDir() throws Exception {
final File targetDir = tempFolder.newFolder();
Assume.assumeTrue(
diff --git a/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterStopWithSavepointITCase.java b/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterStopWithSavepointITCase.java
index cabdc0c3bd5..8cf158c3a49 100644
--- a/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterStopWithSavepointITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterStopWithSavepointITCase.java
@@ -49,6 +49,7 @@ import org.apache.flink.test.util.AbstractTestBase;
import org.apache.flink.util.ExceptionUtils;
import org.junit.Assume;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -177,6 +178,7 @@ public class JobMasterStopWithSavepointITCase extends AbstractTestBase {
}
@Test
+ @Ignore("fails in docker with root")
public void testRestartCheckpointCoordinatorIfStopWithSavepointFails() throws Exception {
setUpJobGraph(CheckpointCountingTask.class, RestartStrategies.noRestart());
diff --git a/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTriggerSavepointITCase.java b/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTriggerSavepointITCase.java
index ac0c94adce5..c64e257189c 100644
--- a/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTriggerSavepointITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTriggerSavepointITCase.java
@@ -41,6 +41,7 @@ import org.apache.flink.test.util.AbstractTestBase;
import org.apache.flink.util.ExceptionUtils;
import org.junit.Assume;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -158,6 +159,7 @@ public class JobMasterTriggerSavepointITCase extends AbstractTestBase {
}
@Test
+ @Ignore("fails in docker with root")
public void testDoNotCancelJobIfSavepointFails() throws Exception {
setUpWithCheckpointInterval(10L);
[flink] 17/23: Separate packaging/licensing test job
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 7eafe4300bd1130ba699b695e40de37daf6adef1
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Fri Apr 1 21:42:07 2022 +0200
Separate packaging/licensing test job
---
.github/workflows/flink-ci-template.yml | 43 ++++++++++++++++++++++++++++++++-
tools/ci/compile.sh | 2 +-
2 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/flink-ci-template.yml b/.github/workflows/flink-ci-template.yml
index 077858cfd07..1040e2947c9 100644
--- a/.github/workflows/flink-ci-template.yml
+++ b/.github/workflows/flink-ci-template.yml
@@ -106,7 +106,7 @@ jobs:
- name: "Compile Flink"
working-directory: ${{ env.CHECKOUT_DIR }}
run: |
- ${{ inputs.environment }} ./tools/ci/compile.sh || exit $?
+ ${{ inputs.environment }} ./tools/ci/validate.sh "test-compile -T2 -Dfast" || exit $?
- name: "Collect build artifacts"
working-directory: ${{ env.CHECKOUT_DIR }}
@@ -119,6 +119,47 @@ jobs:
path: ${{ env.FLINK_ARTIFACT_DIR }}${{ env.FLINK_ARTIFACT_FILENAME }}
if-no-files-found: error
+ packaging:
+ name: "Test packaging/licensing"
+ needs: compile
+ runs-on: ubuntu-latest
+ container:
+ image: chesnay/flink-ci:java_8_11_xenial
+ options: --init
+
+ steps:
+ - name: "Set JDK version"
+ run: |
+ echo "JAVA_HOME=$JAVA_HOME_${{inputs.jdk-version}}_X64" >> ${GITHUB_ENV}
+ echo "PATH=$JAVA_HOME_${{inputs.jdk-version}}_X64/bin:$PATH" >> ${GITHUB_ENV}
+
+ - name: "Flink Checkout"
+ uses: actions/checkout@v2
+ with:
+ path: ${{ env.CHECKOUT_MOUNT_DIR }}
+
+ - name: "Copy"
+ working-directory: ${{ env.CHECKOUT_MOUNT_DIR }}
+ run: |
+ mkdir -p ${{ env.CHECKOUT_DIR }}
+ mv ./* ${{ env.CHECKOUT_DIR }}/
+
+ - name: "Download build artifacts from compile job"
+ uses: actions/download-artifact@v2
+ with:
+ name: build-artifacts-${{ needs.compile.outputs.stringified-workflow-name }}-${{ github.run_number }}
+ path: ${{ env.FLINK_ARTIFACT_DIR }}
+
+ - name: "Unpack build artifact"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ run: |
+ ./tools/azure-pipelines/unpack_build_artifact.sh -f ${{ env.FLINK_ARTIFACT_DIR }}${{ env.FLINK_ARTIFACT_FILENAME }} -t .
+
+ - name: "Test"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ run: |
+ ${{ inputs.environment }} ./tools/ci/compile.sh || exit $?
+
test:
name: "Test (module: ${{ matrix.module }})"
needs: compile
diff --git a/tools/ci/compile.sh b/tools/ci/compile.sh
index 043755b5a0b..4df20256d61 100755
--- a/tools/ci/compile.sh
+++ b/tools/ci/compile.sh
@@ -47,7 +47,7 @@ echo "==========================================================================
EXIT_CODE=0
-run_mvn clean deploy -DaltDeploymentRepository=validation_repository::default::file:$MVN_VALIDATION_DIR -Dflink.convergence.phase=install -Pcheck-convergence -Dflink.forkCount=2 \
+run_mvn deploy -DaltDeploymentRepository=validation_repository::default::file:$MVN_VALIDATION_DIR -Dflink.convergence.phase=install -Pcheck-convergence -Dflink.forkCount=2 \
-Dflink.forkCountTestPackage=2 -Dmaven.javadoc.skip=true -U -DskipTests -Dcheckstyle.skip=true -Drat.skip=true -Dspotless.skip=true | tee $MVN_CLEAN_COMPILE_OUT
EXIT_CODE=${PIPESTATUS[0]}
[flink] 13/23: forkCount
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit b2e3bdbfac51b8cb659b79fa2caf2d6e5e938755
Author: Piotr Nowojski <pi...@gmail.com>
AuthorDate: Tue Mar 22 16:06:25 2022 +0100
forkCount
---
pom.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 00384ec13be..134099b5587 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1594,7 +1594,6 @@ under the License.
<test.randomization.seed>${test.randomization.seed}</test.randomization.seed>
<junit.jupiter.extensions.autodetection.enabled>true</junit.jupiter.extensions.autodetection.enabled>
</systemPropertyVariables>
- <argLine>-Xms256m -Xmx2048m -XX:+UseG1GC</argLine>
</configuration>
<executions>
<!--execute all the unit tests-->
@@ -1608,6 +1607,8 @@ under the License.
<includes>
<include>${test.unit.pattern}</include>
</includes>
+ <forkCount>4</forkCount>
+ <argLine>-Xms256m -Xmx1024m -XX:+UseG1GC</argLine>
</configuration>
</execution>
<!--execute all the integration tests-->
@@ -1627,6 +1628,7 @@ under the License.
e.g., 'org.apache.flink.api.scala.typeutils.Foo$Bar$Foobar'. -->
<exclude>**/*$*</exclude>
</excludes>
+ <argLine>-Xms256m -Xmx2048m -XX:+UseG1GC</argLine>
<reuseForks>false</reuseForks>
</configuration>
</execution>
[flink] 09/23: Work outside github workspace
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit c6e0c83f2c7bf3563dfcee7123e1d7a65bbc0011
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Wed Mar 30 13:40:57 2022 +0200
Work outside github workspace
---
.github/workflows/flink-ci-template.yml | 42 ++++++++++++++++++++++++---------
1 file changed, 31 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/flink-ci-template.yml b/.github/workflows/flink-ci-template.yml
index a5c957ba8a6..077858cfd07 100644
--- a/.github/workflows/flink-ci-template.yml
+++ b/.github/workflows/flink-ci-template.yml
@@ -39,12 +39,13 @@ on:
required: false
env:
- FLINK_ARTIFACT_DIR: ${{ github.workspace }}/
+ FLINK_ARTIFACT_DIR: /root/
FLINK_ARTIFACT_FILENAME: flink_artifacts.tar.gz
- DOCKER_IMAGES_CACHE_FOLDER: ${{ github.workspace }}/.docker-cache
+ DOCKER_IMAGES_CACHE_FOLDER: /root/.docker-cache
# The checkout directory needs to be changed for the Composite Github action usages below as
# well, if this env variable is modified
- CHECKOUT_DIR: ${{ github.workspace }}/flink-checkout
+ CHECKOUT_MOUNT_DIR: ${{ github.workspace }}/flink-checkout
+ CHECKOUT_DIR: /root/flink
jobs:
qa:
@@ -94,7 +95,13 @@ jobs:
- name: "Flink Checkout"
uses: actions/checkout@v2
with:
- path: ${{ env.CHECKOUT_DIR }}
+ path: ${{ env.CHECKOUT_MOUNT_DIR }}
+
+ - name: "Copy"
+ working-directory: ${{ env.CHECKOUT_MOUNT_DIR }}
+ run: |
+ mkdir -p ${{ env.CHECKOUT_DIR }}
+ mv ./* ${{ env.CHECKOUT_DIR }}/
- name: "Compile Flink"
working-directory: ${{ env.CHECKOUT_DIR }}
@@ -149,7 +156,13 @@ jobs:
- name: "Flink Checkout"
uses: actions/checkout@v2
with:
- path: ${{ env.CHECKOUT_DIR }}
+ path: ${{ env.CHECKOUT_MOUNT_DIR }}
+
+ - name: "Copy"
+ working-directory: ${{ env.CHECKOUT_MOUNT_DIR }}
+ run: |
+ mkdir -p ${{ env.CHECKOUT_DIR }}
+ mv ./* ${{ env.CHECKOUT_DIR }}/
- name: "Set coredump pattern"
working-directory: ${{ env.CHECKOUT_DIR }}
@@ -163,7 +176,8 @@ jobs:
- name: "Unpack build artifact"
working-directory: ${{ env.CHECKOUT_DIR }}
- run: ./tools/azure-pipelines/unpack_build_artifact.sh -f ${{ env.FLINK_ARTIFACT_DIR }}/${{ env.FLINK_ARTIFACT_FILENAME }} -t ${{ env.CHECKOUT_DIR }}
+ run: |
+ ./tools/azure-pipelines/unpack_build_artifact.sh -f ${{ env.FLINK_ARTIFACT_DIR }}${{ env.FLINK_ARTIFACT_FILENAME }} -t .
- name: "Try loading Docker images from Cache"
id: docker-cache
@@ -224,12 +238,12 @@ jobs:
- name: "Flink Checkout"
uses: actions/checkout@v2
with:
- path: ${{ env.CHECKOUT_DIR }}
+ path: ${{ env.CHECKOUT_MOUNT_DIR }}
# Skip e2e test execution if this is a documentation only pull request (master / release builds will still be checked regularly)
- name: "Check if it's a docs-only PR (i.e. e2e tests can be skipped)"
id: docs-only-pr-check
- working-directory: ${{ env.CHECKOUT_DIR }}
+ working-directory: ${{ env.CHECKOUT_MOUNT_DIR }}
run: |
source ./tools/azure-pipelines/build_properties.sh
if is_docs_only_pullrequest; then
@@ -250,8 +264,8 @@ jobs:
if: ${{ needs.e2e-prereq-check.outputs.skip-e2e != 'true' }}
timeout-minutes: 310
env:
- E2E_CACHE_FOLDER: ${{ github.workspace }}/.e2e-cache
- E2E_TARBALL_CACHE: ${{ github.workspace }}/.e2e-tarbal-cache
+ E2E_CACHE_FOLDER: /root/.e2e-cache
+ E2E_TARBALL_CACHE: /root/.e2e-tarbal-cache
strategy:
fail-fast: false
matrix:
@@ -266,7 +280,13 @@ jobs:
- name: "Flink Checkout"
uses: actions/checkout@v2
with:
- path: ${{ env.CHECKOUT_DIR }}
+ path: ${{ env.CHECKOUT_MOUNT_DIR }}
+
+ - name: "Copy"
+ working-directory: ${{ env.CHECKOUT_MOUNT_DIR }}
+ run: |
+ mkdir -p ${{ env.CHECKOUT_DIR }}
+ mv ./* ${{ env.CHECKOUT_DIR }}/
- name: "Download build artifacts from compile job"
uses: actions/download-artifact@v2
[flink] 21/23: cached repo
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 5ff3ceff13992249e1c33382bbf8868c033ca16f
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Sun Apr 3 11:34:43 2022 +0200
cached repo
---
.github/workflows/flink-ci-template.yml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/flink-ci-template.yml b/.github/workflows/flink-ci-template.yml
index 17cca7c11cc..dcaa6bcae1f 100644
--- a/.github/workflows/flink-ci-template.yml
+++ b/.github/workflows/flink-ci-template.yml
@@ -52,7 +52,7 @@ jobs:
name: "Basic QA"
runs-on: ubuntu-latest
container:
- image: chesnay/flink-ci:java_8_11_xenial
+ image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
steps:
@@ -76,7 +76,7 @@ jobs:
name: "Compile"
runs-on: ubuntu-latest
container:
- image: chesnay/flink-ci:java_8_11_xenial
+ image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
timeout-minutes: 240
outputs:
@@ -125,7 +125,7 @@ jobs:
needs: compile
runs-on: ubuntu-latest
container:
- image: chesnay/flink-ci:java_8_11_xenial
+ image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
steps:
@@ -166,7 +166,7 @@ jobs:
needs: compile
runs-on: ubuntu-latest
container:
- image: chesnay/flink-ci:java_8_11_xenial
+ image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
strategy:
fail-fast: false
@@ -272,7 +272,7 @@ jobs:
needs: compile
runs-on: ubuntu-latest
container:
- image: chesnay/flink-ci:java_8_11_xenial
+ image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
outputs:
skip-e2e: ${{ steps.docs-only-pr-check.skip-e2e }}
@@ -301,7 +301,7 @@ jobs:
needs: [compile, e2e-prereq-check]
runs-on: ubuntu-latest
container:
- image: chesnay/flink-ci:java_8_11_xenial
+ image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
if: ${{ needs.e2e-prereq-check.outputs.skip-e2e != 'true' }}
timeout-minutes: 310
[flink] 03/23: [FLINK-27035][python][tests] Reduce memory usage of ByteArrayWrapperSerializerTest
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 1d615b11b4aa57d6941ddd67db7fb7017b803459
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Sun Apr 3 14:20:34 2022 +0200
[FLINK-27035][python][tests] Reduce memory usage of ByteArrayWrapperSerializerTest
---
.../apache/flink/streaming/api/utils/ByteArrayWrapperSerializerTest.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/flink-python/src/test/java/org/apache/flink/streaming/api/utils/ByteArrayWrapperSerializerTest.java b/flink-python/src/test/java/org/apache/flink/streaming/api/utils/ByteArrayWrapperSerializerTest.java
index 5547ad80465..5e042eacae3 100644
--- a/flink-python/src/test/java/org/apache/flink/streaming/api/utils/ByteArrayWrapperSerializerTest.java
+++ b/flink-python/src/test/java/org/apache/flink/streaming/api/utils/ByteArrayWrapperSerializerTest.java
@@ -52,7 +52,6 @@ public class ByteArrayWrapperSerializerTest extends SerializerTestBase<ByteArray
randomByteArray(1),
randomByteArray(2),
randomByteArray(1024 * 1024),
- randomByteArray(32 * 1024 * 1024),
};
}
[flink] 04/23: port gcp test to testcontainers
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 5b28af2783903d853b1547b6cc90ebaca5cd198a
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Sun Apr 3 09:52:56 2022 +0200
port gcp test to testcontainers
---
.../pom.xml | 15 +-
.../gcp/pubsub/emulator/GCloudEmulatorManager.java | 297 ---------------------
.../gcp/pubsub/emulator/GCloudUnitTestBase.java | 25 +-
3 files changed, 18 insertions(+), 319 deletions(-)
diff --git a/flink-end-to-end-tests/flink-connector-gcp-pubsub-emulator-tests/pom.xml b/flink-end-to-end-tests/flink-connector-gcp-pubsub-emulator-tests/pom.xml
index 1f8dccee879..b60113fc9ec 100644
--- a/flink-end-to-end-tests/flink-connector-gcp-pubsub-emulator-tests/pom.xml
+++ b/flink-end-to-end-tests/flink-connector-gcp-pubsub-emulator-tests/pom.xml
@@ -59,14 +59,6 @@ under the License.
<scope>test</scope>
</dependency>
- <!-- This is used to run the local PubSub -->
- <dependency>
- <groupId>com.spotify</groupId>
- <artifactId>docker-client</artifactId>
- <version>8.16.0</version>
- <scope>test</scope>
- </dependency>
-
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java</artifactId>
@@ -88,6 +80,13 @@ under the License.
<artifactId>flink-test-utils-junit</artifactId>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.testcontainers</groupId>
+ <artifactId>gcloud</artifactId>
+ <version>1.16.3</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/flink-end-to-end-tests/flink-connector-gcp-pubsub-emulator-tests/src/test/java/org/apache/flink/streaming/connectors/gcp/pubsub/emulator/GCloudEmulatorManager.java b/flink-end-to-end-tests/flink-connector-gcp-pubsub-emulator-tests/src/test/java/org/apache/flink/streaming/connectors/gcp/pubsub/emulator/GCloudEmulatorManager.java
deleted file mode 100644
index 9f37102f318..00000000000
--- a/flink-end-to-end-tests/flink-connector-gcp-pubsub-emulator-tests/src/test/java/org/apache/flink/streaming/connectors/gcp/pubsub/emulator/GCloudEmulatorManager.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.flink.streaming.connectors.gcp.pubsub.emulator;
-
-import com.spotify.docker.client.DefaultDockerClient;
-import com.spotify.docker.client.DockerClient;
-import com.spotify.docker.client.LogStream;
-import com.spotify.docker.client.exceptions.ContainerNotFoundException;
-import com.spotify.docker.client.exceptions.DockerCertificateException;
-import com.spotify.docker.client.exceptions.DockerException;
-import com.spotify.docker.client.exceptions.ImageNotFoundException;
-import com.spotify.docker.client.messages.ContainerConfig;
-import com.spotify.docker.client.messages.ContainerCreation;
-import com.spotify.docker.client.messages.ContainerInfo;
-import com.spotify.docker.client.messages.HostConfig;
-import com.spotify.docker.client.messages.PortBinding;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-/** The class that handles the starting and stopping of the emulator docker image. */
-public class GCloudEmulatorManager {
-
- private static final Logger LOG = LoggerFactory.getLogger(GCloudEmulatorManager.class);
-
- private static DockerClient docker;
-
- private static String dockerIpAddress = "127.0.0.1";
-
- public static final String INTERNAL_PUBSUB_PORT = "22222";
- // TODO: use :latest again once
- // https://github.com/GoogleCloudPlatform/cloud-sdk-docker/issues/225 is resolved.
- public static final String DOCKER_IMAGE_NAME = "google/cloud-sdk:313.0.0";
-
- private static String pubsubPort;
-
- public static String getDockerIpAddress() {
- if (dockerIpAddress == null) {
- throw new IllegalStateException(
- "The docker has not yet been started (yet) so you cannot get the IP address yet.");
- }
- return dockerIpAddress;
- }
-
- public static String getDockerPubSubPort() {
- if (pubsubPort == null) {
- throw new IllegalStateException(
- "The docker has not yet been started (yet) so you cannot get the port information yet.");
- }
- return pubsubPort;
- }
-
- public static final String UNITTEST_PROJECT_ID = "running-from-junit-for-flink";
- private static final String CONTAINER_NAME_JUNIT =
- (DOCKER_IMAGE_NAME + "_" + UNITTEST_PROJECT_ID).replaceAll("[^a-zA-Z0-9_]", "_");
-
- public static void launchDocker()
- throws DockerException, InterruptedException, DockerCertificateException {
- // Create a client based on DOCKER_HOST and DOCKER_CERT_PATH env vars
- docker = DefaultDockerClient.fromEnv().build();
-
- terminateAndDiscardAnyExistingContainers(true);
-
- LOG.info("");
- LOG.info("/===========================================");
- LOG.info("| GCloud Emulator");
-
- ContainerInfo containerInfo;
- String id;
-
- try {
- docker.inspectImage(DOCKER_IMAGE_NAME);
- } catch (ImageNotFoundException e) {
- // No such image so we must download it first.
- LOG.info("| - Getting docker image \"{}\"", DOCKER_IMAGE_NAME);
- docker.pull(
- DOCKER_IMAGE_NAME,
- message -> {
- if (message.id() != null && message.progress() != null) {
- LOG.info("| - Downloading > {} : {}", message.id(), message.progress());
- }
- });
- }
-
- // No such container. Good, we create one!
- LOG.info("| - Creating new container");
-
- // Bind container ports to host ports
- final Map<String, List<PortBinding>> portBindings = new HashMap<>();
- portBindings.put(
- INTERNAL_PUBSUB_PORT, Collections.singletonList(PortBinding.randomPort("0.0.0.0")));
-
- final HostConfig hostConfig = HostConfig.builder().portBindings(portBindings).build();
-
- // Create new container with exposed ports
- final ContainerConfig containerConfig =
- ContainerConfig.builder()
- .hostConfig(hostConfig)
- .exposedPorts(INTERNAL_PUBSUB_PORT)
- .image(DOCKER_IMAGE_NAME)
- .cmd(
- "sh",
- "-c",
- "mkdir -p /opt/data/pubsub ; gcloud beta emulators pubsub start --data-dir=/opt/data/pubsub --host-port=0.0.0.0:"
- + INTERNAL_PUBSUB_PORT)
- .build();
-
- LOG.debug("Launching container with configuration {}", containerConfig);
- final ContainerCreation creation =
- docker.createContainer(containerConfig, CONTAINER_NAME_JUNIT);
- id = creation.id();
-
- containerInfo = docker.inspectContainer(id);
-
- if (!containerInfo.state().running()) {
- LOG.warn("| - Starting it up ....");
- docker.startContainer(id);
- Thread.sleep(1000);
- }
-
- containerInfo = docker.inspectContainer(id);
-
- dockerIpAddress = "127.0.0.1";
-
- Map<String, List<PortBinding>> ports = containerInfo.networkSettings().ports();
-
- assertNotNull("Unable to retrieve the ports where to connect to the emulators", ports);
- assertEquals("We expect 1 port to be mapped", 1, ports.size());
-
- pubsubPort = getPort(ports, INTERNAL_PUBSUB_PORT, "PubSub");
-
- LOG.info("| Waiting for the emulators to be running");
-
- // PubSub exposes an "Ok" at the root url when running.
- if (!waitForOkStatus("PubSub", pubsubPort)) {
- // Oops, we did not get an "Ok" within 10 seconds
- startHasFailedKillEverything();
- }
- LOG.info("\\===========================================");
- LOG.info("");
- }
-
- private static void startHasFailedKillEverything()
- throws DockerException, InterruptedException {
- LOG.error("|");
- LOG.error("| ==================== ");
- LOG.error("| YOUR TESTS WILL FAIL ");
- LOG.error("| ==================== ");
- LOG.error("|");
-
- // Kill this container and wipe all connection information
- dockerIpAddress = null;
- pubsubPort = null;
- terminateAndDiscardAnyExistingContainers(false);
- }
-
- private static final long MAX_RETRY_TIMEOUT = 10000; // Milliseconds
-
- private static boolean waitForOkStatus(String label, String port) {
- long start = System.currentTimeMillis();
- while (true) {
- try {
- URL url = new URL("http://" + dockerIpAddress + ":" + port + "/");
- HttpURLConnection con = (HttpURLConnection) url.openConnection();
- con.setRequestMethod("GET");
- con.setConnectTimeout(50);
- con.setReadTimeout(50);
-
- BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
- String inputLine;
- StringBuilder content = new StringBuilder();
- while ((inputLine = in.readLine()) != null) {
- content.append(inputLine);
- }
- in.close();
- con.disconnect();
- if (content.toString().contains("Ok")) {
- LOG.info("| - {} Emulator is running at {}:{}", label, dockerIpAddress, port);
- return true;
- }
- } catch (IOException e) {
- long now = System.currentTimeMillis();
- if (now - start > MAX_RETRY_TIMEOUT) {
- LOG.error(
- "| - PubSub Emulator at {}:{} FAILED to return an Ok status within {} ms ",
- dockerIpAddress,
- port,
- MAX_RETRY_TIMEOUT);
- return false;
- }
- try {
- Thread.sleep(100); // Sleep a very short time
- } catch (InterruptedException e1) {
- // Ignore
- }
- }
- }
- }
-
- private static String getPort(
- Map<String, List<PortBinding>> ports, String internalTCPPort, String label) {
- List<PortBinding> portMappings = ports.get(internalTCPPort + "/tcp");
- if (portMappings == null || portMappings.isEmpty()) {
- LOG.info("| {} Emulator --> NOTHING CONNECTED TO {}/tcp", label, internalTCPPort);
- return null;
- }
-
- return portMappings.get(0).hostPort();
- }
-
- private static void terminateAndDiscardAnyExistingContainers(boolean warnAboutExisting)
- throws DockerException, InterruptedException {
- ContainerInfo containerInfo;
- try {
- containerInfo = docker.inspectContainer(CONTAINER_NAME_JUNIT);
- // Already have this container running.
-
- assertNotNull(
- "We should either get a containerInfo or we get an exception", containerInfo);
-
- LOG.info("");
- LOG.info("/===========================================");
- if (warnAboutExisting) {
- LOG.warn("| >>> FOUND OLD EMULATOR INSTANCE RUNNING <<< ");
- LOG.warn("| Destroying that one to keep tests running smoothly.");
- }
- LOG.info("| Cleanup of GCloud Emulator. Log output of container: ");
-
- if (LOG.isInfoEnabled()) {
- try (LogStream stream =
- docker.logs(
- containerInfo.id(),
- DockerClient.LogsParam.stdout(),
- DockerClient.LogsParam.stderr())) {
- LOG.info("| > {}", stream.readFully());
- }
- }
-
- // We REQUIRE 100% accurate side effect free unit tests
- // So we completely discard this one.
-
- String id = containerInfo.id();
- // Kill container
- if (containerInfo.state().running()) {
- docker.killContainer(id);
- LOG.info("| - Killed");
- }
-
- // Remove container
- docker.removeContainer(id);
-
- LOG.info("| - Removed");
- LOG.info("\\===========================================");
- LOG.info("");
-
- } catch (ContainerNotFoundException cnfe) {
- // No such container. Good !
- }
- }
-
- public static void terminateDocker() throws DockerException, InterruptedException {
- terminateAndDiscardAnyExistingContainers(false);
-
- // Close the docker client
- docker.close();
- }
-
- // ====================================================================================
-
-}
diff --git a/flink-end-to-end-tests/flink-connector-gcp-pubsub-emulator-tests/src/test/java/org/apache/flink/streaming/connectors/gcp/pubsub/emulator/GCloudUnitTestBase.java b/flink-end-to-end-tests/flink-connector-gcp-pubsub-emulator-tests/src/test/java/org/apache/flink/streaming/connectors/gcp/pubsub/emulator/GCloudUnitTestBase.java
index 92eb6df21d5..bb780aa81a8 100644
--- a/flink-end-to-end-tests/flink-connector-gcp-pubsub-emulator-tests/src/test/java/org/apache/flink/streaming/connectors/gcp/pubsub/emulator/GCloudUnitTestBase.java
+++ b/flink-end-to-end-tests/flink-connector-gcp-pubsub-emulator-tests/src/test/java/org/apache/flink/streaming/connectors/gcp/pubsub/emulator/GCloudUnitTestBase.java
@@ -22,36 +22,33 @@ import org.apache.flink.util.TestLogger;
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.rpc.FixedTransportChannelProvider;
import com.google.api.gax.rpc.TransportChannelProvider;
-import com.spotify.docker.client.exceptions.DockerException;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import org.junit.AfterClass;
-import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.testcontainers.containers.PubSubEmulatorContainer;
+import org.testcontainers.utility.DockerImageName;
-import java.io.Serializable;
import java.util.concurrent.TimeUnit;
import static java.util.concurrent.TimeUnit.SECONDS;
-import static org.apache.flink.streaming.connectors.gcp.pubsub.emulator.GCloudEmulatorManager.getDockerIpAddress;
-import static org.apache.flink.streaming.connectors.gcp.pubsub.emulator.GCloudEmulatorManager.getDockerPubSubPort;
/**
* The base class from which unit tests should inherit if they need to use the Google cloud
* emulators.
*/
-public class GCloudUnitTestBase extends TestLogger implements Serializable {
- @BeforeClass
- public static void launchGCloudEmulator() throws Exception {
- // Separated out into separate class so the entire test class to be serializable
- GCloudEmulatorManager.launchDocker();
- }
+public class GCloudUnitTestBase extends TestLogger {
+
+ @ClassRule
+ public static final PubSubEmulatorContainer PUB_SUB_EMULATOR_CONTAINER =
+ new PubSubEmulatorContainer(
+ DockerImageName.parse("gcr.io/google.com/cloudsdktool/cloud-sdk:379.0.0"));
@AfterClass
- public static void terminateGCloudEmulator() throws DockerException, InterruptedException {
+ public static void terminateGCloudEmulator() throws InterruptedException {
channel.shutdownNow();
channel.awaitTermination(1, TimeUnit.MINUTES);
channel = null;
- GCloudEmulatorManager.terminateDocker();
}
// ====================================================================================
@@ -71,7 +68,7 @@ public class GCloudUnitTestBase extends TestLogger implements Serializable {
}
public static String getPubSubHostPort() {
- return getDockerIpAddress() + ":" + getDockerPubSubPort();
+ return PUB_SUB_EMULATOR_CONTAINER.getEmulatorEndpoint();
}
@AfterClass
[flink] 19/23: add default for forknumber
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 9483276c5b2ae1cb230dc10cccaf36fbb3909755
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Sat Apr 2 12:00:35 2022 +0200
add default for forknumber
---
tools/ci/log4j.properties | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/ci/log4j.properties b/tools/ci/log4j.properties
index 80a611405d7..883beec3fa4 100644
--- a/tools/ci/log4j.properties
+++ b/tools/ci/log4j.properties
@@ -33,7 +33,7 @@ appender.console.layout.pattern = %d{HH:mm:ss,SSS} [%20t] %-5p %-60c %x - %m%n
# -----------------------------------------------------------------------------
appender.file.name = FileAppender
appender.file.type = FILE
-appender.file.fileName = ${sys:log.dir}/mvn-${sys:mvn.forkNumber}.log
+appender.file.fileName = ${sys:log.dir}/mvn-${sys:mvn.forkNumber:-unknown}.log
appender.file.layout.type = PatternLayout
appender.file.layout.pattern = %d{HH:mm:ss,SSS} [%20t] %-5p %-60c %x - %m%n
@@ -42,13 +42,13 @@ appender.file.layout.pattern = %d{HH:mm:ss,SSS} [%20t] %-5p %-60c %x - %m%n
# -----------------------------------------------------------------------------
appender.zk_server.name = ZooKeeperServerAppender
appender.zk_server.type = FILE
-appender.zk_server.fileName = ${sys:log.dir}/zookeeper-server-${sys:mvn.forkNumber}.log
+appender.zk_server.fileName = ${sys:log.dir}/zookeeper-server-${sys:mvn.forkNumber:-unknown}.log
appender.zk_server.layout.type = PatternLayout
appender.zk_server.layout.pattern = %d{HH:mm:ss,SSS} [%20t] %-5p %-60c %x - %m%n
appender.zk_client.name = ZooKeeperClientAppender
appender.zk_client.type = FILE
-appender.zk_client.fileName = ${sys:log.dir}/zookeeper-client-${sys:mvn.forkNumber}.log
+appender.zk_client.fileName = ${sys:log.dir}/zookeeper-client-${sys:mvn.forkNumber:-unknown}.log
appender.zk_client.layout.type = PatternLayout
appender.zk_client.layout.pattern = %d{HH:mm:ss,SSS} [%20t] %-5p %-60c %x - %m%n
[flink] 07/23: Use J 11 for testing purposes
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit d68b69fefb2cec4a243d5bfa78e85e98aa21ee98
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue Mar 29 15:48:16 2022 +0200
Use J 11 for testing purposes
---
.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml b/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml
index d0d7c99fc73..a118376730f 100644
--- a/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml
+++ b/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml
@@ -21,8 +21,8 @@ jobs:
ci:
uses: ./.github/workflows/flink-ci-template.yml
with:
- environment: 'PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.12"'
- jdk-version: 8
+ environment: 'PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.12 -Djdk11 -Pjava11-target"'
+ jdk-version: 11
secrets:
s3_bucket: ${{ secrets.IT_CASE_S3_BUCKET }}
s3_access_key: ${{ secrets.IT_CASE_S3_ACCESS_KEY }}
[flink] 05/23: GitHub Actions prototype
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 2f7c88fe64fe7f481870c186bf65430304e2b29a
Author: Nicolaus Weidner <ni...@ververica.com>
AuthorDate: Wed Nov 17 11:19:51 2021 +0100
GitHub Actions prototype
---
.github/actions/worker-setup/action.yml | 55 ++++
.github/workflows/flink-ci-template.yml | 333 +++++++++++++++++++++
.../workflows/hadoop-2.8.3-scala-2.12-workflow.yml | 45 +++
tools/azure-pipelines/cache_docker_images.sh | 10 +-
tools/azure-pipelines/create_build_artifact.sh | 26 +-
tools/azure-pipelines/debug_files_utils.sh | 4 +
tools/azure-pipelines/unpack_build_artifact.sh | 18 +-
tools/azure-pipelines/uploading_watchdog.sh | 11 +
tools/ci/watchdog.sh | 2 +-
9 files changed, 490 insertions(+), 14 deletions(-)
diff --git a/.github/actions/worker-setup/action.yml b/.github/actions/worker-setup/action.yml
new file mode 100644
index 00000000000..3e609d769ef
--- /dev/null
+++ b/.github/actions/worker-setup/action.yml
@@ -0,0 +1,55 @@
+name: "Worker Setup"
+description: "Runs steps to set up the worker"
+
+inputs:
+ flink-checkout-folder:
+ description: "The Flink checkout folder"
+ required: true
+ jdk-version:
+ description: "JDK version to be installed"
+ required: true
+ maven-version:
+ description: "Maven version to be installed"
+ required: true
+ default: 3.2.5
+ ssl-enabled:
+ description: "Installs SSL"
+ required: false
+ initial-disk-cleanup:
+ description: "true, if a initial disk clean shall be performed"
+ required: false
+ additional-packages:
+ description: "APT packages that shall be installed in addition to the default onces"
+ required: false
+
+runs:
+ using: "composite"
+ steps:
+ - name: "Free up disk space"
+ if: inputs.initial-disk-cleanup == 'true'
+ working-directory: ${{ inputs.flink-checkout-folder }}
+ shell: bash
+ run: ./tools/azure-pipelines/free_disk_space.sh
+
+ # see https://github.com/actions/setup-java#supported-distributions
+ - name: "Set JDK ${{ inputs.jdk-version }}"
+ uses: actions/setup-java@v2
+ with:
+ distribution: "temurin"
+ java-version: ${{ inputs.jdk-version }}
+
+ - name: "Install Maven ${{ inputs.maven-version }}"
+ uses: stCarolas/setup-maven@v4.2
+ with:
+ maven-version: ${{ inputs.maven-version }}
+
+ - name: "Install required dependencies bc and libapr1"
+ shell: bash
+ run: sudo apt-get install -y bc libapr1 ${{ inputs.additional-packages }}
+
+ - name: "Install libssl1.0.0 for netty tcnative"
+ if: inputs.ssl-enabled == 'true'
+ shell: bash
+ run: |
+ wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb
+ sudo apt install ./libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb
diff --git a/.github/workflows/flink-ci-template.yml b/.github/workflows/flink-ci-template.yml
new file mode 100644
index 00000000000..f00ab83a0e3
--- /dev/null
+++ b/.github/workflows/flink-ci-template.yml
@@ -0,0 +1,333 @@
+# 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.
+
+name: "Build and Test Apache Flink"
+
+on:
+ workflow_call:
+ inputs:
+ environment:
+ description: "defines environment variables for downstream scripts"
+ required: true
+ type: string
+ jdk-version:
+ description: "the jdk version to use"
+ required: true
+ type: number
+ secrets:
+ s3_bucket:
+ required: false
+ s3_access_key:
+ required: false
+ s3_secret_key:
+ required: false
+ glue_schema_access_key:
+ required: false
+ glue_schema_secret_key:
+ required: false
+
+env:
+ FLINK_ARTIFACT_DIR: ${{ github.workspace }}/
+ FLINK_ARTIFACT_FILENAME: flink_artifacts.tar.gz
+ DOCKER_IMAGES_CACHE_FOLDER: ${{ github.workspace }}/.docker-cache
+ # The checkout directory needs to be changed for the Composite Github action usages below as
+ # well, if this env variable is modified
+ CHECKOUT_DIR: ${{ github.workspace }}/flink-checkout
+
+jobs:
+ compile:
+ name: "Compile"
+ runs-on: ubuntu-latest
+ timeout-minutes: 240
+ outputs:
+ stringified-workflow-name: ${{ steps.workflow-prep-step.outputs.stringified-workflow-name }}
+ steps:
+ - name: "Stringify workflow name"
+ id: workflow-prep-step
+ run: |
+ stringified_workflow_name=$(echo "${{ github.workflow }}" | tr -C '[:alnum:]._' '-' | tr '[:upper:]' '[:lower:]' | sed -e 's/--*/-/g' -e 's/^-*//g' -e 's/-*$//g')
+ echo "::set-output name=stringified-workflow-name::${stringified_workflow_name}"
+
+ - name: "Set JDK version"
+ run: |
+ echo "JAVA_HOME=$JAVA_HOME_${{inputs.jdk-version}}_X64" >> ${GITHUB_ENV}
+ echo "PATH=$JAVA_HOME_${{inputs.jdk-version}}_X64/bin:$PATH" >> ${GITHUB_ENV}
+
+ - name: "Flink Checkout"
+ uses: actions/checkout@v2
+ with:
+ path: ${{ env.CHECKOUT_DIR }}
+
+ - name: "Worker Setup"
+ uses: ./flink-checkout/.github/actions/worker-setup
+ with:
+ flink-checkout-folder: ${{ env.CHECKOUT_DIR }}
+ jdk-version: ${{ inputs.jdk-version }}
+
+ - name: "Compile Flink"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ run: |
+ ${{ inputs.environment }} ./tools/ci/compile.sh || exit $?
+
+ - name: "Collect build artifacts"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ run: ./tools/azure-pipelines/create_build_artifact.sh -f ${{ env.FLINK_ARTIFACT_DIR }}/${{ env.FLINK_ARTIFACT_FILENAME }}
+
+ - name: "Upload artifacts to make them available in downstream jobs"
+ uses: actions/upload-artifact@v2
+ with:
+ name: build-artifacts-${{ steps.workflow-prep-step.outputs.stringified-workflow-name }}-${{ github.run_number }}
+ path: ${{ env.FLINK_ARTIFACT_DIR }}${{ env.FLINK_ARTIFACT_FILENAME }}
+ if-no-files-found: error
+
+ test:
+ name: "Test (module: ${{ matrix.module }})"
+ needs: compile
+ runs-on: ubuntu-20.04
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - module: core
+ stringified-module-name: core
+ - module: python
+ stringified-module-name: python
+ - module: table
+ stringified-module-name: table
+ - module: connectors
+ stringified-module-name: connectors
+ - module: kafka/gelly
+ stringified-module-name: kafka-gelly
+ - module: tests
+ stringified-module-name: tests
+ - module: misc
+ stringified-module-name: misc
+ - module: finegrained_resource_management
+ stringified-module-name: finegrained_resource_management
+
+ steps:
+ - name: "Set JDK version"
+ run: |
+ echo "JAVA_HOME=$JAVA_HOME_${{inputs.jdk-version}}_X64" >> ${GITHUB_ENV}
+ echo "PATH=$JAVA_HOME_${{inputs.jdk-version}}_X64/bin:$PATH" >> ${GITHUB_ENV}
+
+ - name: "Flink Checkout"
+ uses: actions/checkout@v2
+ with:
+ path: ${{ env.CHECKOUT_DIR }}
+
+ - name: "Worker Setup"
+ uses: ./flink-checkout/.github/actions/worker-setup
+ with:
+ flink-checkout-folder: ${{ env.CHECKOUT_DIR }}
+ jdk-version: ${{ inputs.jdk-version }}
+ ssl-enabled: true
+ initial-disk-cleanup: true
+ additional-packages: "rename"
+
+ - name: "Set coredump pattern"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ run: sudo sysctl -w kernel.core_pattern=core.%p
+
+ - name: "Download build artifacts from compile job"
+ uses: actions/download-artifact@v2
+ with:
+ name: build-artifacts-${{ needs.compile.outputs.stringified-workflow-name }}-${{ github.run_number }}
+ path: ${{ env.FLINK_ARTIFACT_DIR }}
+
+ - name: "Unpack build artifact"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ run: ./tools/azure-pipelines/unpack_build_artifact.sh -f ${{ env.FLINK_ARTIFACT_DIR }}/${{ env.FLINK_ARTIFACT_FILENAME }} -t ${{ env.CHECKOUT_DIR }}
+
+ - name: "Try loading Docker images from Cache"
+ id: docker-cache
+ uses: actions/cache@v2
+ with:
+ path: ${{ env.DOCKER_IMAGES_CACHE_FOLDER }}
+ key: ${{ matrix.module }}-docker-${{ runner.os }}-${{ hashFiles('**/cache_docker_images.sh', '**/flink-test-utils-parent/**/DockerImageVersions.java') }}
+ restore-keys: ${{ matrix.module }}-docker-${{ runner.os }}
+
+ - name: "Load Docker images if not present in cache, yet"
+ if: ${{ !cancelled() && !steps.docker-cache.cache.hit }}
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ run: ./tools/azure-pipelines/cache_docker_images.sh -f ${{ env.DOCKER_IMAGES_CACHE_FOLDER }} load
+
+ - name: "Test - ${{ matrix.module }}"
+ id: test-run
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ env:
+ IT_CASE_S3_BUCKET: ${{ secrets.s3_bucket }}
+ IT_CASE_S3_ACCESS_KEY: ${{ secrets.s3_access_key }}
+ IT_CASE_S3_SECRET_KEY: ${{ secrets.s3_secret_key }}
+ IT_CASE_GLUE_SCHEMA_ACCESS_KEY: ${{ secrets.glue_schema_access_key }}
+ IT_CASE_GLUE_SCHEMA_SECRET_KEY: ${{ secrets.glue_schema_secret_key }}
+ timeout-minutes: 240
+ run: |
+ ${{ inputs.environment }} ./tools/azure-pipelines/uploading_watchdog.sh \
+ -a ${{ github.job }} \
+ -d ${{ env.FLINK_ARTIFACT_DIR }} \
+ -t 240 \
+ ./tools/ci/test_controller.sh ${{ matrix.module }}
+
+ - name: "Post-process build artifacts"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ run: find ${{ steps.test-run.outputs.debug-files-output-dir }} -type f -exec rename 's/[:<>|*?]/-/' {} \;
+
+ - name: "Upload build artifacts"
+ uses: actions/upload-artifact@v2
+ if: ${{ failure() && steps.test-run.outputs.debug-files-output-dir }} != ''
+ with:
+ name: logs-test-${{ needs.compile.outputs.stringified-workflow-name }}-${{ github.run_number }}-${{ matrix.stringified-module-name }}-${{ steps.test-run.outputs.debug-files-name }}
+ path: ${{ steps.test-run.outputs.debug-files-output-dir }}
+
+ - name: "Save Docker images to cache"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ if: ${{ !cancelled() && (failure() || !steps.docker-cache.cache.hit) }}
+ run: ./tools/azure-pipelines/cache_docker_images.sh -f ${{ env.DOCKER_IMAGES_CACHE_FOLDER }} save
+
+ e2e-prereq-check:
+ name: "Check: Code modified"
+ needs: compile
+ runs-on: ubuntu-latest
+ outputs:
+ skip-e2e: ${{ steps.docs-only-pr-check.skip-e2e }}
+ steps:
+ - name: "Flink Checkout"
+ uses: actions/checkout@v2
+ with:
+ path: ${{ env.CHECKOUT_DIR }}
+
+ # Skip e2e test execution if this is a documentation only pull request (master / release builds will still be checked regularly)
+ - name: "Check if it's a docs-only PR (i.e. e2e tests can be skipped)"
+ id: docs-only-pr-check
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ run: |
+ source ./tools/azure-pipelines/build_properties.sh
+ if is_docs_only_pullrequest; then
+ echo "This is a documentation-only change. Skipping e2e execution."
+ echo "::set-output name=skip-e2e::true"
+ else
+ echo "This is a regular CI build. Continuing ..."
+ fi
+ shell: bash
+
+ e2e:
+ name: "E2E (group ${{ matrix.group }})"
+ needs: [compile, e2e-prereq-check]
+ runs-on: ubuntu-20.04
+ if: ${{ needs.e2e-prereq-check.outputs.skip-e2e != 'true' }}
+ timeout-minutes: 310
+ env:
+ E2E_CACHE_FOLDER: ${{ github.workspace }}/.e2e-cache
+ E2E_TARBALL_CACHE: ${{ github.workspace }}/.e2e-tarbal-cache
+ strategy:
+ fail-fast: false
+ matrix:
+ group: [1, 2]
+
+ steps:
+ - name: "Set JDK version"
+ run: |
+ echo "JAVA_HOME=$JAVA_HOME_${{inputs.jdk-version}}_X64" >> ${GITHUB_ENV}
+ echo "PATH=$JAVA_HOME_${{inputs.jdk-version}}_X64/bin:$PATH" >> ${GITHUB_ENV}
+
+ - name: "Flink Checkout"
+ uses: actions/checkout@v2
+ with:
+ path: ${{ env.CHECKOUT_DIR }}
+
+ - name: "Worker Setup"
+ uses: ./flink-checkout/.github/actions/worker-setup
+ with:
+ flink-checkout-folder: ${{ env.CHECKOUT_DIR }}
+ jdk-version: ${{ inputs.jdk-version }}
+ ssl-enabled: true
+ initial-disk-cleanup: true
+
+ - name: "Download build artifacts from compile job"
+ uses: actions/download-artifact@v2
+ with:
+ name: build-artifacts-${{ needs.compile.outputs.stringified-workflow-name }}-${{ github.run_number }}
+ path: ${{ env.FLINK_ARTIFACT_DIR }}
+
+ - name: "Unpack build artifact"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ run: ./tools/azure-pipelines/unpack_build_artifact.sh -f ${{ env.FLINK_ARTIFACT_DIR }}/${{ env.FLINK_ARTIFACT_FILENAME }} -t ${{ env.CHECKOUT_DIR }}
+
+ # the cache task does not create directories on a cache miss, and can later fail when trying to tar the directory if the test haven't created it
+ # this may for example happen if a given directory is only used by a subset of tests, which are run in a different 'group'
+ - name: "Create cache directories"
+ run: |
+ mkdir -p ${{ env.E2E_CACHE_FOLDER }}
+ mkdir -p ${{ env.E2E_TARBALL_CACHE }}
+ mkdir -p ${{ env.DOCKER_IMAGES_CACHE_FOLDER }}
+
+ - name: "Load E2E files from Cache"
+ uses: actions/cache@v2
+ with:
+ path: ${{ env.E2E_CACHE_FOLDER }}
+ key: e2e-cache-${{ matrix.group }}-${{ hashFiles('**/flink-end-to-end-tests/**/*.java', '!**/avro/**') }}
+
+ - name: "Load E2E artifacts from Cache"
+ uses: actions/cache@v2
+ with:
+ path: ${{ env.E2E_TARBALL_CACHE }}
+ key: e2e-artifact-cache-${{ matrix.group }}-${{ hashFiles('**/flink-end-to-end-tests/**/*.sh') }}
+ restore-keys: e2e-artifact-cache-${{ matrix.group }}
+
+ - name: "Try loading Docker images from Cache"
+ id: docker-cache
+ uses: actions/cache@v2
+ with:
+ path: ${{ env.DOCKER_IMAGES_CACHE_FOLDER }}
+ key: e2e-${{ matrix.group }}-docker-${{ runner.os }}-${{ hashFiles('**/cache_docker_images.sh', '**/flink-test-utils-parent/**/DockerImageVersions.java') }}
+
+ - name: "Load Docker images if not present in Cache, yet"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ if: ${{ !cancelled() && !steps.docker-cache.cache.hit }}
+ run: ./tools/azure-pipelines/cache_docker_images.sh -f ${{ env.DOCKER_IMAGES_CACHE_FOLDER }} load
+
+ - name: "Build Flink"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ run: ${{ inputs.environment }} ./tools/ci/validate.sh "install -DskipTests -Dfast $PROFILE -Pskip-webui-build"
+
+ - name: "Run E2E Tests"
+ id: test-run
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ env:
+ IT_CASE_S3_BUCKET: ${{ secrets.s3_bucket }}
+ IT_CASE_S3_ACCESS_KEY: ${{ secrets.s3_access_key }}
+ IT_CASE_S3_SECRET_KEY: ${{ secrets.s3_secret_key }}
+ IT_CASE_GLUE_SCHEMA_ACCESS_KEY: ${{ secrets.glue_schema_access_key }}
+ IT_CASE_GLUE_SCHEMA_SECRET_KEY: ${{ secrets.glue_schema_secret_key }}
+ timeout-minutes: 310
+ run: |
+ ${{ inputs.environment }} FLINK_DIR=`pwd`/build-target ./tools/azure-pipelines/uploading_watchdog.sh \
+ -a ${{ github.job }} \
+ -d ${{ env.FLINK_ARTIFACT_DIR }} \
+ -t 310 \
+ flink-end-to-end-tests/run-nightly-tests.sh ${{ matrix.group }}
+
+ - name: "Upload Logs"
+ uses: actions/upload-artifact@v2
+ if: ${{ failure() && steps.test-run.outputs.debug-files-output-dir }} != ''
+ with:
+ name: logs-e2e-${{ needs.compile.outputs.stringified-workflow-name }}-${{ github.run_number }}-${{ matrix.group }}-${{ steps.test-run.outputs.debug-files-name }}
+ path: ${{ steps.test-run.outputs.debug-files-output-dir }}
+
+ - name: "Save Docker images to Cache"
+ working-directory: ${{ env.CHECKOUT_DIR }}
+ if: ${{ !cancelled() && (failure() || !steps.docker-cache.cache.hit) }}
+ run: ./tools/azure-pipelines/cache_docker_images.sh -f ${{ env.DOCKER_IMAGES_CACHE_FOLDER }} save
diff --git a/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml b/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml
new file mode 100644
index 00000000000..e87b92a29b8
--- /dev/null
+++ b/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml
@@ -0,0 +1,45 @@
+# 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.
+
+name: "Hadoop 2.8.3/Java 8/Scala 2.12"
+
+on: [push, workflow_dispatch]
+
+jobs:
+ ci:
+ uses: ./.github/workflows/flink-ci-template.yml
+ with:
+ environment: 'PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.12"'
+ jdk-version: 8
+ secrets:
+ s3_bucket: ${{ secrets.IT_CASE_S3_BUCKET }}
+ s3_access_key: ${{ secrets.IT_CASE_S3_ACCESS_KEY }}
+ s3_secret_key: ${{ secrets.IT_CASE_S3_SECRET_KEY }}
+ glue_schema_access_key: ${{ secrets.IT_CASE_GLUE_SCHEMA_ACCESS_KEY }}
+ glue_schema_secret_key: ${{ secrets.IT_CASE_GLUE_SCHEMA_SECRET_KEY }}
+ docs-404-check:
+ runs-on: ubuntu-latest
+ steps:
+ - name: "Checks out Flink"
+ uses: actions/checkout@v2
+
+ - name: "Check if PR contains docs change"
+ run: |
+ source ./tools/azure-pipelines/build_properties.sh
+ pr_contains_docs_changes
+ shell: bash
+
+ - name: "Builds docs"
+ run: ./tools/ci/docs.sh
diff --git a/tools/azure-pipelines/cache_docker_images.sh b/tools/azure-pipelines/cache_docker_images.sh
index 78d31a56901..42414b044c0 100755
--- a/tools/azure-pipelines/cache_docker_images.sh
+++ b/tools/azure-pipelines/cache_docker_images.sh
@@ -21,6 +21,14 @@
# includes testcontainer images, kafka, elasticearch, etc.
#
+while getopts "f:" o; do
+ case "${o}" in
+ f)
+ DOCKER_IMAGES_CACHE_FOLDER=${OPTARG};;
+ esac
+done
+shift $((OPTIND-1))
+
if [ -z "${DOCKER_IMAGES_CACHE_FOLDER:-}" ]
then
echo "\$DOCKER_IMAGES_CACHE_FOLDER must be set to cache the testing docker images. Exiting"
@@ -36,7 +44,7 @@ DOCKER_IMAGES_CACHE_PATH="${DOCKER_IMAGES_CACHE_FOLDER}/cache.tar"
helpFunction()
{
echo ""
- echo "Usage: $0 MODE"
+ echo "Usage: $0 [-f <folder>] MODE"
echo -e "\tMODE :: What mode to run the script in (either save or load)"
exit 1
}
diff --git a/tools/azure-pipelines/create_build_artifact.sh b/tools/azure-pipelines/create_build_artifact.sh
index 809d14fe651..ccadb14ed14 100755
--- a/tools/azure-pipelines/create_build_artifact.sh
+++ b/tools/azure-pipelines/create_build_artifact.sh
@@ -17,9 +17,16 @@
# limitations under the License.
################################################################################
-echo "Creating build artifact dir $FLINK_ARTIFACT_DIR"
-
-cp -r . "$FLINK_ARTIFACT_DIR"
+while getopts "f:" o; do
+ case "${o}" in
+ f)
+ FLINK_ARTIFACT_DIR=${OPTARG};;
+ *)
+ # no special treatment of invalid parameters necessary
+ ;;
+ esac
+done
+shift $((OPTIND-1))
echo "Minimizing artifact files"
@@ -28,20 +35,21 @@ echo "Minimizing artifact files"
# by removing files not required for subsequent stages
# jars are re-built in subsequent stages, so no need to cache them (cannot be avoided)
-find "$FLINK_ARTIFACT_DIR" -maxdepth 8 -type f -name '*.jar' | xargs rm -rf
+find . -maxdepth 8 -type f -name '*.jar' -exec rm -rf {} \;
# .git directory
# not deleting this can cause build stability issues
# merging the cached version sometimes fails
-rm -rf "$FLINK_ARTIFACT_DIR/.git"
+rm -rf "./.git"
# AZ Pipelines has a problem with links.
-rm "$FLINK_ARTIFACT_DIR/build-target"
+rm "./build-target"
# Remove javadocs because they are not used in later stages
-rm -rf "$FLINK_ARTIFACT_DIR/target/site"
+rm -rf "./target/site"
# Remove WebUI node directories; unnecessary because the UI is already fully built
-rm -rf "$FLINK_ARTIFACT_DIR/flink-runtime-web/web-dashboard/node"
-rm -rf "$FLINK_ARTIFACT_DIR/flink-runtime-web/web-dashboard/node_modules"
+rm -rf "./flink-runtime-web/web-dashboard/node"
+rm -rf "./flink-runtime-web/web-dashboard/node_modules"
+tar -c -z --exclude ${FLINK_ARTIFACT_DIR} -f ${FLINK_ARTIFACT_DIR} .
diff --git a/tools/azure-pipelines/debug_files_utils.sh b/tools/azure-pipelines/debug_files_utils.sh
index 50c1b4c5a4d..f5fe2d5c0ce 100755
--- a/tools/azure-pipelines/debug_files_utils.sh
+++ b/tools/azure-pipelines/debug_files_utils.sh
@@ -21,7 +21,11 @@ function prepare_debug_files {
MODULE=$@
export DEBUG_FILES_OUTPUT_DIR="$AGENT_TEMPDIRECTORY/debug_files"
export DEBUG_FILES_NAME="$(echo $MODULE | tr -c '[:alnum:]\n\r' '_')-$(date +%s)"
+ # make environment variables available in AzureCI workflow configurations
echo "##vso[task.setvariable variable=DEBUG_FILES_OUTPUT_DIR]$DEBUG_FILES_OUTPUT_DIR"
echo "##vso[task.setvariable variable=DEBUG_FILES_NAME]$DEBUG_FILES_NAME"
+ # make environment variables available in Github Actions workflow configuration
+ echo "::set-output name=debug-files-output-dir::${DEBUG_FILES_OUTPUT_DIR}"
+ echo "::set-output name=debug-files-name::${DEBUG_FILES_NAME}"
mkdir -p $DEBUG_FILES_OUTPUT_DIR || { echo "FAILURE: cannot create debug files directory '${DEBUG_FILES_OUTPUT_DIR}'." ; exit 1; }
}
diff --git a/tools/azure-pipelines/unpack_build_artifact.sh b/tools/azure-pipelines/unpack_build_artifact.sh
index 15d5c7c1057..ab012170b23 100755
--- a/tools/azure-pipelines/unpack_build_artifact.sh
+++ b/tools/azure-pipelines/unpack_build_artifact.sh
@@ -17,14 +17,26 @@
# limitations under the License.
################################################################################
+while getopts "f:t:" o; do
+ case "${o}" in
+ f)
+ FLINK_ARTIFACT_DIR=${OPTARG};;
+ t)
+ TARGET_FOLDER_PARAMETER="-C ${OPTARG}";;
+ *)
+ # no special treatment of invalid parameters necessary
+ ;;
+ esac
+done
+shift $((OPTIND-1))
if ! [ -e $FLINK_ARTIFACT_DIR ]; then
- echo "Cached flink dir $FLINK_ARTIFACT_DIR does not exist. Exiting build."
+ echo "Cached flink archive $FLINK_ARTIFACT_DIR does not exist. Exiting build."
exit 1
fi
-echo "Merging cache"
-cp -RT "$FLINK_ARTIFACT_DIR" "."
+echo "Extracting build artifacts"
+tar -xzf ${FLINK_ARTIFACT_DIR} ${TARGET_FOLDER_PARAMETER}
echo "Adjusting timestamps"
# adjust timestamps of proto file to avoid re-generation
diff --git a/tools/azure-pipelines/uploading_watchdog.sh b/tools/azure-pipelines/uploading_watchdog.sh
index c49f093200a..58509e2e3a1 100755
--- a/tools/azure-pipelines/uploading_watchdog.sh
+++ b/tools/azure-pipelines/uploading_watchdog.sh
@@ -19,6 +19,17 @@
# b) It prints a warning if the test has reached 80% of it's execution time
# c) N minutes before the end of the execution time, it will start uploading the current output as azure artifacts
+while getopts 'a:d:t:' flag; do
+ case "${flag}" in
+ a) export AGENT_JOBNAME="$OPTARG";;
+ d) export AGENT_TEMPDIRECTORY="$OPTARG";;
+ t) export SYSTEM_JOBTIMEOUT="$OPTARG";;
+ *) echo "Wrong parameter passed. $OPTARG";;
+ esac
+done
+
+shift "$((OPTIND-1))"
+
COMMAND=$@
HERE="`dirname \"$0\"`" # relative
diff --git a/tools/ci/watchdog.sh b/tools/ci/watchdog.sh
index 1c069e38840..4485501dfca 100755
--- a/tools/ci/watchdog.sh
+++ b/tools/ci/watchdog.sh
@@ -23,7 +23,7 @@
#
# Number of seconds w/o output before printing a stack trace and killing the watched process
-MAX_NO_OUTPUT=${MAX_NO_OUTPUT:-900}
+MAX_NO_OUTPUT=${MAX_NO_OUTPUT:-1800}
# Number of seconds to sleep before checking the output again
SLEEP_TIME=${SLEEP_TIME:-20}
[flink] 12/23: Mark TaskExecutorRecoveryTest as an ITCase due to memory consumption and starting up TaskManagers
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 7bd98131c592d67dc58ea5b474fb14b4c7cdfe80
Author: Piotr Nowojski <pi...@gmail.com>
AuthorDate: Wed Mar 30 15:38:33 2022 +0200
Mark TaskExecutorRecoveryTest as an ITCase due to memory consumption and starting up TaskManagers
---
.../{TaskExecutorRecoveryTest.java => TaskExecutorRecoveryITCase.java} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorRecoveryTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorRecoveryITCase.java
similarity index 99%
rename from flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorRecoveryTest.java
rename to flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorRecoveryITCase.java
index 86831826ded..7a07e8a38a6 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorRecoveryTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorRecoveryITCase.java
@@ -58,7 +58,7 @@ import static org.hamcrest.Matchers.nullValue;
/** Recovery tests for {@link TaskExecutor}. */
@ExtendWith(TestLoggerExtension.class)
-class TaskExecutorRecoveryTest {
+class TaskExecutorRecoveryITCase {
private final TestingRpcServiceExtension rpcServiceExtension = new TestingRpcServiceExtension();
@RegisterExtension
[flink] 14/23: Fix es e2e test
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit ebcb5e1ac0085819b14dee38b240d3064ff82d6c
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Thu Mar 31 17:34:54 2022 +0200
Fix es e2e test
---
flink-end-to-end-tests/test-scripts/elasticsearch-common.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/flink-end-to-end-tests/test-scripts/elasticsearch-common.sh b/flink-end-to-end-tests/test-scripts/elasticsearch-common.sh
index 35fd551f6a7..878567439d3 100644
--- a/flink-end-to-end-tests/test-scripts/elasticsearch-common.sh
+++ b/flink-end-to-end-tests/test-scripts/elasticsearch-common.sh
@@ -50,8 +50,14 @@ function setup_elasticsearch {
echo xpack.ml.enabled: false >> $elasticsearchDir/config/elasticsearch.yml
fi
+ adduser --disabled-password --gecos "" elasticsearch || true
+ chown -R elasticsearch $elasticsearchDir
+ chmod -R 755 /root
+
# start Elasticsearch cluster
- $elasticsearchDir/bin/elasticsearch &
+ pushd $elasticsearchDir
+ su -c "bash -x bin/elasticsearch" elasticsearch &
+ popd
}
function wait_elasticsearch_working {
[flink] 15/23: MOve docker tests into separate group
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit c0a3ccd3c2203541d49b8df944c55118535a8c87
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Fri Apr 1 08:50:09 2022 +0200
MOve docker tests into separate group
---
flink-end-to-end-tests/run-nightly-tests.sh | 71 +++++++++++++++--------------
1 file changed, 37 insertions(+), 34 deletions(-)
diff --git a/flink-end-to-end-tests/run-nightly-tests.sh b/flink-end-to-end-tests/run-nightly-tests.sh
index 20c4aa142e9..a0a8678df6e 100755
--- a/flink-end-to-end-tests/run-nightly-tests.sh
+++ b/flink-end-to-end-tests/run-nightly-tests.sh
@@ -122,40 +122,6 @@ function run_group_1 {
run_test "RocksDB Memory Management end-to-end test" "$END_TO_END_DIR/test-scripts/test_rocksdb_state_memory_control.sh"
- ################################################################################
- # Docker / Container / Kubernetes tests
- ################################################################################
-
- if [[ ${PROFILE} != *"enable-adaptive-scheduler"* ]]; then
- run_test "Wordcount on Docker test (custom fs plugin)" "$END_TO_END_DIR/test-scripts/test_docker_embedded_job.sh dummy-fs"
-
- run_test "Run Kubernetes test" "$END_TO_END_DIR/test-scripts/test_kubernetes_embedded_job.sh"
- run_test "Run kubernetes session test (default input)" "$END_TO_END_DIR/test-scripts/test_kubernetes_session.sh"
- run_test "Run kubernetes session test (custom fs plugin)" "$END_TO_END_DIR/test-scripts/test_kubernetes_session.sh dummy-fs"
- run_test "Run kubernetes application test" "$END_TO_END_DIR/test-scripts/test_kubernetes_application.sh"
- run_test "Run kubernetes application HA test" "$END_TO_END_DIR/test-scripts/test_kubernetes_application_ha.sh"
- run_test "Run Kubernetes IT test" "$END_TO_END_DIR/test-scripts/test_kubernetes_itcases.sh"
-
- run_test "Running Flink over NAT end-to-end test" "$END_TO_END_DIR/test-scripts/test_nat.sh" "skip_check_exceptions"
-
- if [[ `uname -i` != 'aarch64' ]]; then
- # Skip PyFlink e2e test, because MiniConda and Pyarrow which Pyflink depends doesn't support aarch64 currently.
- run_test "Run kubernetes pyflink application test" "$END_TO_END_DIR/test-scripts/test_kubernetes_pyflink_application.sh"
-
- # Hadoop YARN deosn't support aarch64 at this moment. See: https://issues.apache.org/jira/browse/HADOOP-16723
- # These tests are known to fail on JDK11. See FLINK-13719
- if [[ ${PROFILE} != *"jdk11"* ]]; then
- run_test "Running Kerberized YARN per-job on Docker test (default input)" "$END_TO_END_DIR/test-scripts/test_yarn_job_kerberos_docker.sh"
- run_test "Running Kerberized YARN per-job on Docker test (custom fs plugin)" "$END_TO_END_DIR/test-scripts/test_yarn_job_kerberos_docker.sh dummy-fs"
- run_test "Running Kerberized YARN application on Docker test (default input)" "$END_TO_END_DIR/test-scripts/test_yarn_application_kerberos_docker.sh"
- run_test "Running Kerberized YARN application on Docker test (custom fs plugin)" "$END_TO_END_DIR/test-scripts/test_yarn_application_kerberos_docker.sh dummy-fs"
- fi
-
- # `google/cloud-sdk` docker image doesn't support aarch64 currently.
- run_test "Test PubSub connector with Docker based Google PubSub Emulator" "$END_TO_END_DIR/test-scripts/test_streaming_gcp_pubsub.sh"
- fi
- fi
-
################################################################################
# High Availability
################################################################################
@@ -268,6 +234,43 @@ function run_group_2 {
EXIT_CODE=$?
}
+function run_group_3 {
+ ################################################################################
+ # Docker / Container / Kubernetes tests
+ ################################################################################
+
+ if [[ ${PROFILE} != *"enable-adaptive-scheduler"* ]]; then
+ run_test "Wordcount on Docker test (custom fs plugin)" "$END_TO_END_DIR/test-scripts/test_docker_embedded_job.sh dummy-fs"
+
+ run_test "Run Kubernetes test" "$END_TO_END_DIR/test-scripts/test_kubernetes_embedded_job.sh"
+ run_test "Run kubernetes session test (default input)" "$END_TO_END_DIR/test-scripts/test_kubernetes_session.sh"
+ run_test "Run kubernetes session test (custom fs plugin)" "$END_TO_END_DIR/test-scripts/test_kubernetes_session.sh dummy-fs"
+ run_test "Run kubernetes application test" "$END_TO_END_DIR/test-scripts/test_kubernetes_application.sh"
+ run_test "Run kubernetes application HA test" "$END_TO_END_DIR/test-scripts/test_kubernetes_application_ha.sh"
+ run_test "Run Kubernetes IT test" "$END_TO_END_DIR/test-scripts/test_kubernetes_itcases.sh"
+
+ run_test "Running Flink over NAT end-to-end test" "$END_TO_END_DIR/test-scripts/test_nat.sh" "skip_check_exceptions"
+
+ if [[ `uname -i` != 'aarch64' ]]; then
+ # Skip PyFlink e2e test, because MiniConda and Pyarrow which Pyflink depends doesn't support aarch64 currently.
+ run_test "Run kubernetes pyflink application test" "$END_TO_END_DIR/test-scripts/test_kubernetes_pyflink_application.sh"
+
+ # Hadoop YARN deosn't support aarch64 at this moment. See: https://issues.apache.org/jira/browse/HADOOP-16723
+ # These tests are known to fail on JDK11. See FLINK-13719
+ if [[ ${PROFILE} != *"jdk11"* ]]; then
+ run_test "Running Kerberized YARN per-job on Docker test (default input)" "$END_TO_END_DIR/test-scripts/test_yarn_job_kerberos_docker.sh"
+ run_test "Running Kerberized YARN per-job on Docker test (custom fs plugin)" "$END_TO_END_DIR/test-scripts/test_yarn_job_kerberos_docker.sh dummy-fs"
+ run_test "Running Kerberized YARN application on Docker test (default input)" "$END_TO_END_DIR/test-scripts/test_yarn_application_kerberos_docker.sh"
+ run_test "Running Kerberized YARN application on Docker test (custom fs plugin)" "$END_TO_END_DIR/test-scripts/test_yarn_application_kerberos_docker.sh dummy-fs"
+ fi
+
+ # `google/cloud-sdk` docker image doesn't support aarch64 currently.
+ run_test "Test PubSub connector with Docker based Google PubSub Emulator" "$END_TO_END_DIR/test-scripts/test_streaming_gcp_pubsub.sh"
+ fi
+ fi
+
+}
+
if [ "$1" == "1" ]; then
run_group_1
elif [ "$1" == "2" ]; then
[flink] 20/23: always run license checks
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit e06ac301c9f2ad588a62cfe57355691bd4a93608
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Sun Apr 3 10:14:33 2022 +0200
always run license checks
---
.github/workflows/flink-ci-template.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/flink-ci-template.yml b/.github/workflows/flink-ci-template.yml
index 1040e2947c9..17cca7c11cc 100644
--- a/.github/workflows/flink-ci-template.yml
+++ b/.github/workflows/flink-ci-template.yml
@@ -68,6 +68,7 @@ jobs:
${{ inputs.environment }} ./tools/ci/validate.sh "checkstyle:check spotless:check -T2" || exit $?
- name: "License Headers"
+ if: (success() || failure())
run: |
${{ inputs.environment }} ./tools/ci/validate.sh "org.apache.rat:apache-rat-plugin:check -N" || exit $?
[flink] 06/23: Use docker
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit a6e86bd346e9e8b4cebcd1e6907b4fe340c5dd9e
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue Mar 29 15:45:22 2022 +0200
Use docker
---
.github/actions/worker-setup/action.yml | 55 ----------------------
.github/workflows/flink-ci-template.yml | 39 ++++++---------
.../workflows/hadoop-2.8.3-scala-2.12-workflow.yml | 2 +
3 files changed, 16 insertions(+), 80 deletions(-)
diff --git a/.github/actions/worker-setup/action.yml b/.github/actions/worker-setup/action.yml
deleted file mode 100644
index 3e609d769ef..00000000000
--- a/.github/actions/worker-setup/action.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-name: "Worker Setup"
-description: "Runs steps to set up the worker"
-
-inputs:
- flink-checkout-folder:
- description: "The Flink checkout folder"
- required: true
- jdk-version:
- description: "JDK version to be installed"
- required: true
- maven-version:
- description: "Maven version to be installed"
- required: true
- default: 3.2.5
- ssl-enabled:
- description: "Installs SSL"
- required: false
- initial-disk-cleanup:
- description: "true, if a initial disk clean shall be performed"
- required: false
- additional-packages:
- description: "APT packages that shall be installed in addition to the default onces"
- required: false
-
-runs:
- using: "composite"
- steps:
- - name: "Free up disk space"
- if: inputs.initial-disk-cleanup == 'true'
- working-directory: ${{ inputs.flink-checkout-folder }}
- shell: bash
- run: ./tools/azure-pipelines/free_disk_space.sh
-
- # see https://github.com/actions/setup-java#supported-distributions
- - name: "Set JDK ${{ inputs.jdk-version }}"
- uses: actions/setup-java@v2
- with:
- distribution: "temurin"
- java-version: ${{ inputs.jdk-version }}
-
- - name: "Install Maven ${{ inputs.maven-version }}"
- uses: stCarolas/setup-maven@v4.2
- with:
- maven-version: ${{ inputs.maven-version }}
-
- - name: "Install required dependencies bc and libapr1"
- shell: bash
- run: sudo apt-get install -y bc libapr1 ${{ inputs.additional-packages }}
-
- - name: "Install libssl1.0.0 for netty tcnative"
- if: inputs.ssl-enabled == 'true'
- shell: bash
- run: |
- wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb
- sudo apt install ./libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb
diff --git a/.github/workflows/flink-ci-template.yml b/.github/workflows/flink-ci-template.yml
index f00ab83a0e3..af080f3d162 100644
--- a/.github/workflows/flink-ci-template.yml
+++ b/.github/workflows/flink-ci-template.yml
@@ -50,6 +50,9 @@ jobs:
compile:
name: "Compile"
runs-on: ubuntu-latest
+ container:
+ image: chesnay/flink-ci:java_8_11_xenial
+ options: --init
timeout-minutes: 240
outputs:
stringified-workflow-name: ${{ steps.workflow-prep-step.outputs.stringified-workflow-name }}
@@ -70,12 +73,6 @@ jobs:
with:
path: ${{ env.CHECKOUT_DIR }}
- - name: "Worker Setup"
- uses: ./flink-checkout/.github/actions/worker-setup
- with:
- flink-checkout-folder: ${{ env.CHECKOUT_DIR }}
- jdk-version: ${{ inputs.jdk-version }}
-
- name: "Compile Flink"
working-directory: ${{ env.CHECKOUT_DIR }}
run: |
@@ -95,7 +92,10 @@ jobs:
test:
name: "Test (module: ${{ matrix.module }})"
needs: compile
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
+ container:
+ image: chesnay/flink-ci:java_8_11_xenial
+ options: --init
strategy:
fail-fast: false
matrix:
@@ -128,15 +128,6 @@ jobs:
with:
path: ${{ env.CHECKOUT_DIR }}
- - name: "Worker Setup"
- uses: ./flink-checkout/.github/actions/worker-setup
- with:
- flink-checkout-folder: ${{ env.CHECKOUT_DIR }}
- jdk-version: ${{ inputs.jdk-version }}
- ssl-enabled: true
- initial-disk-cleanup: true
- additional-packages: "rename"
-
- name: "Set coredump pattern"
working-directory: ${{ env.CHECKOUT_DIR }}
run: sudo sysctl -w kernel.core_pattern=core.%p
@@ -201,6 +192,9 @@ jobs:
name: "Check: Code modified"
needs: compile
runs-on: ubuntu-latest
+ container:
+ image: chesnay/flink-ci:java_8_11_xenial
+ options: --init
outputs:
skip-e2e: ${{ steps.docs-only-pr-check.skip-e2e }}
steps:
@@ -226,7 +220,10 @@ jobs:
e2e:
name: "E2E (group ${{ matrix.group }})"
needs: [compile, e2e-prereq-check]
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
+ container:
+ image: chesnay/flink-ci:java_8_11_xenial
+ options: --init
if: ${{ needs.e2e-prereq-check.outputs.skip-e2e != 'true' }}
timeout-minutes: 310
env:
@@ -248,14 +245,6 @@ jobs:
with:
path: ${{ env.CHECKOUT_DIR }}
- - name: "Worker Setup"
- uses: ./flink-checkout/.github/actions/worker-setup
- with:
- flink-checkout-folder: ${{ env.CHECKOUT_DIR }}
- jdk-version: ${{ inputs.jdk-version }}
- ssl-enabled: true
- initial-disk-cleanup: true
-
- name: "Download build artifacts from compile job"
uses: actions/download-artifact@v2
with:
diff --git a/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml b/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml
index e87b92a29b8..d0d7c99fc73 100644
--- a/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml
+++ b/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml
@@ -31,6 +31,8 @@ jobs:
glue_schema_secret_key: ${{ secrets.IT_CASE_GLUE_SCHEMA_SECRET_KEY }}
docs-404-check:
runs-on: ubuntu-latest
+ container:
+ image: chesnay/flink-ci:java_8_11_xenial
steps:
- name: "Checks out Flink"
uses: actions/checkout@v2
[flink] 23/23: Use self-hosted runners
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 7cee4135587ce68cbbfda12852f7446545d854ee
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue Apr 5 17:22:17 2022 +0200
Use self-hosted runners
---
.github/workflows/docs.yml | 2 +-
.github/workflows/flink-ci-template.yml | 12 ++++++------
.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 9d1d59a7e70..8ec9edb557e 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -21,7 +21,7 @@ on:
jobs:
build-documentation:
if: github.repository == 'apache/flink'
- runs-on: ubuntu-latest
+ runs-on: self-hosted
strategy:
max-parallel: 1
matrix:
diff --git a/.github/workflows/flink-ci-template.yml b/.github/workflows/flink-ci-template.yml
index dcaa6bcae1f..d57cef3166f 100644
--- a/.github/workflows/flink-ci-template.yml
+++ b/.github/workflows/flink-ci-template.yml
@@ -50,7 +50,7 @@ env:
jobs:
qa:
name: "Basic QA"
- runs-on: ubuntu-latest
+ runs-on: self-hosted
container:
image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
@@ -74,7 +74,7 @@ jobs:
compile:
name: "Compile"
- runs-on: ubuntu-latest
+ runs-on: self-hosted
container:
image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
@@ -123,7 +123,7 @@ jobs:
packaging:
name: "Test packaging/licensing"
needs: compile
- runs-on: ubuntu-latest
+ runs-on: self-hosted
container:
image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
@@ -164,7 +164,7 @@ jobs:
test:
name: "Test (module: ${{ matrix.module }})"
needs: compile
- runs-on: ubuntu-latest
+ runs-on: self-hosted
container:
image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
@@ -270,7 +270,7 @@ jobs:
e2e-prereq-check:
name: "Check: Code modified"
needs: compile
- runs-on: ubuntu-latest
+ runs-on: self-hosted
container:
image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
@@ -299,7 +299,7 @@ jobs:
e2e:
name: "E2E (group ${{ matrix.group }})"
needs: [compile, e2e-prereq-check]
- runs-on: ubuntu-latest
+ runs-on: self-hosted
container:
image: chesnay/flink-ci:java_8_11_xenial_m2
options: --init
diff --git a/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml b/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml
index a118376730f..f5a847bb910 100644
--- a/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml
+++ b/.github/workflows/hadoop-2.8.3-scala-2.12-workflow.yml
@@ -30,7 +30,7 @@ jobs:
glue_schema_access_key: ${{ secrets.IT_CASE_GLUE_SCHEMA_ACCESS_KEY }}
glue_schema_secret_key: ${{ secrets.IT_CASE_GLUE_SCHEMA_SECRET_KEY }}
docs-404-check:
- runs-on: ubuntu-latest
+ runs-on: self-hosted
container:
image: chesnay/flink-ci:java_8_11_xenial
steps:
[flink] 18/23: notice checker hardening
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch exp_github_actions
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 343e4233bfe1fbe05f88d2c92bf8c692714db4de
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Sat Apr 2 11:03:17 2022 +0200
notice checker hardening
---
.../java/org/apache/flink/tools/ci/licensecheck/NoticeFileChecker.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/ci/java-ci-tools/src/main/java/org/apache/flink/tools/ci/licensecheck/NoticeFileChecker.java b/tools/ci/java-ci-tools/src/main/java/org/apache/flink/tools/ci/licensecheck/NoticeFileChecker.java
index 72830d76f14..475aff153cb 100644
--- a/tools/ci/java-ci-tools/src/main/java/org/apache/flink/tools/ci/licensecheck/NoticeFileChecker.java
+++ b/tools/ci/java-ci-tools/src/main/java/org/apache/flink/tools/ci/licensecheck/NoticeFileChecker.java
@@ -216,7 +216,8 @@ public class NoticeFileChecker {
.filter(
file -> {
int nameCount = file.getNameCount();
- return file.getName(nameCount - 3).toString().equals("resources")
+ return nameCount >= 3
+ && file.getName(nameCount - 3).toString().equals("resources")
&& file.getName(nameCount - 2).toString().equals("META-INF")
&& file.getName(nameCount - 1).toString().equals("NOTICE");
})