From 559c3ee33395ab071df5298bde2b2f19786add0f Mon Sep 17 00:00:00 2001 From: ronanstokes-db Date: Tue, 11 Feb 2025 12:16:12 -0800 Subject: [PATCH 1/2] updated build scripts to use specific version of Ubuntu and update code coverage related actions --- .github/workflows/codeql-analysis.yml | 6 +++--- .github/workflows/push.yml | 7 ++++++- .github/workflows/release.yml | 8 +++++++- CHANGELOG.md | 5 +++++ CONTRIBUTING.md | 19 +++++++++++++++++++ 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ee8caffd..6910f8bd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -18,7 +18,7 @@ on: jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -31,9 +31,9 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5c915304..ed0bc54c 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,7 +9,7 @@ on: jobs: tests: # Ubuntu latest no longer installs Python 3.9 by default so install it - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -26,6 +26,11 @@ jobs: # key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} # restore-keys: | # ${{ runner.os }}-go- + - name: Set Java 8 + run: | + sudo update-alternatives --set java /usr/lib/jvm/temurin-8-jdk-amd64/bin/java + java -version + sudo update-alternatives --config java - name: Set up Python 3.8 uses: actions/setup-python@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e7ec05de..1f5eeb37 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: jobs: release: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 environment: release permissions: # Used to authenticate to PyPI via OIDC and sign the release's artifacts with sigstore-python. @@ -19,6 +19,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Set Java 8 + run: | + sudo update-alternatives --set java /usr/lib/jvm/temurin-8-jdk-amd64/bin/java + java -version + sudo update-alternatives --config java + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index f3334e3a..dc4229e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ ## Change History All notable changes to the Databricks Labs Data Generator will be documented in this file. +### unreleased + +#### Fixed +* Updated build scripts to use Ubuntu 22.04 to correspond to environment in Databricks runtime + ### Version 0.4.0 Hotfix 2 #### Fixed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6fa620b6..e56b7617 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -158,3 +158,22 @@ Basically it follows the Python PEP8 coding conventions - but method and argumen with a lower case letter rather than underscores following Pyspark coding conventions. See https://legacy.python.org/dev/peps/pep-0008/ + +# Github expectations +When running the unit tests on Github, the environment should use the same environment as the latest Databricks +runtime latest LTS release. While compatibility is preserved on LTS releases from Databricks runtime 10.4 onwards, +unit tests will be run on the environment corresponding to the latest LTS release. + +Libraries will use the same versions as the earliest supported LTS release - currently 10.4 LTS + +This means for the current build: + +- Use of Ubuntu 22.04 for the test runner +- Use of Java 8 +- Use of Python 3.11 + +See the following resources for more information += https://docs.databricks.com/en/release-notes/runtime/15.4lts.html +- https://docs.databricks.com/en/release-notes/runtime/10.4lts.html +- https://github.com/actions/runner-images/issues/10636 + From 78d5bbdb182ccc4deb89b9071136b2df97ef1c4e Mon Sep 17 00:00:00 2001 From: ronanstokes-db Date: Tue, 11 Feb 2025 14:24:15 -0800 Subject: [PATCH 2/2] removed sudo update-alternatives --- .github/workflows/push.yml | 1 - .github/workflows/release.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ed0bc54c..be1be909 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -30,7 +30,6 @@ jobs: run: | sudo update-alternatives --set java /usr/lib/jvm/temurin-8-jdk-amd64/bin/java java -version - sudo update-alternatives --config java - name: Set up Python 3.8 uses: actions/setup-python@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1f5eeb37..77d81630 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,6 @@ jobs: run: | sudo update-alternatives --set java /usr/lib/jvm/temurin-8-jdk-amd64/bin/java java -version - sudo update-alternatives --config java - name: Set up Python 3.8 uses: actions/setup-python@v5