From 79d4efdfa4cc47223560410cdfad642553723f5a Mon Sep 17 00:00:00 2001 From: Sean Arms <67096+lesserwhirls@users.noreply.github.com> Date: Wed, 11 Dec 2024 09:50:31 -0700 Subject: [PATCH 1/3] Upgrade github actions --- .github/workflows/deps.yml | 4 +- .github/workflows/docs-tutorials.yml | 15 ++-- .github/workflows/docs.yml | 15 ++-- .github/workflows/style.yml | 15 ++-- .github/workflows/tds-check.yml | 106 --------------------------- 5 files changed, 29 insertions(+), 126 deletions(-) delete mode 100644 .github/workflows/tds-check.yml diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml index 1d8b04233c..7ab63440f4 100644 --- a/.github/workflows/deps.yml +++ b/.github/workflows/deps.yml @@ -7,9 +7,9 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - distribution: 'adopt' + distribution: 'temurin' java-version: '11' - name: Build with Gradle (refresh dependencies) run: ./gradlew clean classes testClasses assemble --refresh-dependencies diff --git a/.github/workflows/docs-tutorials.yml b/.github/workflows/docs-tutorials.yml index 0ab3973d96..6d30576e55 100644 --- a/.github/workflows/docs-tutorials.yml +++ b/.github/workflows/docs-tutorials.yml @@ -8,15 +8,18 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Java 8 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - distribution: 'zulu' + distribution: 'temurin' java-version: '8' - name: Cache Gradle packages - uses: actions/cache@v1 + uses: actions/cache@v4 with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: ${{ runner.os }}-gradle + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- - name: Check netCDF-Java documentation for deprecations warnings run: './gradlew :docs:testClasses |& (! grep -F "warning: [deprecation]")' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9de15d127f..1838956d5a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,16 +12,19 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - distribution: 'adopt' + distribution: 'temurin' java-version: '11' - name: Cache Gradle packages - uses: actions/cache@v1 + uses: actions/cache@v4 with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: ${{ runner.os }}-gradle + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- - name: Build docs using Gradle run: ./gradlew buildJekyllSite - if: success() diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index e0596a296b..61a8ac52a3 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -7,15 +7,18 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - distribution: 'adopt' + distribution: 'temurin' java-version: '11' - name: Cache Gradle packages - uses: actions/cache@v1 + uses: actions/cache@v4 with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: ${{ runner.os }}-gradle + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- - name: Code Style Check with Gradle and Spotless run: ./gradlew clean spotlessCheck diff --git a/.github/workflows/tds-check.yml b/.github/workflows/tds-check.yml deleted file mode 100644 index ee02f0828e..0000000000 --- a/.github/workflows/tds-check.yml +++ /dev/null @@ -1,106 +0,0 @@ -on: - pull_request: - paths: - - '**.temporarily-disable' - -jobs: - tests-adpotopenjdk-hs-8: - name: TDS Tests using netCDF-Java from PR (AdoptOpenJDK-HS 8) - runs-on: ubuntu-latest - steps: - - name: Checkout netCDF-Java PR - uses: actions/checkout@v4 - - name: Fetch latest AdoptOpenJDK 8 (hotspot) built for linux" - run: curl -L "https://api.adoptopenjdk.net/v2/binary/releases/openjdk8?openjdk_impl=hotspot&arch=x64&release=latest&type=jdk&os=linux" -o aojdk8-hs.tar.gz - - name: Setup Latest AdoptOpenJDK (hotspot) 8 - uses: actions/setup-java@master - with: - java-version: 8 - architecture: x64 - jdkFile: ./aojdk8-hs.tar.gz - - name: Print java version - run: java -version - - name: Install netCDF-C and sed - run: sudo apt update && sudo apt-get install libnetcdf-dev sed - - name: Build netCDF-java and publish to local maven repository - run: ./gradlew assemble publishToMavenLocal - - name: Checkout TDS Master - uses: actions/checkout@v4 - with: - repository: Unidata/tds - path: tds_build_dir - - name: Modify, build, and test the TDS - shell: bash - run: | - echo "Find netcdf-java version as specified in the PR" - NCJ_VERSION=$(./gradlew properties -q | grep "^version:" | awk '{print $2}') - echo "Change directory to local TDS repository" - cd tds_build_dir - TDS_BUILD_DIR=`pwd` - # tell tds build to use snapshots from the local maven repo - echo "Tell the TDS build to look in the local maven repository for artifacts first..." - sed -i 's/\/\/mavenLocal()/mavenLocal()/g' ./gradle/any/dependencies.gradle - # make sure we are using the version of netCDF-Java specified in the PR to build the TDS - sed -i 's/versions\["ncj"\] =.*$/versions["ncj"] ="'${NCJ_VERSION}'"/g' ./gradle/any/dependencies.gradle - # setup env vars for tds buildTestDSR - CONTENT_ROOT="-Dtds.content.root.path=${TDS_BUILD_DIR}/tds/src/test/content" - SYSTEM_PROPS="$CONTENT_ROOT" - # run tds tests - echo "Run the TDS tests" - ./gradlew $SYSTEM_PROPS --info --stacktrace testAll - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: TDS_JUnit_Results_${{ github.sha }} - path: tds_build_dir/build/reports/allTests - - tests-with-builders-adpotopenjdk-hs-8: - name: TDS Tests (with builders) using netCDF-Java from PR (AdoptOpenJDK-HS 8) - runs-on: ubuntu-latest - steps: - - name: Checkout netCDF-Java PR - uses: actions/checkout@v4 - - name: Fetch latest AdoptOpenJDK 8 (hotspot) built for linux" - run: curl -L "https://api.adoptopenjdk.net/v2/binary/releases/openjdk8?openjdk_impl=hotspot&arch=x64&release=latest&type=jdk&os=linux" -o aojdk8-hs.tar.gz - - name: Setup Latest AdoptOpenJDK (hotspot) 8 - uses: actions/setup-java@master - with: - java-version: 8 - architecture: x64 - jdkFile: ./aojdk8-hs.tar.gz - - name: Print java version - run: java -version - - name: Install netCDF-C and sed - run: sudo apt update && sudo apt-get install libnetcdf-dev sed - - name: Build netCDF-java and publish to local maven repository - run: ./gradlew assemble publishToMavenLocal - - name: Checkout TDS Master - uses: actions/checkout@v4 - with: - repository: Unidata/tds - path: tds_build_dir - - name: Modify, build, and test the TDS - shell: bash - run: | - echo "Find netcdf-java version as specified in the PR" - NCJ_VERSION=$(./gradlew properties -q | grep "^version:" | awk '{print $2}') - echo "Change directory to local TDS repository" - cd tds_build_dir - TDS_BUILD_DIR=`pwd` - # tell tds build to use snapshots from the local maven repo - echo "Tell the TDS build to look in the local maven repository for artifacts first..." - sed -i 's/\/\/mavenLocal()/mavenLocal()/g' ./gradle/any/dependencies.gradle - # make sure we are using the version of netCDF-Java specified in the PR to build the TDS - sed -i 's/versions\["ncj"\] =.*$/versions["ncj"] ="'${NCJ_VERSION}'"/g' ./gradle/any/dependencies.gradle - # setup env vars for tds buildTestDSR - CONTENT_ROOT="-Dtds.content.root.path=${TDS_BUILD_DIR}/tds/src/test/content" - BUILDERS="-Dthredds.test.experimental.useNetcdfJavaBuilders=true" - SYSTEM_PROPS="$CONTENT_ROOT $BUILDERS" - # run tds tests - echo "Run the TDS tests" - ./gradlew $SYSTEM_PROPS --info --stacktrace testAll --refresh-dependencies - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: TDS_JUnit_Results_${{ github.sha }} - path: tds_build_dir/build/reports/allTests From 25a4c69367db168d354ee120801c5095e7e741be Mon Sep 17 00:00:00 2001 From: Sean Arms <67096+lesserwhirls@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:52:42 -0700 Subject: [PATCH 2/3] Skip iridl.ldeo.columbia.edu tests for PRs GitHub appears to have intermittent access issues when running a dap2 test against iridl.ldeo.columbia.edu (see https://github.com/Unidata/netcdf-java/pull/1396#issuecomment-2536495050). Disable this specific test for pull requests, but still run locally and on jenkins. Also, they have upgraded their server to support https, so we will use that in the test. --- opendap/src/test/java/ucar/nc2/dods/TestDodsV.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opendap/src/test/java/ucar/nc2/dods/TestDodsV.java b/opendap/src/test/java/ucar/nc2/dods/TestDodsV.java index 5925ff767c..1185f00f2c 100644 --- a/opendap/src/test/java/ucar/nc2/dods/TestDodsV.java +++ b/opendap/src/test/java/ucar/nc2/dods/TestDodsV.java @@ -6,6 +6,8 @@ import opendap.dap.DConnect2; import opendap.dap.DDS; import org.junit.Test; +import org.junit.experimental.categories.Category; +import ucar.unidata.util.test.category.NotPullRequest; public class TestDodsV { @@ -30,11 +32,9 @@ private static void doit(String urlName) throws IOException, DAP2Exception { } @Test + @Category(NotPullRequest.class) public void testStuff() throws IOException, DAP2Exception { // doit("http://localhost:8080/thredds/dodsC/ncdodsTest/conventions/zebra/SPOL_3Volumes.nc"); - doit("http://iridl.ldeo.columbia.edu/SOURCES/.CAYAN/dods"); + doit("https://iridl.ldeo.columbia.edu/SOURCES/.CAYAN/dods"); } - - - } From 02b507292439ba19a6878e47ace1f3dc8308d9e3 Mon Sep 17 00:00:00 2001 From: Sean Arms <67096+lesserwhirls@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:56:16 -0700 Subject: [PATCH 3/3] Update codeowners --- .github/CODEOWNERS | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e2afb1aa11..5aaa687e38 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -15,30 +15,30 @@ # users just like we do for commit author emails. # docs/* docs@example.com -* @tdrwenski +* @lesserwhirls ##################### # top level modules # ##################### -httpservices/** @DennisHeimbigner @tdrwenski -netcdf4/** @DennisHeimbigner @tdrwenski +httpservices/** @DennisHeimbigner @lesserwhirls +netcdf4/** @DennisHeimbigner @lesserwhirls ########################################### # classpath / not module specific matches # ########################################### -**/iosp/nids/** @dopplershift @tdrwenski +**/iosp/nids/** @dopplershift @lesserwhirls -**/opendap/** @DennisHeimbigner @tdrwenski -**/dap4/** @DennisHeimbigner @tdrwenski +**/opendap/** @DennisHeimbigner @lesserwhirls +**/dap4/** @DennisHeimbigner @lesserwhirls ###################### # general file types # ###################### *.py @dopplershift -**/test/**/*.py @tdrwenski +**/test/**/*.py @lesserwhirls #################### # individual files #