Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/dev/table/streaming/match_recognize.md
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ use [time attributes](time_attributes.html). To select those there are available
<td><p>Returns the timestamp of the last row that was mapped to the given pattern.</p>
<p>The resulting attribute is a <a href="time_attributes.html">rowtime attribute</a>
that can be used in subsequent time-based operations such as
<a href="#joins">interval joins</a> and <a href="#aggregations">group window or over
<a href="joins.html#interval-joins">interval joins</a> and <a href="#aggregations">group window or over
window aggregations</a>.</p></td>
</tr>
<tr>
Expand All @@ -1047,7 +1047,7 @@ use [time attributes](time_attributes.html). To select those there are available
</td>
<td><p>Returns a <a href="time_attributes.html#processing-time">proctime attribute</a>
that can be used in subsequent time-based operations such as
<a href="#joins">interval joins</a> and <a href="#aggregations">group window or over
<a href="joins.html#interval-joins">interval joins</a> and <a href="#aggregations">group window or over
window aggregations</a>.</p></td>
</tr>
</tbody>
Expand Down
56 changes: 56 additions & 0 deletions tools/azure-pipelines/build_properties.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/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.

set -x

#
# Returns 0 if the change is a documentation-only pull request
#
function is_docs_only_pullrequest() {
# check if it is a pull request branch, as generated by ci-bot:
if [[ ! $BUILD_SOURCEBRANCHNAME == ci_* ]] ; then
echo "INFO: Branch name mismatch";
return 1
fi
PR_ID=`echo "$BUILD_SOURCEBRANCHNAME" | cut -f2 -d_`
if ! [[ "$PR_ID" =~ ^[0-9]+$ ]] ; then
echo "ERROR: Extracted PR_ID is not a number, but this: '$PR_ID'"
return 1
fi
# check if it is docs only pull request
# 1. Get PR details
GITHUB_PULL_DETAIL=`curl --silent "https://api.github.com/repos/rmetzger/flink/pulls/$PR_ID"`

# 2. Check if this build is in sync with the PR
GITHUB_PULL_HEAD_SHA=`echo $GITHUB_PULL_DETAIL | jq -r ".head.sha"`
THIS_BRANCH_SHA=`git rev-parse HEAD`

if [[ "$GITHUB_PULL_HEAD_SHA" != "$THIS_BRANCH_SHA" ]] ; then
echo "INFO: SHA mismatch: GITHUB_PULL_HEAD_SHA=$GITHUB_PULL_HEAD_SHA != THIS_BRANCH_SHA=$THIS_BRANCH_SHA";
# sha mismatch. There's some timing issue, and we can't trust the result
return 1
fi

# 3. Get number of commits in PR
GITHUB_NUM_COMMITS=`echo $GITHUB_PULL_DETAIL | jq -r ".commits"`

if [[ $(git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS | grep -v "docs/") == "" ]] ; then
echo "INFO: This is a docs only change. Changed files:"
git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS
return 0
fi
return 1
}
1 change: 1 addition & 0 deletions tools/azure-pipelines/free_disk_space.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/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.
Expand Down
36 changes: 29 additions & 7 deletions tools/azure-pipelines/jobs-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,44 +175,66 @@ jobs:
workspace:
clean: all
steps:
# Skip e2e test execution if this is a documentation only pull request (master / release builds will still be checked regularly)
- bash: |
source ./tools/azure-pipelines/build_properties.sh
is_docs_only_pullrequest
if [[ "$?" == 0 ]] ; then
echo "##[debug]This is a documentation-only change. Skipping e2e execution."
echo "##vso[task.setvariable variable=skip;]1"
else
echo "##[debug]This is a regular CI build. Continuing ..."
echo "##vso[task.setvariable variable=skip;]0"
fi
displayName: Check if Docs only PR
- task: Cache@2
inputs:
key: $(CACHE_KEY)
restoreKeys: $(CACHE_FALLBACK_KEY)
path: $(MAVEN_CACHE_FOLDER)
displayName: Cache Maven local repo
continueOnError: true
condition: not(eq(variables['SKIP'], '1'))
- task: Cache@2
inputs:
key: e2e-cache | flink-end-to-end-tests/**/*.java, !**/avro/**
path: $(E2E_CACHE_FOLDER)
displayName: Cache E2E files
continueOnError: true
condition: not(eq(variables['SKIP'], '1'))
- script: |
echo "##vso[task.setvariable variable=JAVA_HOME]$JAVA_HOME_11_X64"
echo "##vso[task.setvariable variable=PATH]$JAVA_HOME_11_X64/bin:$PATH"
displayName: "Set to jdk11"
condition: eq('${{parameters.jdk}}', 'jdk11')
- script: |
echo "Setting up Maven"
source ./tools/ci/maven-utils.sh
setup_maven
displayName: Setup Maven 3.2.5
- script: ./tools/azure-pipelines/setup_docker.sh
displayName: Setup Docker
- script: ./tools/azure-pipelines/free_disk_space.sh
displayName: Free up disk space
- script: sudo apt-get install -y bc

echo "Setting up Docker"
./tools/azure-pipelines/setup_docker.sh

echo "Free up disk space"
./tools/azure-pipelines/free_disk_space.sh

echo "Installing required software"
sudo apt-get install -y bc
displayName: Prepare E2E run
condition: not(eq(variables['SKIP'], '1'))
- script: ${{parameters.environment}} ./tools/ci/compile.sh
displayName: Build Flink
condition: not(eq(variables['SKIP'], '1'))
- script: ${{parameters.environment}} FLINK_DIR=`pwd`/build-target flink-end-to-end-tests/run-nightly-tests.sh
displayName: Run e2e tests
env:
IT_CASE_S3_BUCKET: $(SECRET_S3_BUCKET)
IT_CASE_S3_ACCESS_KEY: $(SECRET_S3_ACCESS_KEY)
IT_CASE_S3_SECRET_KEY: $(SECRET_S3_SECRET_KEY)
condition: not(eq(variables['SKIP'], '1'))
# upload debug artifacts
- task: PublishPipelineArtifact@1
condition: and(succeededOrFailed(), not(eq(variables['ARTIFACT_DIR'], '')))
condition: and(succeededOrFailed(), not(eq(variables['SKIP'], '1')), not(eq(variables['ARTIFACT_DIR'], '')))
displayName: Upload Logs
inputs:
targetPath: $(ARTIFACT_DIR)
Expand Down