rmetzger commented on a change in pull request #11741:
URL: https://github.com/apache/flink/pull/11741#discussion_r411249962



##########
File path: tools/azure-pipelines/build-apache-repo.yml
##########
@@ -49,6 +49,7 @@ variables:
   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]
+  VERSION: '1.11-SNAPSHOT'

Review comment:
       I wonder if we can avoid this variable. I want to avoid adding another 
place to the source code where we need to change the version on every release.
   

##########
File path: tools/azure-pipelines/build-apache-repo.yml
##########
@@ -49,6 +49,7 @@ variables:
   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]
+  VERSION: '1.11-SNAPSHOT'

Review comment:
       In the e2e tests, we are getting the version from Maven: 
https://github.com/apache/flink/blob/master/flink-end-to-end-tests/test-scripts/test-runner-common.sh#L22

##########
File path: tools/azure-pipelines/build-python-wheels.yml
##########
@@ -0,0 +1,82 @@
+# 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.
+
+jobs:
+  - job: compile_${{parameters.stage_name}}
+    pool:
+      vmImage: 'ubuntu-16.04'
+    container: flink-build-container
+    timeoutInMinutes: 240
+    cancelTimeoutInMinutes: 1
+    workspace:
+      clean: all # this cleans the entire workspace directory before running a 
new job
+      # It is necessary because the custom build machines are reused for tests.
+      # See also 
https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#workspace
+
+    steps:
+      # The cache task is persisting the .m2 directory between builds, so that
+      # we do not have to re-download all dependencies from maven central for
+      # each build. The hope is that downloading the cache is faster than
+      # all dependencies individually.
+      # In this configuration, we use a hash over all committed (not 
generated) .pom files
+      # as a key for the build cache (CACHE_KEY). If we have a cache miss on 
the hash
+      # (usually because a pom file has changed), we'll fall back to a key 
without
+      # the pom files (CACHE_FALLBACK_KEY).
+      # Offical documentation of the Cache task: 
https://docs.microsoft.com/en-us/azure/devops/pipelines/caching/?view=azure-devops
+      - task: Cache@2
+        inputs:
+          key: $(CACHE_KEY)
+          restoreKeys: $(CACHE_FALLBACK_KEY)
+          path: $(MAVEN_CACHE_FOLDER)
+        continueOnError: true # continue the build even if the cache fails.
+        displayName: Cache Maven local repo
+      # Compile
+      - script: STAGE=compile ${{parameters.environment}} 
./tools/azure_controller.sh compile
+        displayName: Build
+
+      # upload artifacts for next stage
+      - task: PublishPipelineArtifact@1
+        inputs:
+          path: $(CACHE_FLINK_DIR)
+          artifact: FlinkCompileCacheDir
+
+  - job: BuildWheels
+    dependsOn: compile_${{parameters.stage_name}}
+    strategy:
+      matrix:
+        linux:
+          vm-label: 'ubuntu-16.04'
+        mac:
+          vm-label: 'macOS-10.15'
+    pool:
+      vmImage: $(vm-label)
+    steps:
+      # download artifacts
+      - task: DownloadPipelineArtifact@2

Review comment:
       We could simplify this by turning it into a single job that first 
compiles and then runs the script for building wheels (without transfering the 
artifacts in between)

##########
File path: tools/azure-pipelines/build-apache-repo.yml
##########
@@ -126,3 +127,8 @@ stages:
             versionSpec: '= 2.4'
             addToPath: true
         - script: ./tools/travis/docs.sh
+      - template: build-python-wheels.yml
+        parameters:
+          stage_name: build_python_wheels
+          environment: PROFILE="-Dinclude-hadoop -Dhadoop.version=2.8.3 
-Dinclude_hadoop_aws -Dscala-2.11"
+          container: flink-build-container

Review comment:
       This is very nice!

##########
File path: tools/azure-pipelines/build-python-wheels.yml
##########
@@ -0,0 +1,82 @@
+# 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.
+
+jobs:
+  - job: compile_${{parameters.stage_name}}
+    pool:
+      vmImage: 'ubuntu-16.04'
+    container: flink-build-container
+    timeoutInMinutes: 240
+    cancelTimeoutInMinutes: 1
+    workspace:
+      clean: all # this cleans the entire workspace directory before running a 
new job
+      # It is necessary because the custom build machines are reused for tests.
+      # See also 
https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#workspace
+
+    steps:
+      # The cache task is persisting the .m2 directory between builds, so that
+      # we do not have to re-download all dependencies from maven central for
+      # each build. The hope is that downloading the cache is faster than
+      # all dependencies individually.
+      # In this configuration, we use a hash over all committed (not 
generated) .pom files
+      # as a key for the build cache (CACHE_KEY). If we have a cache miss on 
the hash
+      # (usually because a pom file has changed), we'll fall back to a key 
without
+      # the pom files (CACHE_FALLBACK_KEY).
+      # Offical documentation of the Cache task: 
https://docs.microsoft.com/en-us/azure/devops/pipelines/caching/?view=azure-devops
+      - task: Cache@2
+        inputs:
+          key: $(CACHE_KEY)
+          restoreKeys: $(CACHE_FALLBACK_KEY)
+          path: $(MAVEN_CACHE_FOLDER)
+        continueOnError: true # continue the build even if the cache fails.
+        displayName: Cache Maven local repo
+      # Compile
+      - script: STAGE=compile ${{parameters.environment}} 
./tools/azure_controller.sh compile
+        displayName: Build
+
+      # upload artifacts for next stage
+      - task: PublishPipelineArtifact@1
+        inputs:
+          path: $(CACHE_FLINK_DIR)
+          artifact: FlinkCompileCacheDir
+
+  - job: BuildWheels
+    dependsOn: compile_${{parameters.stage_name}}
+    strategy:
+      matrix:
+        linux:
+          vm-label: 'ubuntu-16.04'
+        mac:
+          vm-label: 'macOS-10.15'
+    pool:
+      vmImage: $(vm-label)
+    steps:
+      # download artifacts
+      - task: DownloadPipelineArtifact@2

Review comment:
       Or does the compiling not work on macOS?

##########
File path: tools/azure-pipelines/build-python-wheels.yml
##########
@@ -0,0 +1,82 @@
+# 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.
+
+jobs:

Review comment:
       This file contains quite a bit of duplicate "code" with the other files.
   We could either solve that by simplifying this file, OR by moving the 
"compile" stage into a separate file and sharing it across all other files.
   
   I would first propose to try simplifying it.

##########
File path: tools/azure-pipelines/build-python-wheels.yml
##########
@@ -0,0 +1,82 @@
+# 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.
+
+jobs:
+  - job: compile_${{parameters.stage_name}}
+    pool:
+      vmImage: 'ubuntu-16.04'
+    container: flink-build-container
+    timeoutInMinutes: 240
+    cancelTimeoutInMinutes: 1
+    workspace:
+      clean: all # this cleans the entire workspace directory before running a 
new job
+      # It is necessary because the custom build machines are reused for tests.
+      # See also 
https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#workspace
+
+    steps:
+      # The cache task is persisting the .m2 directory between builds, so that
+      # we do not have to re-download all dependencies from maven central for
+      # each build. The hope is that downloading the cache is faster than
+      # all dependencies individually.
+      # In this configuration, we use a hash over all committed (not 
generated) .pom files
+      # as a key for the build cache (CACHE_KEY). If we have a cache miss on 
the hash
+      # (usually because a pom file has changed), we'll fall back to a key 
without
+      # the pom files (CACHE_FALLBACK_KEY).
+      # Offical documentation of the Cache task: 
https://docs.microsoft.com/en-us/azure/devops/pipelines/caching/?view=azure-devops

Review comment:
       I don't think we need to copy that comment over as well




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to