From ceb0eed91f7c7a6c136d8c318673a7d6bef471d3 Mon Sep 17 00:00:00 2001 From: Joshua White Date: Tue, 18 Aug 2026 06:50:19 -0700 Subject: [PATCH 1/4] Re-enable GCP upload flag --- .github/workflows/ci_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 589fd802e00..68864d3569e 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -278,7 +278,7 @@ jobs: ENABLE_TRILINOS: OFF GEOS_ENABLE_BOUNDS_CHECK: ON GCP_BUCKET: geosx/integratedTests - UPLOAD_TO_GCP: false + UPLOAD_TO_GCP: true RUNS_ON: streak2-32core NPROC: 32 DOCKER_RUN_ARGS: "--cpus=32 --memory=256g -v /etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro -v /etc/pki/tls/certs/ca-bundle.crt:/certs/ca-bundle.crt:ro" From 73bf997d39cda8afefe3a208aa2f2c5d62fd35c0 Mon Sep 17 00:00:00 2001 From: Joshua White Date: Tue, 18 Aug 2026 12:25:40 -0700 Subject: [PATCH 2/4] Improve log readibility for users --- .github/workflows/build_and_test.yml | 51 ++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 1dadd1ccd68..afa5c686688 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -188,6 +188,11 @@ jobs: script_args+=(--install-dir-basename GEOS-${SHORT_COMMIT}) if [[ "${{ inputs.UPLOAD_TO_GCP }}" == "true" && -z "${{ inputs.GCP_BUCKET }}" ]]; then + echo "::group::Baseline and log uploads" + echo "Status: configuration error" + echo "Google Cloud configuration: bucket=not set, project=${GCP_PROJECT:-not set}" + echo "No files were uploaded." + echo "::endgroup::" echo "::error::UPLOAD_TO_GCP=true requires GCP_BUCKET to be set." exit 1 fi @@ -366,6 +371,13 @@ jobs: echo "Received exit status ${EXIT_STATUS} from the build process." set -e + echo "::group::Baseline and log uploads" + UPLOAD_HEADER_PRINTED=false + GCP_CREDENTIALS_STATUS="not set" + if [[ -n "${GOOGLE_APPLICATION_CREDENTIALS:-}" ]]; then + GCP_CREDENTIALS_STATUS=configured + fi + if [[ -n "${DATA_BASENAME}" ]]; then if [ -f "${DATA_EXCHANGE_DIR}/${DATA_BASENAME}" ]; then echo "Generated artifact at ${DATA_EXCHANGE_DIR}/${DATA_BASENAME}" @@ -398,7 +410,12 @@ jobs: if [[ "${{ inputs.UPLOAD_TO_GCP }}" == "true" && -n "${{ inputs.GCP_BUCKET }}" ]]; then if [[ "${{ inputs.BUILD_TYPE }}" = "integrated_tests" || ${EXIT_STATUS} -eq 0 ]]; then - CLOUDSDK_PYTHON=python3 gcloud config set storage/parallel_composite_upload_enabled True + if ! CLOUDSDK_PYTHON=python3 gcloud config set storage/parallel_composite_upload_enabled True; then + echo "Status: upload configuration failed" + echo "Google Cloud configuration: bucket=gs://${{ inputs.GCP_BUCKET }}, project=${GCP_PROJECT:-not set}, credentials=${GCP_CREDENTIALS_STATUS}" + echo "::endgroup::" + exit 1 + fi for file in \ "${DATA_EXCHANGE_DIR}/${DATA_BASENAME}" \ @@ -406,14 +423,42 @@ jobs: "${DATA_EXCHANGE_DIR}/baseline_${DATA_BASENAME}" do if [ -f "${file}" ]; then - CLOUDSDK_PYTHON=python3 gcloud storage cp --quiet -a publicRead "${file}" gs://${{ inputs.GCP_BUCKET }}/ - echo "Uploaded https://storage.googleapis.com/${{ inputs.GCP_BUCKET }}/$(basename "${file}")" + case "$(basename "${file}")" in + baseline_*) + UPLOAD_LABEL=baselines + ;; + test_logs_*) + UPLOAD_LABEL=logs + ;; + *) + UPLOAD_LABEL=artifact + ;; + esac + + if ! CLOUDSDK_PYTHON=python3 gcloud storage cp --quiet -a publicRead "${file}" gs://${{ inputs.GCP_BUCKET }}/; then + echo "Status: upload failed" + echo "Google Cloud configuration: bucket=gs://${{ inputs.GCP_BUCKET }}, project=${GCP_PROJECT:-not set}, credentials=${GCP_CREDENTIALS_STATUS}, access=publicRead" + echo + echo "Failed upload:" + echo " ${UPLOAD_LABEL}: gs://${{ inputs.GCP_BUCKET }}/$(basename "${file}")" + echo "::endgroup::" + exit 1 + fi + + if [[ "${UPLOAD_HEADER_PRINTED}" != "true" ]]; then + echo + echo "Users can download uploaded files at:" + UPLOAD_HEADER_PRINTED=true + fi + echo " ${UPLOAD_LABEL}:" + echo " https://storage.googleapis.com/${{ inputs.GCP_BUCKET }}/$(basename "${file}")" fi done fi else echo "GCP upload disabled." fi + echo "::endgroup::" exit ${EXIT_STATUS} From c70ebff8ba00bfec3068fabb1aa3cbf745a9f248 Mon Sep 17 00:00:00 2001 From: Joshua White Date: Tue, 18 Aug 2026 12:40:00 -0700 Subject: [PATCH 3/4] Modify log section nesting --- .github/workflows/build_and_test.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index afa5c686688..4b746e51a9a 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -163,6 +163,7 @@ jobs: version: '>= 363.0.0' - name: Build, test, deploy. + id: build_test_deploy run: | # Those two bash arrays will be populated depending on the required options, # and expended as CLI arguments for the docker and scripts calls. @@ -371,7 +372,22 @@ jobs: echo "Received exit status ${EXIT_STATUS} from the build process." set -e - echo "::group::Baseline and log uploads" + echo "exit_status=${EXIT_STATUS}" >> "${GITHUB_OUTPUT}" + echo "data_basename=${DATA_BASENAME}" >> "${GITHUB_OUTPUT}" + echo "data_exchange_dir=${DATA_EXCHANGE_DIR}" >> "${GITHUB_OUTPUT}" + + exit ${EXIT_STATUS} + + - name: Baseline and log uploads + if: ${{ always() && steps.build_test_deploy.outputs.data_basename != '' }} + env: + GEOS_BUILD_EXIT_STATUS: ${{ steps.build_test_deploy.outputs.exit_status }} + GEOS_DATA_BASENAME: ${{ steps.build_test_deploy.outputs.data_basename }} + GEOS_DATA_EXCHANGE_DIR: ${{ steps.build_test_deploy.outputs.data_exchange_dir }} + run: | + EXIT_STATUS=${GEOS_BUILD_EXIT_STATUS:-1} + DATA_BASENAME=${GEOS_DATA_BASENAME} + DATA_EXCHANGE_DIR=${GEOS_DATA_EXCHANGE_DIR} UPLOAD_HEADER_PRINTED=false GCP_CREDENTIALS_STATUS="not set" if [[ -n "${GOOGLE_APPLICATION_CREDENTIALS:-}" ]]; then @@ -413,7 +429,6 @@ jobs: if ! CLOUDSDK_PYTHON=python3 gcloud config set storage/parallel_composite_upload_enabled True; then echo "Status: upload configuration failed" echo "Google Cloud configuration: bucket=gs://${{ inputs.GCP_BUCKET }}, project=${GCP_PROJECT:-not set}, credentials=${GCP_CREDENTIALS_STATUS}" - echo "::endgroup::" exit 1 fi @@ -441,7 +456,6 @@ jobs: echo echo "Failed upload:" echo " ${UPLOAD_LABEL}: gs://${{ inputs.GCP_BUCKET }}/$(basename "${file}")" - echo "::endgroup::" exit 1 fi @@ -458,9 +472,6 @@ jobs: else echo "GCP upload disabled." fi - echo "::endgroup::" - - exit ${EXIT_STATUS} - name: Prepare pip for Codecov if: inputs.CODE_COVERAGE From 277a095d59adc9f39aace08e00f605cdb3d1fcec Mon Sep 17 00:00:00 2001 From: Joshua White Date: Wed, 19 Aug 2026 09:52:54 -0700 Subject: [PATCH 4/4] Make UPLOAD_TO_GCP conditional on PR and fork status --- .github/workflows/ci_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 68864d3569e..27d9f1f9cdc 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -278,7 +278,7 @@ jobs: ENABLE_TRILINOS: OFF GEOS_ENABLE_BOUNDS_CHECK: ON GCP_BUCKET: geosx/integratedTests - UPLOAD_TO_GCP: true + UPLOAD_TO_GCP: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }} RUNS_ON: streak2-32core NPROC: 32 DOCKER_RUN_ARGS: "--cpus=32 --memory=256g -v /etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro -v /etc/pki/tls/certs/ca-bundle.crt:/certs/ca-bundle.crt:ro"