alinaliBQ commented on code in PR #49603: URL: https://github.com/apache/arrow/pull/49603#discussion_r3343364290
########## .github/workflows/package_odbc.yml: ########## @@ -0,0 +1,190 @@ +# 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: Package Apache Arrow Flight SQL ODBC Driver + +on: + push: + paths: + - '.github/actions/odbc-windows/action.yml' + - '.github/workflows/check_labels.yml' + - '.github/workflows/cpp_extra.yml' + - '.github/workflows/package_odbc.yml' + - '.github/workflows/report_ci.yml' + - 'ci/scripts/ccache_setup.sh' + - 'ci/scripts/cpp_*' + - 'ci/scripts/download_tz_database.sh' + - 'ci/scripts/install_ccache.sh' + - 'cpp/**' + - 'format/Flight.proto' + - 'testing' + tags: + - "apache-arrow-*-rc*" + workflow_dispatch: + inputs: + odbc_release_step: + description: 'ODBC MSI release step' + required: false + default: false + type: boolean + +concurrency: + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} + cancel-in-progress: true + +permissions: + actions: read + contents: read + pull-requests: read + +jobs: + # GH-49537 CPack only packages from a single build directory, so the build + # cannot be reused and we need to rebuild the MSI in a separate workflow. This + # means both the odbc-msvc-upload-dll and odbc-msvc-upload-msi jobs do a full build. + odbc-msvc-upload-dll: + name: ODBC Windows Upload Unsigned DLL + runs-on: windows-2022 + timeout-minutes: 240 Review Comment: ```suggestion name: ODBC Windows Upload Unsigned DLL runs-on: windows-2022 if: >- ${{ startsWith(github.ref_name, 'apache-arrow-') && contains(github.ref_name, '-rc') && !inputs.odbc_release_step }} timeout-minutes: 240 ``` @justing-bq we can add a check for the `apache-arrow-*-rc*` tag here, so `odbc-msvc-upload-dll` is only triggered is the tag is present ########## .github/workflows/package_odbc.yml: ########## @@ -0,0 +1,190 @@ +# 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: Package Apache Arrow Flight SQL ODBC Driver + +on: + push: + paths: + - '.github/actions/odbc-windows/action.yml' + - '.github/workflows/check_labels.yml' + - '.github/workflows/cpp_extra.yml' + - '.github/workflows/package_odbc.yml' + - '.github/workflows/report_ci.yml' + - 'ci/scripts/ccache_setup.sh' + - 'ci/scripts/cpp_*' + - 'ci/scripts/download_tz_database.sh' + - 'ci/scripts/install_ccache.sh' + - 'cpp/**' + - 'format/Flight.proto' + - 'testing' + tags: + - "apache-arrow-*-rc*" + workflow_dispatch: + inputs: + odbc_release_step: + description: 'ODBC MSI release step' + required: false + default: false + type: boolean + +concurrency: + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} + cancel-in-progress: true + +permissions: + actions: read + contents: read + pull-requests: read + +jobs: + # GH-49537 CPack only packages from a single build directory, so the build + # cannot be reused and we need to rebuild the MSI in a separate workflow. This + # means both the odbc-msvc-upload-dll and odbc-msvc-upload-msi jobs do a full build. + odbc-msvc-upload-dll: + name: ODBC Windows Upload Unsigned DLL + runs-on: windows-2022 + timeout-minutes: 240 + permissions: + packages: write + env: &odbc_msvc_env + ARROW_BUILD_SHARED: ON + ARROW_BUILD_STATIC: OFF + ARROW_BUILD_TESTS: OFF + ARROW_BUILD_TYPE: release + # Turn Arrow CSV off to disable `find_package(Arrow)` check on MSVC CI. + # GH-49050 TODO: enable `find_package(Arrow)` check on MSVC CI. + ARROW_CSV: OFF + ARROW_DEPENDENCY_SOURCE: VCPKG + ARROW_FLIGHT_SQL_ODBC: ON + ARROW_FLIGHT_SQL_ODBC_INSTALLER: ON + ARROW_HOME: /usr + CMAKE_GENERATOR: Ninja + CMAKE_INSTALL_PREFIX: /usr + VCPKG_BINARY_SOURCES: 'clear;nugettimeout,600;nuget,GitHub,readwrite' + VCPKG_DEFAULT_TRIPLET: x64-windows + steps: + - name: Checkout Arrow + uses: actions/checkout@v6 + with: + persist-credentials: false + fetch-depth: 0 + submodules: recursive + - name: Build ODBC Windows + uses: ./.github/actions/odbc-windows + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Rename Unsigned ODBC DLL + run: | + Rename-Item ` + -Path build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc.dll ` + -NewName arrow_flight_sql_odbc_unsigned.dll + - name: Upload ODBC DLL to the job + uses: actions/upload-artifact@v7 + with: + name: flight-sql-odbc-dll + path: build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc_unsigned.dll + if-no-files-found: error + + odbc-dll-release: Review Comment: Yes, we can change the set up so `odbc-msvc-upload-dll` is only triggered when `apache-arrow-*-rc*` tag is present. Then since `odbc-dll-release` only runs after `odbc-msvc-upload-dll` is triggered, `odbc-dll-release` will only be triggered when we have `apache-arrow-*-rc*` tag. @justing-bq Try if this comment resolves the issue above: https://github.com/apache/arrow/pull/49603/changes#r3343364290 ########## .github/workflows/package_odbc.yml: ########## @@ -0,0 +1,190 @@ +# 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: Package Apache Arrow Flight SQL ODBC Driver + +on: + push: + paths: + - '.github/actions/odbc-windows/action.yml' + - '.github/workflows/check_labels.yml' + - '.github/workflows/cpp_extra.yml' + - '.github/workflows/package_odbc.yml' + - '.github/workflows/report_ci.yml' + - 'ci/scripts/ccache_setup.sh' + - 'ci/scripts/cpp_*' + - 'ci/scripts/download_tz_database.sh' + - 'ci/scripts/install_ccache.sh' + - 'cpp/**' + - 'format/Flight.proto' + - 'testing' + tags: + - "apache-arrow-*-rc*" + workflow_dispatch: + inputs: + odbc_release_step: + description: 'ODBC MSI release step' + required: false + default: false + type: boolean + +concurrency: + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} + cancel-in-progress: true + +permissions: + actions: read + contents: read + pull-requests: read + +jobs: + # GH-49537 CPack only packages from a single build directory, so the build + # cannot be reused and we need to rebuild the MSI in a separate workflow. This + # means both the odbc-msvc-upload-dll and odbc-msvc-upload-msi jobs do a full build. + odbc-msvc-upload-dll: + name: ODBC Windows Upload Unsigned DLL + runs-on: windows-2022 + timeout-minutes: 240 + permissions: + packages: write + env: &odbc_msvc_env + ARROW_BUILD_SHARED: ON + ARROW_BUILD_STATIC: OFF + ARROW_BUILD_TESTS: OFF + ARROW_BUILD_TYPE: release + # Turn Arrow CSV off to disable `find_package(Arrow)` check on MSVC CI. + # GH-49050 TODO: enable `find_package(Arrow)` check on MSVC CI. + ARROW_CSV: OFF + ARROW_DEPENDENCY_SOURCE: VCPKG + ARROW_FLIGHT_SQL_ODBC: ON + ARROW_FLIGHT_SQL_ODBC_INSTALLER: ON + ARROW_HOME: /usr + CMAKE_GENERATOR: Ninja + CMAKE_INSTALL_PREFIX: /usr + VCPKG_BINARY_SOURCES: 'clear;nugettimeout,600;nuget,GitHub,readwrite' + VCPKG_DEFAULT_TRIPLET: x64-windows + steps: + - name: Checkout Arrow + uses: actions/checkout@v6 + with: + persist-credentials: false + fetch-depth: 0 + submodules: recursive + - name: Build ODBC Windows + uses: ./.github/actions/odbc-windows + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Rename Unsigned ODBC DLL + run: | + Rename-Item ` + -Path build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc.dll ` + -NewName arrow_flight_sql_odbc_unsigned.dll + - name: Upload ODBC DLL to the job + uses: actions/upload-artifact@v7 + with: + name: flight-sql-odbc-dll + path: build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc_unsigned.dll + if-no-files-found: error + + odbc-dll-release: + needs: odbc-msvc-upload-dll + name: Upload Unsigned ODBC DLL to Release + runs-on: ubuntu-latest + permissions: + # Upload to GitHub Release + contents: write + steps: + - name: Checkout Arrow + uses: actions/checkout@v6 + with: + persist-credentials: false + fetch-depth: 0 + submodules: recursive + - name: Download the artifacts + uses: actions/download-artifact@v8 + with: + name: flight-sql-odbc-dll + - name: Wait for creating GitHub Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + dev/release/utils-watch-gh-workflow.sh \ + ${GITHUB_REF_NAME} \ + release_candidate.yml + - name: Upload the artifacts to GitHub Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release upload ${GITHUB_REF_NAME} \ + --clobber \ + arrow_flight_sql_odbc_unsigned.dll + + odbc-msvc-upload-msi: + name: ODBC Windows Build & Upload Unsigned MSI + runs-on: windows-2022 + if: inputs.odbc_release_step Review Comment: We can raise an issue for this. @justing-bq Please raise one GitHub issue for: - removing `inputs` for `workflow_dispatch` in `package_odbc.yml`. - Then `if: github.event_name == 'workflow_dispatch'` can be used. - The `dev/release/07-flightsqlodbc-upload.sh` and release documentation needs to be updated as well. cc @amoeba ########## .github/workflows/package_odbc.yml: ########## @@ -0,0 +1,190 @@ +# 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: Package Apache Arrow Flight SQL ODBC Driver + +on: + push: + paths: + - '.github/actions/odbc-windows/action.yml' + - '.github/workflows/check_labels.yml' + - '.github/workflows/cpp_extra.yml' + - '.github/workflows/package_odbc.yml' + - '.github/workflows/report_ci.yml' + - 'ci/scripts/ccache_setup.sh' + - 'ci/scripts/cpp_*' + - 'ci/scripts/download_tz_database.sh' + - 'ci/scripts/install_ccache.sh' + - 'cpp/**' Review Comment: I think not. We can remove `paths` and only keep the `tags` and `workflow_dispatch` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
