Skip to content

fix(bq_driver): Update windows pipeline#1530

Open
Khushikathuria008 wants to merge 1 commit into
mainfrom
windows_pipeline_fix
Open

fix(bq_driver): Update windows pipeline#1530
Khushikathuria008 wants to merge 1 commit into
mainfrom
windows_pipeline_fix

Conversation

@Khushikathuria008
Copy link
Copy Markdown
Collaborator

@Khushikathuria008 Khushikathuria008 commented May 12, 2026

In this PR, we update the Windows GHA pipeline. Previously, the pipeline relied on a pre-uploaded installer, which was downloaded and used for integration testing. With this change, we now build the installer within the pipeline itself and use the generated artifact for running the integration test cases.

Gha & macos pipe check here.

Comment thread .github/workflows/windows-cmake.yml Outdated
env:
DRIVER_ARCH: ${{ matrix.arch }}
BUILD_SHARD: ${{ matrix.shard }}
ODBC_GOOGLE_DRIVER_VERSION: 1.1.3
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to specify this version itself, can give any default version

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}
if($env:BUILD_SHARD -eq 'Core'){
$env:ODBC_DRIVER_MSI_NAME = "SimbaODBCDriverforGoogleBigQuery${arch}_${env:ODBC_DRIVER_VERSION}.msi"
}else{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of separate install step for our driver and existing driver, can build the driver upload to GCS and download and install from path here itself

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread .github/workflows/windows-cmake.yml Outdated
echo "Building version: $version"
cmake -S . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=debug \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to specify, debug build type, it will anyway build in debug

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@shivamd-gpartner shivamd-gpartner marked this pull request as ready for review May 13, 2026 05:49
@shivamd-gpartner shivamd-gpartner requested a review from a team as a code owner May 13, 2026 05:49
@@ -27,7 +27,6 @@ if ($CI_CLOUDBUILD_BUILDS_LIB_ODBC_DRIVER_INSTALL_SH__ -ne $null -and ++$CI_CLOU
# Set Environment Variables
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's modify this script to read the driver version for both the existing and our driver. Don't rely on ODBC_DRIVER_VERSION env.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread .github/workflows/windows-cmake.yml Outdated
if [ $? -eq 0 ]; then
echo "Copied $f successfully."
else
echo "Failed to copy $f."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step should fail in case of any error.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread .github/workflows/windows-cmake.yml Outdated
echo "Failed to copy $f."
fi
else
echo "$f not found in source directory: $SOURCE_DIR"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step should fail in case of any error.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread .github/workflows/windows-cmake.yml Outdated

for f in "${FILES[@]}"; do
if [ -f "$SOURCE_DIR/$f" ]; then
cp -v "$SOURCE_DIR/$f" "$DEST_DIR/"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use mv here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread .github/workflows/windows-cmake.yml Outdated
sed -i '/"arrow",/d' vcpkg.json
fi

ci/gha/builds/windows-cmake-integration.sh
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can directly run the tests built previously.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

export CLOUDSDK_PYTHON="${{ steps.py311.outputs.python-path }}"
export CMAKE_OUT="c:/b"
export SCCACHE_IGNORE_SERVER_IO_ERROR=1
unset SCCACHE_GCS_BUCKET SCCACHE_GCS_KEY_PREFIX SCCACHE_GCS_RW_MODE
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a TODO here to justify this. We shouldn't be disabling sccache.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread .github/workflows/windows-cmake.yml Outdated

export MSVC_VERSION="${{ matrix.msvc }}"
export BRANCH_IDENTIFIER=$(echo "${{ github.ref_name }}" | tr '[:punct:]' '_')
export CPP_BIGQUERY_ODBC_TEST_TABLE_PREFIX="windows_${BRANCH_IDENTIFIER}_${MSVC_VERSION//[-:;.,?\/]/_}_${DRIVER_ARCH}_$BUILD_SHARD"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed for building the driver.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread .github/workflows/windows-cmake.yml Outdated
-DVCPKG_TARGET_TRIPLET="${VCPKG_TRIPLET}" \
-DODBC_EXAMPLES=OFF \
-DODBC_UNIT_TESTING=OFF \
-DODBC_INTEGRATION_TESTING=OFF \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ODBC_INTEGRATION_TESTING=ON so we can run the tests later.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread .github/workflows/windows-cmake.yml Outdated
-DODBC_UNIT_TESTING=OFF \
-DODBC_INTEGRATION_TESTING=OFF \
-DCLIENT_LIBRARY_INTEGRATION_TESTING=OFF \
-DBQ_DRIVER_INTEGRATION_TESTS=OFF \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BQ_DRIVER_INTEGRATION_TESTS=ON so we can run the tests later.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread .github/workflows/windows-cmake.yml Outdated
if: env.BUILD_SHARD == 'BqDriver'
shell: pwsh
env:
GCS_BUCKET: bq-dev-tools-testing-drivers
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use odbc-integration-builds bucket to push the artifacts.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread .github/workflows/windows-cmake.yml Outdated
$MSI_DIR = "ci/installer/ODBCDriverForBigQuery/bin/Release/en-us"
$MSI_FILE = "ODBCDriverforBigQuery_windows_$($env:DRIVER_ARCH)_${{ env.ODBC_GOOGLE_DRIVER_VERSION }}.msi"

Write-Output "Uploading $MSI_FILE to gs://$env:GCS_BUCKET/odbc-windows/$arch/ ..."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The folder inside the GCS_BUCKET should be the branch name. Create the folder if it doesn't exist. x64 and x32 installers for a branch will be pushed to the same folder.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread .github/workflows/windows-cmake.yml Outdated
sed -i '/"arrow",/d' vcpkg.json
fi
ci/gha/builds/windows-cmake-integration.sh
if [ "$BUILD_SHARD" == "BqDriver" ]; then
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need a check here? we can remove the file windows-cmake-integration.sh as that is not needed anymore

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants