From c8e46c77e0492cf59b7800b3f9c9b8d8d94dfa13 Mon Sep 17 00:00:00 2001 From: Margaret Lawson Date: Mon, 13 Jan 2025 19:43:53 +0000 Subject: [PATCH 1/7] Test commit Run-GHA: True Required-githooks: true Signed-off-by: Margaret Lawson --- .github/workflows/md-on-ssd-tests.yml | 789 ++++++++++++++++++++++++++ 1 file changed, 789 insertions(+) create mode 100644 .github/workflows/md-on-ssd-tests.yml diff --git a/.github/workflows/md-on-ssd-tests.yml b/.github/workflows/md-on-ssd-tests.yml new file mode 100644 index 00000000000..a770293959f --- /dev/null +++ b/.github/workflows/md-on-ssd-tests.yml @@ -0,0 +1,789 @@ +name: RPM Build and Test + +env: + # TODO: we really need to define a list of supported versions (ideally it's no more than 2) + # build is done on the lowest version and test on the highest with a "sanity test" + # stage done on all versions in the list ecept the highest + EL8_BUILD_VERSION: 8.6 + EL8_VERSION: 8.8 + EL9_BUILD_VERSION: 9 + EL9_VERSION: 9 + LEAP15_VERSION: 15.5 + +on: + workflow_dispatch: + inputs: + pr-repos: + description: 'Any PR-repos that you want included in this build' + required: false + pull_request: + +concurrency: + group: rpm-build-and-test-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +defaults: + run: + shell: bash --noprofile --norc -ueo pipefail {0} + +permissions: {} + +jobs: + # it's a real shame that this step is even needed. push events have the commit message # in + # ${{ github.event.head_commit.message }} but pull_requests don't. :-( + Import-commit-message: + name: Get commit message + if: github.repository == 'daos-stack/daos' + runs-on: [self-hosted, light] + # Map a step output to a job output + outputs: + message: ${{ steps.commit_message.outputs.text }} + dequoted_message: ${{ steps.dequoted_commit_message.outputs.text }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Import Commit Message + id: commit_message + run: echo "text<> $GITHUB_OUTPUT; + git show -s --format=%B >> $GITHUB_OUTPUT; + echo "EOF" >> $GITHUB_OUTPUT; + - name: Import and Dequote Commit Message + id: dequoted_commit_message + run: . ci/gha_functions.sh; + echo "text<> $GITHUB_OUTPUT; + git show -s --format=%B | escape_single_quotes >> $GITHUB_OUTPUT; + echo "EOF" >> $GITHUB_OUTPUT; + - name: Identify Commit Pragmas + run: . ci/gha_functions.sh; + echo '${{steps.dequoted_commit_message.outputs.text }}' | get_commit_pragmas + + Import-commit-pragmas: + name: Make commit pragma variables + runs-on: [self-hosted, light] + needs: [Import-commit-message] + # can't use matrixes for matrixed output yet + # https://github.com/actions/runner/pull/2477 + # strategy: + # matrix: + # distro: [el8, el9, leap15] + # include: + # - distro: el8 + # UC_DISTRO: EL8 + # - distro: el9 + # UC_DISTRO: EL9 + # - distro: leap15 + # UC_DISTRO: LEAP15 + # Map a step output to a job output + outputs: + rpm-test-version: ${{ steps.rpm-test-version.outputs.value }} + pr-repos: ${{ steps.pr-repos.outputs.value }} + run-gha: ${{ steps.run-gha.outputs.value }} + steps: + - name: Set rpm-test-version variable + id: rpm-test-version + uses: ./.github/actions/variable-from-pragma + with: + commit_message: ${{ needs.Import-commit-message.outputs.dequoted_message }} + pragma: RPM_TEST_VERSION + - name: Set pr-repos variable + id: pr-repos + uses: ./.github/actions/variable-from-pragma + with: + commit_message: ${{ needs.Import-commit-message.outputs.dequoted_message }} + pragma: PR_REPOS + - name: Set run-gha variable + id: run-gha + uses: ./.github/actions/variable-from-pragma + with: + commit_message: ${{ needs.Import-commit-message.outputs.dequoted_message }} + pragma: RUN_GHA + default: false + + Create-symlinks: + # you might think this is an odd place to do this and it should be done as a result of the + # build and/or testing stages and ideally you'd be right. + # the problem with that is that there is no way to get the success/fail result of individual + # axes of matrix jobs so there is no way to query them at the end and see their composite + # results. + # instead, the final result of the Build-RPM job, for example is a last-one-complete wins. + # so for example, if the el9 axis fails quickly and then the el8 axis succeeds afterward the + # resulting job state is success. + # instead we assume success at the beginning and then let any axis that fails remove the + # lastSuccessfulBuild link if it fails + name: Create lastBuild and lastSuccessfulBuild symlinks + runs-on: [self-hosted, light] + needs: [Import-commit-pragmas] + if: needs.Import-commit-pragmas.outputs.run-gha == 'true' && + needs.Import-commit-pragmas.outputs.rpm-test-version == '' && + !contains(needs.Import-commit-pragmas.outputs.pr-repos, 'daos@') + env: + # TODO -- this should be on stable, backedup storage, not /scratch + # yamllint disable-line rule:line-length + REPO_PATH: /scratch/job_repos/daos-stack/job/daos/job/PR-${{ github.event.pull_request.number }}/ + steps: + - name: Create lastBuild and lastSuccessfulBuild symlinks + run: . ci/gha_functions.sh; + mkdir -p ${REPO_PATH}; + rm -f ${REPO_PATH}last{,Successful}Build; + ln -s ${{ github.run_number }} ${REPO_PATH}lastBuild; + ln -s ${{ github.run_number }} ${REPO_PATH}lastSuccessfulBuild + + Calc-rpm-build-matrix: + name: Calculate RPM Build Matrix + runs-on: [self-hosted, wolf] + needs: [Import-commit-pragmas, Create-symlinks] + outputs: + matrix: ${{ steps.matrix.outputs.text }} + steps: + - name: Import commit pragmas + uses: ./.github/actions/import-commit-pragmas + - name: Calculate RPM Build Matrix + id: matrix + run: | # do not use the non-| format for this script + l=() + trap 'echo "text=[$(IFS=","; echo "${l[*]}")]" >> $GITHUB_OUTPUT' EXIT + if ${CP_SKIP_BUILD:-false}; then + exit 0 + fi + if ! ${CP_SKIP_BUILD_EL8_RPM:-false}; then + l+=('"el8"') + fi + if ! ${CP_SKIP_BUILD_EL9_RPM:-false}; then + l+=('"el9"') + fi + if ${{ github.event_name == 'push' }} || + (${{ github.event_name == 'pull_request' }} && + ! ${CP_SKIP_BUILD_LEAP15_RPM:-false}); then + l+=('"leap15"') + fi + + Build-RPM: + name: Build RPM + permissions: + statuses: write + runs-on: [self-hosted, docker] + needs: [Create-symlinks, Import-commit-pragmas, Calc-rpm-build-matrix] + if: needs.Import-commit-pragmas.outputs.run-gha == 'true' && + needs.Create-symlinks.result == 'success' && + ((!cancelled()) || success() || failure()) + strategy: + matrix: + distro: ${{ fromJSON(needs.Calc-rpm-build-matrix.outputs.matrix) }} + fail-fast: false + env: + ARTIFACTORY_URL: https://artifactory.dc.hpdd.intel.com/ + DAOS_EMAIL: brian.murrell@intel.com + DAOS_FULLNAME: daos-stack + DISTRO: ${{ matrix.distro }} + DISTRO_REPOS: disabled + DOCKER_BUILDKIT: 0 + JENKINS_URL: https://build.hpdd.intel.com/ + ARTIFACTS_URL: file:///scratch/job_repos/ + MOCK_OPTIONS: --uniqueext=${{ github.run_id }} + PR_NUM: ${{ github.event.pull_request.number }} + # TODO -- this should be on stable, backedup storage, not /scratch + # yamllint disable-line rule:line-length + REPO_PATH: /scratch/job_repos/daos-stack/job/daos/job/PR-${{ github.event.pull_request.number }}/ + REPO_FILE_URL: https://artifactory.dc.hpdd.intel.com/artifactory/repo-files/ + RUN_ID: ${{ github.run_id }} + TARGET: ${{ matrix.distro }} + # keep VS Code's GHA linting happy + STAGE_NAME: + DISTRO_NAME: + DISTRO_VERSION: + CP_LEAP15_VERSION: + COMMIT_STATUS_DISTRO_VERSION: + FVERSION: + steps: + - name: Import commit pragmas + uses: ./.github/actions/import-commit-pragmas + - name: Set variables + run: | + FVERSION="38" + case ${{ matrix.distro }} in + 'el8') + CHROOT_NAME="rocky+epel-8-x86_64" + DISTRO_NAME="EL" + DISTRO_VERSION="${{ env.EL8_BUILD_VERSION }}" + COMMIT_STATUS_DISTRO_VERSION="8" + ;; + 'el9') + CHROOT_NAME="rocky+epel-9-x86_64" + DISTRO_NAME="EL" + DISTRO_VERSION="${{ env.EL9_BUILD_VERSION }}" + ;; + 'leap15') + CHROOT_NAME="opensuse-leap-${{ env.CP_LEAP15_VERSION && + env.CP_LEAP15_VERSION || + env.LEAP15_VERSION }}-x86_64" + DISTRO_NAME="Leap" + DISTRO_VERSION="${{ env.CP_LEAP15_VERSION && + env.CP_LEAP15_VERSION || env.LEAP15_VERSION }}" + ;; + esac + echo "CHROOT_NAME=$CHROOT_NAME" >> $GITHUB_ENV + echo "DISTRO_NAME=$DISTRO_NAME" >> $GITHUB_ENV + echo "DISTRO_VERSION=$DISTRO_VERSION" >> $GITHUB_ENV + echo "BUILD_CHROOT=/var/lib/mock/$CHROOT_NAME-${{ github.run_id }}/" >> $GITHUB_ENV + echo "STAGE_NAME=Build RPM on $DISTRO_NAME $DISTRO_VERSION" >> $GITHUB_ENV + echo "FVERSION=$FVERSION" >> $GITHUB_ENV + echo "COMMIT_STATUS_DISTRO_VERSION=$COMMIT_STATUS_DISTRO_VERSION" >> $GITHUB_ENV + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Build RPM Docker image + id: build-rpm-docker-image + continue-on-error: true + run: docker build --file utils/rpms/packaging/Dockerfile.mockbuild + --build-arg CACHEBUST=$(date +%s%3N) + --build-arg CB0=$(date +%V) + --build-arg REPO_FILE_URL=$REPO_FILE_URL + --build-arg UID=$(id -u) + --build-arg FVERSION=${{ env.FVERSION }} + --tag mock-build + utils/rpms + - name: Build RPM + id: build-rpm + continue-on-error: true + # yamllint disable rule:line-length + run: rm -rf mock_result; + mkdir -p mock_result; + docker run --name mock-build-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.distro }} + --user build + -v "$PWD":"$PWD" -w "$PWD" + -v "$PWD"/mock_result:/var/lib/mock/$CHROOT_NAME/result + --privileged=true + -e DAOS_FULLNAME="$DAOS_FULLNAME" + -e DAOS_EMAIL="$DAOS_EMAIL" + -e DISTRO_VERSION="$DISTRO_VERSION" + -e STAGE_NAME="$STAGE_NAME" + -e CHROOT_NAME="$CHROOT_NAME" + -e ARTIFACTORY_URL="$ARTIFACTORY_URL" + -e REPO_FILE_URL="$REPO_FILE_URL" + -e JENKINS_URL="$JENKINS_URL" + -e TARGET="$TARGET" + mock-build ci/rpm/build.sh + # yamllint enable rule:line-length + - name: Build RPM failure log + id: build-rpm-fail-log + continue-on-error: true + if: steps.build-rpm.outcome != 'success' + run: cat mock_result/root.log; + cat mock_result/build.log + - name: Save RPM build logs + continue-on-error: true + uses: actions/upload-artifact@v4 + with: + name: ${{ env.STAGE_NAME }} logs + path: | + mock_result/root.log + mock_result/build.log + - name: Create repo + id: create-repo + if: steps.build-rpm.outcome == 'success' + continue-on-error: true + run: CHROOT_NAME=$CHROOT_NAME ci/rpm/create_repo.sh + - name: Test repo + id: test-repo + if: steps.create-repo.outcome == 'success' + continue-on-error: true + run: . ci/gha_functions.sh; + dnf --disablerepo=\* --repofrompath + testrepo,file://${REPO_PATH}${{ github.run_number }}/artifact/artifacts/$TARGET + repoquery -a + - name: Remove lastSuccessfulBuild link and exit failure + if: steps.test-repo.outcome != 'success' + run: rm -f ${REPO_PATH}lastSuccessfulBuild; + exit 1 + - name: Publish RPMs + uses: actions/upload-artifact@v4 + with: + name: ${{ env.DISTRO_NAME }} ${{ env.DISTRO_VERSION }} RPM repository + path: ${{ env.REPO_PATH}}${{ github.run_number }}/artifact/artifacts/${{ env.TARGET }} + - name: Update commit status + uses: ouzi-dev/commit-status-updater@v2 + with: + # yamllint disable-line rule:line-length + name: 'build/Build RPM on ${{ env.DISTRO_NAME }} ${{ env.COMMIT_STATUS_DISTRO_VERSION && env.COMMIT_STATUS_DISTRO_VERSION || env.DISTRO_VERSION }}' + status: "${{ job.status }}" + + Calc-functional-matrix: + name: Calculate Functional Testing Matrix + runs-on: [self-hosted, wolf] + needs: [Import-commit-pragmas] + if: needs.Import-commit-pragmas.outputs.run-gha == 'true' && + ((!cancelled()) || success() || failure()) + outputs: + matrix: ${{ steps.matrix.outputs.text }} + steps: + - name: Import commit pragmas + uses: ./.github/actions/import-commit-pragmas + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Calculate Functional Testing Matrix + id: matrix + run: | # do not use the non-| format for this script + . ci/gha_functions.sh + set -eu + # it might seem tempting to factor in the result of the build for this + # distro here and not include a failed build in the test matrix but + # the problem with that is that if/when the user asks GHA to rebuild + # all failed jobs and a previously failed RPM job is successful, the + # test matrix won't include testing it since it was calculated and was + # successful on the previous run without the failed build stage in it + l=() + trap 'echo "text=[$(IFS=","; echo "${l[*]}")]" >> $GITHUB_OUTPUT' EXIT + if ${CP_SKIP_FUNC_TEST:-false}; then + exit 0 + fi + if ! cd src/tests/ftest; then + echo "src/tests/ftest doesn't exist." + echo "Could not determine if tests exist for this stage, assuming they do." + exit 0 + fi + + if ./launch.py --list "$(get_test_tags "-hw")"; then + if ! ${CP_SKIP_BUILD_EL8_RPM:-false} && + ! ${CP_SKIP_FUNC_TEST_EL8:-false}; then + # it would definitely be nicer to get these into the environment + # as unquoted strings so that we didn't have to double quote here + l+=('"el8"') + fi + if ! ${CP_SKIP_BUILD_EL9_RPM:-false} && + ! ${CP_SKIP_FUNC_TEST_EL9:-false}; then + l+=('"el9"') + fi + if ${{ github.event_name == 'push' }} || + (${{ github.event_name == 'pull_request' }} && + ! ${CP_SKIP_BUILD_LEAP15_RPM:-false} && + ! ${CP_SKIP_FUNC_TEST_LEAP15:-true}); then + l+=('"leap15"') + fi + fi + + Functional: + name: Functional Testing + runs-on: [self-hosted, wolf] + permissions: + statuses: write + # https://github.com/EnricoMi/publish-unit-test-result-action#permissions + checks: write + pull-requests: write + timeout-minutes: 7200 + needs: [Build-RPM, Import-commit-message, Calc-functional-matrix, Import-commit-pragmas] + strategy: + matrix: + distro: ${{ fromJSON(needs.Calc-functional-matrix.outputs.matrix) }} + fail-fast: false + # https://github.com/actions/runner/issues/491#issuecomment-926924523 + if: | + needs.Import-commit-pragmas.outputs.run-gha == 'true' && + needs.Calc-functional-matrix.outputs.matrix != '[]' && + (!cancelled()) && + (needs.Build-RPM.result == 'success' || + needs.Build-RPM.result == 'skipped') + env: + CONFIG_POWER_ONLY: false + PRAGMA_SUFFIX: -vm + OPERATIONS_EMAIL: brian.murrell@intel.com + TEST_RPMS: true + COMMIT_MESSAGE: ${{ needs.Import-commit-message.outputs.message }} + JENKINS_URL: https://build.hpdd.intel.com/ + REPOSITORY_URL: https://repo.dc.hpdd.intel.com/ + REMOVE_EXISTING_RPMS: false + # TODO -- this should be on stable, backedup storage + ARTIFACTS_URL: file:///scratch/job_repos/ + REPO_FILE_URL: https://artifactory.dc.hpdd.intel.com/artifactory/repo-files/ + # keep VS Code's GHA linting happy + NODESTRING: + CP_PR_REPOS: + CP_FEATURES: + CP_TEST_TAG: + CP_EL8_VM9_LABEL: + CP_EL9_VM9_LABEL: + CP_LEAP15_VM9_LABEL: + CP_PRIORITY: + CP_EL8_VERSION: + CP_EL9_VERSION: + CP_LEAP15_VERSION: + DISTRO: + CLUSTER_REQUEST_reqid: + STAGE_NAME: + QUEUE_URL: + LABEL: + DISTRO_NAME: + DISTRO_VERSION: + COMMIT_STATUS_DISTRO_VERSION: + steps: + - name: Import commit pragmas + uses: ./.github/actions/import-commit-pragmas + - name: Set variables + run: | + set -eux + env + STAGE_TAGS="-hw" + FTEST_ARG="" + INST_RPMS="daos-client daos-tests daos-server daos-serialize daos-tests-internal" + case "${{ matrix.distro }}" in + 'el8') + CHROOT_NAME="rocky+epel-8-x86_64" + DISTRO_NAME="EL" + DISTRO_NAME_UPPER="EL" + DISTRO_NAME_LOWER="el" + DISTRO_VERSION="${{ env.CP_EL8_VERSION && + env.CP_EL8_VERSION || env.EL8_VERSION }}" + DISTRO_VERSION_MAJOR="8" + OPENMPI="openmpi" + LABEL="${{ env.CP_EL8_VM9_LABEL && + env.CP_EL8_VM9_LABEL || 'ci_vm9' }}" + ;; + 'el9') + CHROOT_NAME="rocky+epel-9-x86_64" + DISTRO_NAME="EL" + DISTRO_NAME_UPPER="EL" + DISTRO_NAME_LOWER="el" + DISTRO_VERSION="${{ env.CP_EL9_VERSION && + env.CP_EL9_VERSION || env.EL9_VERSION }}" + DISTRO_VERSION_MAJOR="9" + PROV_DISTRO_VERSION_MAJOR="8" + OPENMPI="openmpi" + LABEL="${{ env.CP_EL9_VM9_LABEL && + env.CP_EL9_VM9_LABEL || 'ci_vm9' }}" + ;; + 'leap15') + CHROOT_NAME="opensuse-leap-${{ env.CP_LEAP15_VERSION && + env.CP_LEAP15_VERSION || + env.LEAP15_VERSION }}-x86_64" + DISTRO_NAME="Leap" + DISTRO_NAME_UPPER="LEAP" + DISTRO_NAME_LOWER="leap" + DISTRO_VERSION="${{ env.CP_LEAP15_VERSION && + env.CP_LEAP15_VERSION || env.LEAP15_VERSION }}" + DISTRO_VERSION_MAJOR="15" + OPENMPI="openmpi3" + LABEL="${{ env.CP_LEAP15_VM9_LABEL && + env.CP_LEAP15_VM9_LABEL || 'ci_vm9' }}" + ;; + esac + echo "CHROOT_NAME=$CHROOT_NAME" >> $GITHUB_ENV + echo "DISTRO_NAME=$DISTRO_NAME" >> $GITHUB_ENV + echo "DISTRO_VERSION=$DISTRO_VERSION" >> $GITHUB_ENV + echo "DISTRO_WITH_VERSION=$DISTRO_NAME_LOWER$DISTRO_VERSION" >> $GITHUB_ENV + echo "BUILD_CHROOT=/var/lib/mock/$CHROOT_NAME-${{ github.run_id }}/" >> $GITHUB_ENV + echo "STAGE_NAME=Functional on $DISTRO_NAME $DISTRO_VERSION" >> $GITHUB_ENV + echo "STAGE_TAGS=$STAGE_TAGS" >> $GITHUB_ENV + echo "FTEST_ARG=$FTEST_ARG" >> $GITHUB_ENV + echo "DISTRO=${DISTRO_NAME_UPPER}_$DISTRO_VERSION_MAJOR" >> $GITHUB_ENV + echo -n "PROVISION_DISTRO=${DISTRO_NAME_UPPER}_" >> $GITHUB_ENV + echo "${PROV_DISTRO_VERSION_MAJOR:-$DISTRO_VERSION_MAJOR}" >> $GITHUB_ENV + echo -n "DAOS_STACK_${DISTRO_NAME_UPPER}_" >> $GITHUB_ENV + echo "${PROV_DISTRO_VERSION_MAJOR:-$DISTRO_VERSION_MAJOR}_LOCAL_REPO=not_used" >> \ + $GITHUB_ENV + echo "LABEL=$LABEL" >> $GITHUB_ENV + echo "INST_RPMS=$INST_RPMS" >> $GITHUB_ENV + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 500 + ref: ${{ github.event.pull_request.head.sha }} + - name: Request and Provision a Cluster + timeout-minutes: 7200 + uses: ./.github/actions/provision-cluster + with: + condition: env.CP_SKIP_FUNC_TEST-${{ env.DISTRO }} != 'true' && \ + env.CP_SKIP_FUNC_TEST != 'true' + - name: Run Test + timeout-minutes: 7200 + if: env.CP_SKIP_FUNC_TEST-${{ env.DISTRO }} != 'true' && env.CP_SKIP_FUNC_TEST != 'true' + id: run-test + run: | + . ci/gha_functions.sh + NODE_COUNT="$NODE_COUNT" \ + TEST_TAG="$(get_test_tags ${{ env.STAGE_TAGS}})" \ + FTEST_ARG="${{ env.FTEST_ARG }}" ci/functional/test_main.sh + - name: Cancel cluster request (if cancelled after requesting) + if: cancelled() + run: | + set -eux + . ci/gha_functions.sh + if ! JENKINS_URL="${{ env.JENKINS_URL }}" QUEUE_URL="${{ env.QUEUE_URL }}" \ + cancel_provision; then + # probably already provisioned and needs unprovisioning + if ! cleanup_provision_request "${{ env.CLUSTER_REQUEST_reqid }}"; then + exit 1 + fi + fi + - name: Job cleanup + if: (!cancelled() && (success() || failure())) + run: | + set -eux + . ci/gha_functions.sh + NODELIST=${{ env.NODESTRING }} ci/functional/job_cleanup.sh || true + cleanup_provision_request "${{ env.CLUSTER_REQUEST_reqid }}" + - name: Publish test results + if: (!cancelled()) && (success() || failure()) && + steps.run-test.outcome != 'skipped' + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + check_name: ${{ env.STAGE_NAME }} Test Results (old) + github_token: ${{ secrets.GITHUB_TOKEN }} + junit_files: ${{ env.STAGE_NAME }}/**/results.xml + - name: Publish artifacts + if: (!cancelled()) && (success() || failure()) && + steps.run-test.outcome != 'skipped' + uses: actions/upload-artifact@v4 + with: + name: ${{ env.STAGE_NAME }} artifacts + path: ${{ env.STAGE_NAME }}/** + - name: Upload test results + if: (success() || failure()) && + steps.run-test.outcome != 'skipped' + uses: actions/upload-artifact@v4 + with: + name: ${{ env.STAGE_NAME }} test-results + path: ${{ env.STAGE_NAME }}/**/results.xml + - name: Update commit status + uses: ouzi-dev/commit-status-updater@v2 + with: + # yamllint disable-line rule:line-length + name: 'test/Functional on ${{ env.DISTRO_NAME }} ${{ env.COMMIT_STATUS_DISTRO_VERSION && env.COMMIT_STATUS_DISTRO_VERSION || env.DISTRO_VERSION }}' + status: "${{ job.status }}" + + Calc-functional-hardware-matrix: + name: Calculate Functional Hardware Testing Matrix + runs-on: [self-hosted, wolf] + needs: [Import-commit-pragmas] + if: needs.Import-commit-pragmas.outputs.run-gha == 'true' && + ((!cancelled()) || success() || failure()) + outputs: + matrix: ${{ steps.matrix.outputs.text }} + steps: + - name: Import commit pragmas + uses: ./.github/actions/import-commit-pragmas + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Calculate Functional Testing Matrix + id: matrix + run: | # do not use the non-| format for this script + . ci/gha_functions.sh + set -eu + # it might seem tempting to factor in the result of the build for this + # distro here and not include a failed build in the test matrix but + # the problem with that is that if/when the user asks GHA to rebuild + # all faiiled jobs and a previously failed RPM job is successful, the + # test matrix won't include testing it since it was calculated and was + # successful on the previous run without the failed build stage in it + l=() + trap 'echo "text=[$(IFS=","; echo "${l[*]}")]" >> $GITHUB_OUTPUT' EXIT + if ${CP_SKIP_FUNC_HW_TEST:-false}; then + exit 0 + fi + if ! cd src/tests/ftest; then + echo "src/tests/ftest doesn't exist." + echo "Could not determine if tests exist for this stage, assuming they do." + exit 0 + fi + if ! "${CP_SKIP_FUNC_HW_TEST_LARGE:-false}" && + ./launch.py --list "$(get_test_tags "hw,large,-provider")"; then + # it would definitely be nicer to get these into the environment + # as unquoted strings so that we didn't have to double quote here + l+=('"Large"') + fi + if ! ${CP_SKIP_FUNC_HW_TEST_MEDIUM:-false} && + ./launch.py --list "$(get_test_tags "hw,medium,-provider")"; then + l+=('"Medium"') + fi + if ! ${CP_SKIP_FUNC_HW_TEST_MEDIUM_VERBS_PROVIDER:-false} && + ./launch.py --list "$(get_test_tags "hw,medium,provider")"; then + l+=('"Medium Verbs Provider"') + fi + if ${{ github.event_name == 'push' }} && + ! ${CP_SKIP_FUNC_HW_TEST_MEDIUM_UCX_PROVIDER:-false} && + ./launch.py --list "$(get_test_tags "hw,medium,provider")"; then + l+=('"Medium UCX Provider"') + fi + + Functional_Hardware: + name: Functional Testing on Hardware + runs-on: [self-hosted, wolf] + permissions: + statuses: write + # https://github.com/EnricoMi/publish-unit-test-result-action#permissions + checks: write + pull-requests: write + timeout-minutes: 7200 + needs: [Import-commit-message, Build-RPM, Calc-functional-hardware-matrix, + Import-commit-pragmas, Functional] + strategy: + matrix: + stage: ${{ fromJSON(needs.Calc-functional-hardware-matrix.outputs.matrix) }} + fail-fast: false + # https://github.com/actions/runner/issues/491#issuecomment-926924523 + if: | + needs.Import-commit-pragmas.outputs.run-gha == 'true' && + needs.Calc-functional-hardware-matrix.outputs.matrix != '[]' && + (!cancelled()) && + (needs.Build-RPM.result == 'success' || + needs.Build-RPM.result == 'skipped') && + (needs.Functional.result == 'success' || + needs.Functional.result == 'skipped') + env: + CONFIG_POWER_ONLY: false + PRAGMA_SUFFIX: -vm + OPERATIONS_EMAIL: brian.murrell@intel.com + TEST_RPMS: true + COMMIT_MESSAGE: ${{ needs.Import-commit-message.outputs.message }} + JENKINS_URL: https://build.hpdd.intel.com/ + REPOSITORY_URL: https://repo.dc.hpdd.intel.com/ + REMOVE_EXISTING_RPMS: false + # TODO -- this should be on stable, backedup storage + ARTIFACTS_URL: file:///scratch/job_repos/ + REPO_FILE_URL: https://artifactory.dc.hpdd.intel.com/artifactory/repo-files/ + # keep VS Code's GHA linting happy + NODESTRING: + CP_PR_REPOS: + CP_TEST_TAG: + CP_HW_MEDIUM_LABEL: + CP_HW_LARGE_LABEL: + CP_PRIORITY: + CP_EL8_VERSION: + CP_EL8_TARGET: + CLUSTER_REQUEST_reqid: + STAGE_NAME: + QUEUE_URL: + LABEL: + COMMIT_STATUS_DISTRO_VERSION: + steps: + - name: Import commit pragmas + uses: ./.github/actions/import-commit-pragmas + - name: Set variables + run: | + STAGE_TAGS="hw" + FTEST_ARG="--nvme=auto:-3DNAND" + INST_RPMS="daos-client daos-tests daos-server daos-serialize daos-tests-internal" + CHROOT_NAME="rocky+epel-8-x86_64" + DISTRO_NAME="EL" + DISTRO_NAME_UPPER="EL" + DISTRO_NAME_LOWER="el" + DISTRO_VERSION="${{ env.CP_EL8_TARGET && + env.CP_EL8_TARGET || + env.CP_EL8_VERSION && + env.CP_EL8_VERSION || env.EL8_VERSION }}" + DISTRO_VERSION_MAJOR="8" + if [[ "${{ matrix.stage }}" = Medium* ]]; then + LABEL=${{ env.CP_HW_MEDIUM_LABEL && + env.CP_HW_MEDIUM_LABEL || 'ci_nvme5' }} + STAGE_TAGS+=",medium" + SIZE="MEDIUM" + elif [[ "${{ matrix.stage }}" = Large* ]]; then + LABEL=${{ env.CP_HW_LARGE_LABEL && + env.CP_HW_LARGE_LABEL || 'ci_nvme9' }} + STAGE_TAGS+=",large" + SIZE="LARGE" + fi + if [[ "${{ matrix.stage }}" = *\ Provider ]]; then + STAGE_TAGS+=",provider" + if [[ "${{ matrix.stage }}" = *\ Verbs\ * ]]; then + FTEST_ARG+=' --provider ofi+verbs' + elif [[ "${{ matrix.stage }}" = *\ UCX\ * ]]; then + FTEST_ARG+=' --provider ucx+dc_x' + INST_RPMS+=' mercury-ucx' + elif [[ "${{ matrix.stage }}" = *\ TCP\ * ]]; then + FTEST_ARG+=' --provider ofi+tcp' + else + echo "Unknown provider in ${{ matrix.stage }}" + exit 1 + fi + else + STAGE_TAGS+=",-provider" + fi + echo "DISTRO_NAME=$DISTRO_NAME" >> $GITHUB_ENV + echo "DISTRO_VERSION=$DISTRO_VERSION" >> $GITHUB_ENV + echo "DISTRO_WITH_VERSION=$DISTRO_NAME_LOWER$DISTRO_VERSION" >> $GITHUB_ENV + echo "STAGE_NAME=Functional Hardware ${{ matrix.stage }}" >> $GITHUB_ENV + echo "STAGE_TAGS=$STAGE_TAGS" >> $GITHUB_ENV + echo "FTEST_ARG=$FTEST_ARG" >> $GITHUB_ENV + echo "DISTRO=${DISTRO_NAME_UPPER}_$DISTRO_VERSION_MAJOR" >> $GITHUB_ENV + echo -n "PROVISION_DISTRO=${DISTRO_NAME_UPPER}_" >> $GITHUB_ENV + echo "${PROV_DISTRO_VERSION_MAJOR:-$DISTRO_VERSION_MAJOR}" >> $GITHUB_ENV + echo -n "DAOS_STACK_${DISTRO_NAME_UPPER}_" >> $GITHUB_ENV + echo "${PROV_DISTRO_VERSION_MAJOR:-$DISTRO_VERSION_MAJOR}_LOCAL_REPO=not_used" >> \ + $GITHUB_ENV + echo "LABEL=$LABEL" >> $GITHUB_ENV + echo "INST_RPMS=$INST_RPMS" >> $GITHUB_ENV + echo "SIZE=$SIZE" >> $GITHUB_ENV + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 500 + ref: ${{ github.event.pull_request.head.sha }} + - name: Request and Provision a Cluster + timeout-minutes: 7200 + uses: ./.github/actions/provision-cluster + with: + condition: env.CP_SKIP_FUNC_HW_TEST-${{ env.SIZE }} != 'true' && \ + env.CP_SKIP_FUNC_HW_TEST != 'true' + - name: Run Test + timeout-minutes: 7200 + if: env.CP_SKIP_FUNC_HW_TEST-${{ env.SIZE }} != 'true' && env.CP_SKIP_FUNC_HW_TEST != 'true' + id: run-test + run: | + . ci/gha_functions.sh + NODE_COUNT="$NODE_COUNT" \ + TEST_TAG="$(get_test_tags ${{ env.STAGE_TAGS}})" \ + FTEST_ARG="${{ env.FTEST_ARG }}" ci/functional/test_main.sh + - name: Cancel cluster request (if cancelled after requesting) + if: cancelled() + run: | + set -eux + . ci/gha_functions.sh + if ! JENKINS_URL="${{ env.JENKINS_URL }}" QUEUE_URL="${{ env.QUEUE_URL }}" \ + cancel_provision; then + # probably already provisioned and needs unprovisioning + if ! cleanup_provision_request "${{ env.CLUSTER_REQUEST_reqid }}"; then + exit 1 + fi + fi + - name: Job cleanup + if: (!cancelled() && (success() || failure())) + run: | + set -eux + . ci/gha_functions.sh + cleanup_provision_request "${{ env.CLUSTER_REQUEST_reqid }}" + NODELIST=${{ env.NODESTRING }} ci/functional/job_cleanup.sh + - name: Publish test results + if: (!cancelled()) && (success() || failure()) && + steps.run-test.outcome != 'skipped' + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + check_name: ${{ env.STAGE_NAME }} Test Results (old) + github_token: ${{ secrets.GITHUB_TOKEN }} + junit_files: ${{ env.STAGE_NAME }}/**/results.xml + - name: Publish artifacts + if: (!cancelled()) && (success() || failure()) && + steps.run-test.outcome != 'skipped' + uses: actions/upload-artifact@v4 + with: + name: ${{ env.STAGE_NAME }} artifacts + path: ${{ env.STAGE_NAME }}/** + - name: Upload test results + if: (success() || failure()) && + steps.run-test.outcome != 'skipped' + uses: actions/upload-artifact@v4 + with: + name: ${{ env.STAGE_NAME }} test-results + path: ${{ env.STAGE_NAME }}/**/results.xml + - name: Update commit status + uses: ouzi-dev/commit-status-updater@v2 + with: + name: 'test/Functional Hardware ${{ matrix.stage }}' + status: "${{ job.status }}" From 155432cd60e98de8ccc42f1e80649edadb2872b0 Mon Sep 17 00:00:00 2001 From: Margaret Lawson Date: Wed, 15 Jan 2025 19:20:18 +0000 Subject: [PATCH 2/7] Add GHA workflow to run GCP weekly tests Runs DFUSE and md-on-ssd ftests, md-on-ssd unit tests Required-githooks: true Skip-test: true Skip-unit-test: true Signed-off-by: Margaret Lawson --- .../{md-on-ssd-tests.yml => gcp-weekly.yml} | 358 +++--------------- 1 file changed, 60 insertions(+), 298 deletions(-) rename .github/workflows/{md-on-ssd-tests.yml => gcp-weekly.yml} (60%) diff --git a/.github/workflows/md-on-ssd-tests.yml b/.github/workflows/gcp-weekly.yml similarity index 60% rename from .github/workflows/md-on-ssd-tests.yml rename to .github/workflows/gcp-weekly.yml index a770293959f..44a83bf34ea 100644 --- a/.github/workflows/md-on-ssd-tests.yml +++ b/.github/workflows/gcp-weekly.yml @@ -1,25 +1,27 @@ -name: RPM Build and Test +name: GCP Weekly Tests env: # TODO: we really need to define a list of supported versions (ideally it's no more than 2) # build is done on the lowest version and test on the highest with a "sanity test" - # stage done on all versions in the list ecept the highest + # stage done on all versions in the list except the highest EL8_BUILD_VERSION: 8.6 EL8_VERSION: 8.8 EL9_BUILD_VERSION: 9 EL9_VERSION: 9 LEAP15_VERSION: 15.5 + GCP_BRANCH: google/2.6 on: - workflow_dispatch: - inputs: - pr-repos: - description: 'Any PR-repos that you want included in this build' - required: false + # DO NOT LAND THIS! Testing per-PR is for testing only pull_request: + # schedule: + # # temporarily run more frequently so we can validate it works + # - cron: "15 * * * *" # runs at minute 15 of every hour of every day + +# shouldn't need this, should only ever have one running at a time. But just in case concurrency: - group: rpm-build-and-test-${{ github.head_ref || github.run_id }} + group: gcp-weekly-${{ github.run_id }} cancel-in-progress: true defaults: @@ -29,78 +31,6 @@ defaults: permissions: {} jobs: - # it's a real shame that this step is even needed. push events have the commit message # in - # ${{ github.event.head_commit.message }} but pull_requests don't. :-( - Import-commit-message: - name: Get commit message - if: github.repository == 'daos-stack/daos' - runs-on: [self-hosted, light] - # Map a step output to a job output - outputs: - message: ${{ steps.commit_message.outputs.text }} - dequoted_message: ${{ steps.dequoted_commit_message.outputs.text }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Import Commit Message - id: commit_message - run: echo "text<> $GITHUB_OUTPUT; - git show -s --format=%B >> $GITHUB_OUTPUT; - echo "EOF" >> $GITHUB_OUTPUT; - - name: Import and Dequote Commit Message - id: dequoted_commit_message - run: . ci/gha_functions.sh; - echo "text<> $GITHUB_OUTPUT; - git show -s --format=%B | escape_single_quotes >> $GITHUB_OUTPUT; - echo "EOF" >> $GITHUB_OUTPUT; - - name: Identify Commit Pragmas - run: . ci/gha_functions.sh; - echo '${{steps.dequoted_commit_message.outputs.text }}' | get_commit_pragmas - - Import-commit-pragmas: - name: Make commit pragma variables - runs-on: [self-hosted, light] - needs: [Import-commit-message] - # can't use matrixes for matrixed output yet - # https://github.com/actions/runner/pull/2477 - # strategy: - # matrix: - # distro: [el8, el9, leap15] - # include: - # - distro: el8 - # UC_DISTRO: EL8 - # - distro: el9 - # UC_DISTRO: EL9 - # - distro: leap15 - # UC_DISTRO: LEAP15 - # Map a step output to a job output - outputs: - rpm-test-version: ${{ steps.rpm-test-version.outputs.value }} - pr-repos: ${{ steps.pr-repos.outputs.value }} - run-gha: ${{ steps.run-gha.outputs.value }} - steps: - - name: Set rpm-test-version variable - id: rpm-test-version - uses: ./.github/actions/variable-from-pragma - with: - commit_message: ${{ needs.Import-commit-message.outputs.dequoted_message }} - pragma: RPM_TEST_VERSION - - name: Set pr-repos variable - id: pr-repos - uses: ./.github/actions/variable-from-pragma - with: - commit_message: ${{ needs.Import-commit-message.outputs.dequoted_message }} - pragma: PR_REPOS - - name: Set run-gha variable - id: run-gha - uses: ./.github/actions/variable-from-pragma - with: - commit_message: ${{ needs.Import-commit-message.outputs.dequoted_message }} - pragma: RUN_GHA - default: false - Create-symlinks: # you might think this is an odd place to do this and it should be done as a result of the # build and/or testing stages and ideally you'd be right. @@ -114,14 +44,10 @@ jobs: # lastSuccessfulBuild link if it fails name: Create lastBuild and lastSuccessfulBuild symlinks runs-on: [self-hosted, light] - needs: [Import-commit-pragmas] - if: needs.Import-commit-pragmas.outputs.run-gha == 'true' && - needs.Import-commit-pragmas.outputs.rpm-test-version == '' && - !contains(needs.Import-commit-pragmas.outputs.pr-repos, 'daos@') env: # TODO -- this should be on stable, backedup storage, not /scratch # yamllint disable-line rule:line-length - REPO_PATH: /scratch/job_repos/daos-stack/job/daos/job/PR-${{ github.event.pull_request.number }}/ + REPO_PATH: /scratch/job_repos/daos-stack/job/daos/job/gcp-weekly-${{ github.run_id }}/ steps: - name: Create lastBuild and lastSuccessfulBuild symlinks run: . ci/gha_functions.sh; @@ -130,47 +56,17 @@ jobs: ln -s ${{ github.run_number }} ${REPO_PATH}lastBuild; ln -s ${{ github.run_number }} ${REPO_PATH}lastSuccessfulBuild - Calc-rpm-build-matrix: - name: Calculate RPM Build Matrix - runs-on: [self-hosted, wolf] - needs: [Import-commit-pragmas, Create-symlinks] - outputs: - matrix: ${{ steps.matrix.outputs.text }} - steps: - - name: Import commit pragmas - uses: ./.github/actions/import-commit-pragmas - - name: Calculate RPM Build Matrix - id: matrix - run: | # do not use the non-| format for this script - l=() - trap 'echo "text=[$(IFS=","; echo "${l[*]}")]" >> $GITHUB_OUTPUT' EXIT - if ${CP_SKIP_BUILD:-false}; then - exit 0 - fi - if ! ${CP_SKIP_BUILD_EL8_RPM:-false}; then - l+=('"el8"') - fi - if ! ${CP_SKIP_BUILD_EL9_RPM:-false}; then - l+=('"el9"') - fi - if ${{ github.event_name == 'push' }} || - (${{ github.event_name == 'pull_request' }} && - ! ${CP_SKIP_BUILD_LEAP15_RPM:-false}); then - l+=('"leap15"') - fi - Build-RPM: name: Build RPM permissions: statuses: write runs-on: [self-hosted, docker] - needs: [Create-symlinks, Import-commit-pragmas, Calc-rpm-build-matrix] - if: needs.Import-commit-pragmas.outputs.run-gha == 'true' && - needs.Create-symlinks.result == 'success' && + needs: [Create-symlinks] + if: needs.Create-symlinks.result == 'success' && ((!cancelled()) || success() || failure()) strategy: matrix: - distro: ${{ fromJSON(needs.Calc-rpm-build-matrix.outputs.matrix) }} + distro: ['el8', 'el9'] fail-fast: false env: ARTIFACTORY_URL: https://artifactory.dc.hpdd.intel.com/ @@ -182,10 +78,9 @@ jobs: JENKINS_URL: https://build.hpdd.intel.com/ ARTIFACTS_URL: file:///scratch/job_repos/ MOCK_OPTIONS: --uniqueext=${{ github.run_id }} - PR_NUM: ${{ github.event.pull_request.number }} # TODO -- this should be on stable, backedup storage, not /scratch # yamllint disable-line rule:line-length - REPO_PATH: /scratch/job_repos/daos-stack/job/daos/job/PR-${{ github.event.pull_request.number }}/ + REPO_PATH: /scratch/job_repos/daos-stack/job/daos/job/gcp-weekly-${{ github.run_id }}/ REPO_FILE_URL: https://artifactory.dc.hpdd.intel.com/artifactory/repo-files/ RUN_ID: ${{ github.run_id }} TARGET: ${{ matrix.distro }} @@ -197,8 +92,6 @@ jobs: COMMIT_STATUS_DISTRO_VERSION: FVERSION: steps: - - name: Import commit pragmas - uses: ./.github/actions/import-commit-pragmas - name: Set variables run: | FVERSION="38" @@ -214,14 +107,6 @@ jobs: DISTRO_NAME="EL" DISTRO_VERSION="${{ env.EL9_BUILD_VERSION }}" ;; - 'leap15') - CHROOT_NAME="opensuse-leap-${{ env.CP_LEAP15_VERSION && - env.CP_LEAP15_VERSION || - env.LEAP15_VERSION }}-x86_64" - DISTRO_NAME="Leap" - DISTRO_VERSION="${{ env.CP_LEAP15_VERSION && - env.CP_LEAP15_VERSION || env.LEAP15_VERSION }}" - ;; esac echo "CHROOT_NAME=$CHROOT_NAME" >> $GITHUB_ENV echo "DISTRO_NAME=$DISTRO_NAME" >> $GITHUB_ENV @@ -233,7 +118,9 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: + # DO NOT LAND THIS. This is for testing only ref: ${{ github.event.pull_request.head.sha }} + # ref: ${{ env.GCP_BRANCH }} - name: Build RPM Docker image id: build-rpm-docker-image continue-on-error: true @@ -310,62 +197,6 @@ jobs: name: 'build/Build RPM on ${{ env.DISTRO_NAME }} ${{ env.COMMIT_STATUS_DISTRO_VERSION && env.COMMIT_STATUS_DISTRO_VERSION || env.DISTRO_VERSION }}' status: "${{ job.status }}" - Calc-functional-matrix: - name: Calculate Functional Testing Matrix - runs-on: [self-hosted, wolf] - needs: [Import-commit-pragmas] - if: needs.Import-commit-pragmas.outputs.run-gha == 'true' && - ((!cancelled()) || success() || failure()) - outputs: - matrix: ${{ steps.matrix.outputs.text }} - steps: - - name: Import commit pragmas - uses: ./.github/actions/import-commit-pragmas - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Calculate Functional Testing Matrix - id: matrix - run: | # do not use the non-| format for this script - . ci/gha_functions.sh - set -eu - # it might seem tempting to factor in the result of the build for this - # distro here and not include a failed build in the test matrix but - # the problem with that is that if/when the user asks GHA to rebuild - # all failed jobs and a previously failed RPM job is successful, the - # test matrix won't include testing it since it was calculated and was - # successful on the previous run without the failed build stage in it - l=() - trap 'echo "text=[$(IFS=","; echo "${l[*]}")]" >> $GITHUB_OUTPUT' EXIT - if ${CP_SKIP_FUNC_TEST:-false}; then - exit 0 - fi - if ! cd src/tests/ftest; then - echo "src/tests/ftest doesn't exist." - echo "Could not determine if tests exist for this stage, assuming they do." - exit 0 - fi - - if ./launch.py --list "$(get_test_tags "-hw")"; then - if ! ${CP_SKIP_BUILD_EL8_RPM:-false} && - ! ${CP_SKIP_FUNC_TEST_EL8:-false}; then - # it would definitely be nicer to get these into the environment - # as unquoted strings so that we didn't have to double quote here - l+=('"el8"') - fi - if ! ${CP_SKIP_BUILD_EL9_RPM:-false} && - ! ${CP_SKIP_FUNC_TEST_EL9:-false}; then - l+=('"el9"') - fi - if ${{ github.event_name == 'push' }} || - (${{ github.event_name == 'pull_request' }} && - ! ${CP_SKIP_BUILD_LEAP15_RPM:-false} && - ! ${CP_SKIP_FUNC_TEST_LEAP15:-true}); then - l+=('"leap15"') - fi - fi - Functional: name: Functional Testing runs-on: [self-hosted, wolf] @@ -375,15 +206,13 @@ jobs: checks: write pull-requests: write timeout-minutes: 7200 - needs: [Build-RPM, Import-commit-message, Calc-functional-matrix, Import-commit-pragmas] + needs: [Build-RPM] strategy: matrix: - distro: ${{ fromJSON(needs.Calc-functional-matrix.outputs.matrix) }} + distro: ['el8', 'el9'] fail-fast: false # https://github.com/actions/runner/issues/491#issuecomment-926924523 if: | - needs.Import-commit-pragmas.outputs.run-gha == 'true' && - needs.Calc-functional-matrix.outputs.matrix != '[]' && (!cancelled()) && (needs.Build-RPM.result == 'success' || needs.Build-RPM.result == 'skipped') @@ -392,7 +221,7 @@ jobs: PRAGMA_SUFFIX: -vm OPERATIONS_EMAIL: brian.murrell@intel.com TEST_RPMS: true - COMMIT_MESSAGE: ${{ needs.Import-commit-message.outputs.message }} + COMMIT_MESSAGE: JENKINS_URL: https://build.hpdd.intel.com/ REPOSITORY_URL: https://repo.dc.hpdd.intel.com/ REMOVE_EXISTING_RPMS: false @@ -420,13 +249,11 @@ jobs: DISTRO_VERSION: COMMIT_STATUS_DISTRO_VERSION: steps: - - name: Import commit pragmas - uses: ./.github/actions/import-commit-pragmas - name: Set variables run: | set -eux env - STAGE_TAGS="-hw" + STAGE_TAGS="vm,dfuse" FTEST_ARG="" INST_RPMS="daos-client daos-tests daos-server daos-serialize daos-tests-internal" case "${{ matrix.distro }}" in @@ -455,20 +282,6 @@ jobs: LABEL="${{ env.CP_EL9_VM9_LABEL && env.CP_EL9_VM9_LABEL || 'ci_vm9' }}" ;; - 'leap15') - CHROOT_NAME="opensuse-leap-${{ env.CP_LEAP15_VERSION && - env.CP_LEAP15_VERSION || - env.LEAP15_VERSION }}-x86_64" - DISTRO_NAME="Leap" - DISTRO_NAME_UPPER="LEAP" - DISTRO_NAME_LOWER="leap" - DISTRO_VERSION="${{ env.CP_LEAP15_VERSION && - env.CP_LEAP15_VERSION || env.LEAP15_VERSION }}" - DISTRO_VERSION_MAJOR="15" - OPENMPI="openmpi3" - LABEL="${{ env.CP_LEAP15_VM9_LABEL && - env.CP_LEAP15_VM9_LABEL || 'ci_vm9' }}" - ;; esac echo "CHROOT_NAME=$CHROOT_NAME" >> $GITHUB_ENV echo "DISTRO_NAME=$DISTRO_NAME" >> $GITHUB_ENV @@ -491,16 +304,14 @@ jobs: with: submodules: true fetch-depth: 500 + # DO NOT LAND THIS. This is for testing only ref: ${{ github.event.pull_request.head.sha }} + # ref: ${{ env.GCP_BRANCH }} - name: Request and Provision a Cluster timeout-minutes: 7200 uses: ./.github/actions/provision-cluster - with: - condition: env.CP_SKIP_FUNC_TEST-${{ env.DISTRO }} != 'true' && \ - env.CP_SKIP_FUNC_TEST != 'true' - name: Run Test timeout-minutes: 7200 - if: env.CP_SKIP_FUNC_TEST-${{ env.DISTRO }} != 'true' && env.CP_SKIP_FUNC_TEST != 'true' id: run-test run: | . ci/gha_functions.sh @@ -555,62 +366,6 @@ jobs: name: 'test/Functional on ${{ env.DISTRO_NAME }} ${{ env.COMMIT_STATUS_DISTRO_VERSION && env.COMMIT_STATUS_DISTRO_VERSION || env.DISTRO_VERSION }}' status: "${{ job.status }}" - Calc-functional-hardware-matrix: - name: Calculate Functional Hardware Testing Matrix - runs-on: [self-hosted, wolf] - needs: [Import-commit-pragmas] - if: needs.Import-commit-pragmas.outputs.run-gha == 'true' && - ((!cancelled()) || success() || failure()) - outputs: - matrix: ${{ steps.matrix.outputs.text }} - steps: - - name: Import commit pragmas - uses: ./.github/actions/import-commit-pragmas - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Calculate Functional Testing Matrix - id: matrix - run: | # do not use the non-| format for this script - . ci/gha_functions.sh - set -eu - # it might seem tempting to factor in the result of the build for this - # distro here and not include a failed build in the test matrix but - # the problem with that is that if/when the user asks GHA to rebuild - # all faiiled jobs and a previously failed RPM job is successful, the - # test matrix won't include testing it since it was calculated and was - # successful on the previous run without the failed build stage in it - l=() - trap 'echo "text=[$(IFS=","; echo "${l[*]}")]" >> $GITHUB_OUTPUT' EXIT - if ${CP_SKIP_FUNC_HW_TEST:-false}; then - exit 0 - fi - if ! cd src/tests/ftest; then - echo "src/tests/ftest doesn't exist." - echo "Could not determine if tests exist for this stage, assuming they do." - exit 0 - fi - if ! "${CP_SKIP_FUNC_HW_TEST_LARGE:-false}" && - ./launch.py --list "$(get_test_tags "hw,large,-provider")"; then - # it would definitely be nicer to get these into the environment - # as unquoted strings so that we didn't have to double quote here - l+=('"Large"') - fi - if ! ${CP_SKIP_FUNC_HW_TEST_MEDIUM:-false} && - ./launch.py --list "$(get_test_tags "hw,medium,-provider")"; then - l+=('"Medium"') - fi - if ! ${CP_SKIP_FUNC_HW_TEST_MEDIUM_VERBS_PROVIDER:-false} && - ./launch.py --list "$(get_test_tags "hw,medium,provider")"; then - l+=('"Medium Verbs Provider"') - fi - if ${{ github.event_name == 'push' }} && - ! ${CP_SKIP_FUNC_HW_TEST_MEDIUM_UCX_PROVIDER:-false} && - ./launch.py --list "$(get_test_tags "hw,medium,provider")"; then - l+=('"Medium UCX Provider"') - fi - Functional_Hardware: name: Functional Testing on Hardware runs-on: [self-hosted, wolf] @@ -620,16 +375,13 @@ jobs: checks: write pull-requests: write timeout-minutes: 7200 - needs: [Import-commit-message, Build-RPM, Calc-functional-hardware-matrix, - Import-commit-pragmas, Functional] + needs: [Build-RPM, Functional] strategy: matrix: - stage: ${{ fromJSON(needs.Calc-functional-hardware-matrix.outputs.matrix) }} + stage: ['Medium', 'Large'] fail-fast: false # https://github.com/actions/runner/issues/491#issuecomment-926924523 if: | - needs.Import-commit-pragmas.outputs.run-gha == 'true' && - needs.Calc-functional-hardware-matrix.outputs.matrix != '[]' && (!cancelled()) && (needs.Build-RPM.result == 'success' || needs.Build-RPM.result == 'skipped') && @@ -640,7 +392,7 @@ jobs: PRAGMA_SUFFIX: -vm OPERATIONS_EMAIL: brian.murrell@intel.com TEST_RPMS: true - COMMIT_MESSAGE: ${{ needs.Import-commit-message.outputs.message }} + COMMIT_MESSAGE: JENKINS_URL: https://build.hpdd.intel.com/ REPOSITORY_URL: https://repo.dc.hpdd.intel.com/ REMOVE_EXISTING_RPMS: false @@ -666,8 +418,8 @@ jobs: uses: ./.github/actions/import-commit-pragmas - name: Set variables run: | - STAGE_TAGS="hw" - FTEST_ARG="--nvme=auto:-3DNAND" + STAGE_TAGS="" + FTEST_ARG="--nvme=auto_md_on_ssd" INST_RPMS="daos-client daos-tests daos-server daos-serialize daos-tests-internal" CHROOT_NAME="rocky+epel-8-x86_64" DISTRO_NAME="EL" @@ -681,30 +433,14 @@ jobs: if [[ "${{ matrix.stage }}" = Medium* ]]; then LABEL=${{ env.CP_HW_MEDIUM_LABEL && env.CP_HW_MEDIUM_LABEL || 'ci_nvme5' }} - STAGE_TAGS+=",medium" + STAGE_TAGS="hw,medium,dfuse,-provider hw,medium,daily_regression,-provider" SIZE="MEDIUM" elif [[ "${{ matrix.stage }}" = Large* ]]; then LABEL=${{ env.CP_HW_LARGE_LABEL && env.CP_HW_LARGE_LABEL || 'ci_nvme9' }} - STAGE_TAGS+=",large" + STAGE_TAGS="hw,large,daily_regression hw,large,dfuse" SIZE="LARGE" fi - if [[ "${{ matrix.stage }}" = *\ Provider ]]; then - STAGE_TAGS+=",provider" - if [[ "${{ matrix.stage }}" = *\ Verbs\ * ]]; then - FTEST_ARG+=' --provider ofi+verbs' - elif [[ "${{ matrix.stage }}" = *\ UCX\ * ]]; then - FTEST_ARG+=' --provider ucx+dc_x' - INST_RPMS+=' mercury-ucx' - elif [[ "${{ matrix.stage }}" = *\ TCP\ * ]]; then - FTEST_ARG+=' --provider ofi+tcp' - else - echo "Unknown provider in ${{ matrix.stage }}" - exit 1 - fi - else - STAGE_TAGS+=",-provider" - fi echo "DISTRO_NAME=$DISTRO_NAME" >> $GITHUB_ENV echo "DISTRO_VERSION=$DISTRO_VERSION" >> $GITHUB_ENV echo "DISTRO_WITH_VERSION=$DISTRO_NAME_LOWER$DISTRO_VERSION" >> $GITHUB_ENV @@ -725,16 +461,14 @@ jobs: with: submodules: true fetch-depth: 500 + # DO NOT LAND THIS. This is for testing only ref: ${{ github.event.pull_request.head.sha }} + # ref: ${{ env.GCP_BRANCH }} - name: Request and Provision a Cluster timeout-minutes: 7200 uses: ./.github/actions/provision-cluster - with: - condition: env.CP_SKIP_FUNC_HW_TEST-${{ env.SIZE }} != 'true' && \ - env.CP_SKIP_FUNC_HW_TEST != 'true' - name: Run Test timeout-minutes: 7200 - if: env.CP_SKIP_FUNC_HW_TEST-${{ env.SIZE }} != 'true' && env.CP_SKIP_FUNC_HW_TEST != 'true' id: run-test run: | . ci/gha_functions.sh @@ -787,3 +521,31 @@ jobs: with: name: 'test/Functional Hardware ${{ matrix.stage }}' status: "${{ job.status }}" + + Run-unit-tests: + runs-on: [self-hosted, docker] + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + # DO NOT LAND THIS. This is for testing only + ref: ${{ github.event.pull_request.head.sha }} + # ref: ${{ env.GCP_BRANCH }} + submodules: true + - name: Build deps in Docker + run: docker build . --file utils/docker/Dockerfile.el.9 + --build-arg DAOS_BUILD=no + --build-arg DEPS_JOBS=50 + - name: Build daos in Docker + run: docker build . --file utils/docker/Dockerfile.el.9 + --build-arg DEPS_JOBS=50 + --build-arg DAOS_KEEP_SRC=yes + --build-arg DAOS_TARGET_TYPE=debug + --build-arg DAOS_JAVA_BUILD=yes + --tag gha-amd-${{github.run_id}}-${{github.run_attempt}} + - name: Run Unit Testing with bdev + run: docker run gha-amd-${{github.run_id}}-${{github.run_attempt}} + cd daos && BDEV_TEST=true ./ci/unit/test_main_node.sh + - name: Run Unit Testing with bdev and memcheck + run: docker run gha-amd-${{github.run_id}}-${{github.run_attempt}} + cd daos && WITH_VALGRIND=true BDEV_TEST=true ./ci/unit/test_main_node.sh From 99b8ba75e332f05a6684a7d16688f40c35f903f2 Mon Sep 17 00:00:00 2001 From: Margaret Lawson Date: Wed, 15 Jan 2025 21:08:23 +0000 Subject: [PATCH 3/7] Bug fixes for new GCP weekly workflow Adjust provision-cluster to work for scheduled events Add in missing conditions when invoking provision-cluster Make Docker unit tests runs privileged (to avoid sudo errors) Skip-build: true Skip-test: true Skip-unit-tests: true Required-githooks: true Signed-off-by: Margaret Lawson --- .github/actions/provision-cluster/action.yml | 12 ++++++++++-- .github/workflows/gcp-weekly.yml | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/actions/provision-cluster/action.yml b/.github/actions/provision-cluster/action.yml index a11af0f7339..b3ba0835b70 100644 --- a/.github/actions/provision-cluster/action.yml +++ b/.github/actions/provision-cluster/action.yml @@ -4,20 +4,28 @@ inputs: condition: description: Condition this should run on required: true + ref: + description: Ref for code checkout + default: "${{ github.event.pull_request.head.sha }}" + required: false runs: using: "composite" steps: - name: Checkout code uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ inputs.ref }} - name: Request and Provision a Cluster if: ${{ inputs.condition }} shell: bash run: | . ci/gha_functions.sh STAGE_NAME='${{ env.STAGE_NAME }}' - REQID='${{ github.event.pull_request.number }}-${{ github.run_number }}' + if "${{ github.event.schedule }}"; then + REQID='${{ github.run_id }}-${{ github.run_number }}' + else + REQID='${{ github.event.pull_request.number }}-${{ github.run_number }}' + fi CP_PRIORITY=${{ env.CP_PRIORITY }} if ! JENKINS_URL='${{ env.JENKINS_URL }}' \ LABEL='${{ env.LABEL }}' \ diff --git a/.github/workflows/gcp-weekly.yml b/.github/workflows/gcp-weekly.yml index 44a83bf34ea..7a6bfd85220 100644 --- a/.github/workflows/gcp-weekly.yml +++ b/.github/workflows/gcp-weekly.yml @@ -310,6 +310,11 @@ jobs: - name: Request and Provision a Cluster timeout-minutes: 7200 uses: ./.github/actions/provision-cluster + with: + condition: true + # DO NOT LAND THIS. This is for testing only + ref: ${{ github.event.pull_request.head.sha }} + # ref: ${{ env.GCP_BRANCH }} - name: Run Test timeout-minutes: 7200 id: run-test @@ -467,6 +472,11 @@ jobs: - name: Request and Provision a Cluster timeout-minutes: 7200 uses: ./.github/actions/provision-cluster + with: + condition: true + # DO NOT LAND THIS. This is for testing only + ref: ${{ github.event.pull_request.head.sha }} + # ref: ${{ env.GCP_BRANCH }} - name: Run Test timeout-minutes: 7200 id: run-test @@ -544,8 +554,8 @@ jobs: --build-arg DAOS_JAVA_BUILD=yes --tag gha-amd-${{github.run_id}}-${{github.run_attempt}} - name: Run Unit Testing with bdev - run: docker run gha-amd-${{github.run_id}}-${{github.run_attempt}} + run: docker run --privileged=true gha-amd-${{github.run_id}}-${{github.run_attempt}} cd daos && BDEV_TEST=true ./ci/unit/test_main_node.sh - name: Run Unit Testing with bdev and memcheck - run: docker run gha-amd-${{github.run_id}}-${{github.run_attempt}} + run: docker run --privileged=true gha-amd-${{github.run_id}}-${{github.run_attempt}} cd daos && WITH_VALGRIND=true BDEV_TEST=true ./ci/unit/test_main_node.sh From c218406b1a2bc742b06016f344c47102cf63cd45 Mon Sep 17 00:00:00 2001 From: Margaret Lawson Date: Thu, 16 Jan 2025 22:20:27 +0000 Subject: [PATCH 4/7] Remove unit tests, this is already being done Required-githooks: true Signed-off-by: Margaret Lawson --- .github/workflows/gcp-weekly.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/.github/workflows/gcp-weekly.yml b/.github/workflows/gcp-weekly.yml index 7a6bfd85220..a380e74adf2 100644 --- a/.github/workflows/gcp-weekly.yml +++ b/.github/workflows/gcp-weekly.yml @@ -531,31 +531,3 @@ jobs: with: name: 'test/Functional Hardware ${{ matrix.stage }}' status: "${{ job.status }}" - - Run-unit-tests: - runs-on: [self-hosted, docker] - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - # DO NOT LAND THIS. This is for testing only - ref: ${{ github.event.pull_request.head.sha }} - # ref: ${{ env.GCP_BRANCH }} - submodules: true - - name: Build deps in Docker - run: docker build . --file utils/docker/Dockerfile.el.9 - --build-arg DAOS_BUILD=no - --build-arg DEPS_JOBS=50 - - name: Build daos in Docker - run: docker build . --file utils/docker/Dockerfile.el.9 - --build-arg DEPS_JOBS=50 - --build-arg DAOS_KEEP_SRC=yes - --build-arg DAOS_TARGET_TYPE=debug - --build-arg DAOS_JAVA_BUILD=yes - --tag gha-amd-${{github.run_id}}-${{github.run_attempt}} - - name: Run Unit Testing with bdev - run: docker run --privileged=true gha-amd-${{github.run_id}}-${{github.run_attempt}} - cd daos && BDEV_TEST=true ./ci/unit/test_main_node.sh - - name: Run Unit Testing with bdev and memcheck - run: docker run --privileged=true gha-amd-${{github.run_id}}-${{github.run_attempt}} - cd daos && WITH_VALGRIND=true BDEV_TEST=true ./ci/unit/test_main_node.sh From a6aaa552a0efa91043f7b1fcf0b3fce385541a65 Mon Sep 17 00:00:00 2001 From: Margaret Lawson Date: Thu, 16 Jan 2025 22:20:53 +0000 Subject: [PATCH 5/7] Fix bug that causes post-provisioning to fail Required-githooks: true Signed-off-by: Margaret Lawson --- ci/junit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/junit.sh b/ci/junit.sh index 549922499dd..e0051b819cd 100644 --- a/ci/junit.sh +++ b/ci/junit.sh @@ -24,7 +24,7 @@ report_junit() { clush -o '-i ci_key' -l root -w "$nodes" --rcopy "$results" local results_files - results_files=("$results".*) + results_files=$(find . -maxdepth 1 -name "$results.*") if [ ${#results_files[@]} -eq 0 ]; then echo "No results found to report as JUnit results" From 19ae3c4eb6758ca5a89e19879f791334c46b6199 Mon Sep 17 00:00:00 2001 From: Margaret Lawson Date: Thu, 16 Jan 2025 22:40:25 +0000 Subject: [PATCH 6/7] Pin GHA action versions for Scorecard Signed-off-by: Margaret Lawson --- .github/workflows/gcp-weekly.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/gcp-weekly.yml b/.github/workflows/gcp-weekly.yml index a380e74adf2..444fa74a550 100644 --- a/.github/workflows/gcp-weekly.yml +++ b/.github/workflows/gcp-weekly.yml @@ -116,7 +116,7 @@ jobs: echo "FVERSION=$FVERSION" >> $GITHUB_ENV echo "COMMIT_STATUS_DISTRO_VERSION=$COMMIT_STATUS_DISTRO_VERSION" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v4@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: # DO NOT LAND THIS. This is for testing only ref: ${{ github.event.pull_request.head.sha }} @@ -162,7 +162,7 @@ jobs: cat mock_result/build.log - name: Save RPM build logs continue-on-error: true - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: ${{ env.STAGE_NAME }} logs path: | @@ -186,12 +186,12 @@ jobs: run: rm -f ${REPO_PATH}lastSuccessfulBuild; exit 1 - name: Publish RPMs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: ${{ env.DISTRO_NAME }} ${{ env.DISTRO_VERSION }} RPM repository path: ${{ env.REPO_PATH}}${{ github.run_number }}/artifact/artifacts/${{ env.TARGET }} - name: Update commit status - uses: ouzi-dev/commit-status-updater@v2 + uses: ouzi-dev/commit-status-updater@26588d166ff273fc4c0664517359948f7cdc9bf1 # v2.0.2 with: # yamllint disable-line rule:line-length name: 'build/Build RPM on ${{ env.DISTRO_NAME }} ${{ env.COMMIT_STATUS_DISTRO_VERSION && env.COMMIT_STATUS_DISTRO_VERSION || env.DISTRO_VERSION }}' @@ -300,7 +300,7 @@ jobs: echo "LABEL=$LABEL" >> $GITHUB_ENV echo "INST_RPMS=$INST_RPMS" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v4@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: true fetch-depth: 500 @@ -353,14 +353,14 @@ jobs: - name: Publish artifacts if: (!cancelled()) && (success() || failure()) && steps.run-test.outcome != 'skipped' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: ${{ env.STAGE_NAME }} artifacts path: ${{ env.STAGE_NAME }}/** - name: Upload test results if: (success() || failure()) && steps.run-test.outcome != 'skipped' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: ${{ env.STAGE_NAME }} test-results path: ${{ env.STAGE_NAME }}/**/results.xml @@ -462,7 +462,7 @@ jobs: echo "INST_RPMS=$INST_RPMS" >> $GITHUB_ENV echo "SIZE=$SIZE" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v4@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: true fetch-depth: 500 @@ -507,7 +507,7 @@ jobs: - name: Publish test results if: (!cancelled()) && (success() || failure()) && steps.run-test.outcome != 'skipped' - uses: EnricoMi/publish-unit-test-result-action@v2 + uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0 with: check_name: ${{ env.STAGE_NAME }} Test Results (old) github_token: ${{ secrets.GITHUB_TOKEN }} @@ -515,14 +515,14 @@ jobs: - name: Publish artifacts if: (!cancelled()) && (success() || failure()) && steps.run-test.outcome != 'skipped' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: ${{ env.STAGE_NAME }} artifacts path: ${{ env.STAGE_NAME }}/** - name: Upload test results if: (success() || failure()) && steps.run-test.outcome != 'skipped' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: ${{ env.STAGE_NAME }} test-results path: ${{ env.STAGE_NAME }}/**/results.xml From 00d590a5139504810861bf28ce44aa628e34912f Mon Sep 17 00:00:00 2001 From: Margaret Lawson Date: Fri, 17 Jan 2025 23:09:56 +0000 Subject: [PATCH 7/7] Add pinning for remaining GHA actions, fix hash bug Run-GHA: True Required-githooks: true Skip-build: true Skip-test: true Skip-unit-tests: true Signed-off-by: Margaret Lawson --- .github/workflows/gcp-weekly.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gcp-weekly.yml b/.github/workflows/gcp-weekly.yml index 444fa74a550..332f80edbf4 100644 --- a/.github/workflows/gcp-weekly.yml +++ b/.github/workflows/gcp-weekly.yml @@ -17,7 +17,7 @@ on: # schedule: # # temporarily run more frequently so we can validate it works - # - cron: "15 * * * *" # runs at minute 15 of every hour of every day + # - cron: "0 12 * * 6" # runs every Saturday at 12pm (UTC) # shouldn't need this, should only ever have one running at a time. But just in case concurrency: @@ -116,7 +116,7 @@ jobs: echo "FVERSION=$FVERSION" >> $GITHUB_ENV echo "COMMIT_STATUS_DISTRO_VERSION=$COMMIT_STATUS_DISTRO_VERSION" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v4@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: # DO NOT LAND THIS. This is for testing only ref: ${{ github.event.pull_request.head.sha }} @@ -300,7 +300,7 @@ jobs: echo "LABEL=$LABEL" >> $GITHUB_ENV echo "INST_RPMS=$INST_RPMS" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v4@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: true fetch-depth: 500 @@ -345,7 +345,7 @@ jobs: - name: Publish test results if: (!cancelled()) && (success() || failure()) && steps.run-test.outcome != 'skipped' - uses: EnricoMi/publish-unit-test-result-action@v2 + uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0 with: check_name: ${{ env.STAGE_NAME }} Test Results (old) github_token: ${{ secrets.GITHUB_TOKEN }} @@ -365,7 +365,7 @@ jobs: name: ${{ env.STAGE_NAME }} test-results path: ${{ env.STAGE_NAME }}/**/results.xml - name: Update commit status - uses: ouzi-dev/commit-status-updater@v2 + uses: ouzi-dev/commit-status-updater@26588d166ff273fc4c0664517359948f7cdc9bf1 # v2.0.2 with: # yamllint disable-line rule:line-length name: 'test/Functional on ${{ env.DISTRO_NAME }} ${{ env.COMMIT_STATUS_DISTRO_VERSION && env.COMMIT_STATUS_DISTRO_VERSION || env.DISTRO_VERSION }}' @@ -462,7 +462,7 @@ jobs: echo "INST_RPMS=$INST_RPMS" >> $GITHUB_ENV echo "SIZE=$SIZE" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v4@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: true fetch-depth: 500 @@ -527,7 +527,7 @@ jobs: name: ${{ env.STAGE_NAME }} test-results path: ${{ env.STAGE_NAME }}/**/results.xml - name: Update commit status - uses: ouzi-dev/commit-status-updater@v2 + uses: ouzi-dev/commit-status-updater@26588d166ff273fc4c0664517359948f7cdc9bf1 # v2.0.2 with: name: 'test/Functional Hardware ${{ matrix.stage }}' status: "${{ job.status }}"