From c5048aa762deb90e4a79d4147c2024eb8b8f601f Mon Sep 17 00:00:00 2001 From: tnazarew Date: Thu, 24 Oct 2024 07:27:36 +0200 Subject: [PATCH] debug Signed-off-by: tnazarew --- .../get_openlineage_artifacts/action.yml | 18 +++++++++++++++--- scripts/upload_file_to_gcs.py | 3 +-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/actions/get_openlineage_artifacts/action.yml b/.github/actions/get_openlineage_artifacts/action.yml index 8616278..a8f38e7 100644 --- a/.github/actions/get_openlineage_artifacts/action.yml +++ b/.github/actions/get_openlineage_artifacts/action.yml @@ -72,13 +72,18 @@ outputs: runs: using: "composite" steps: + - name: create download dir in tmp + id: create-download-dir + shell: bash + run: mkdir -p /tmp/openlineage_snapshots + - name: Download OpenLineage artifacts from build if: ${{ inputs.get-latest-snapshots == 'true' }} id: download-snapshots shell: bash run: | python ./scripts/get_latest_unreleased_artifact.py \ - --path=./ \ + --path=/tmp/openlineage_snapshots \ --skip-java=${{ inputs.skip-java }} \ --skip-spark=${{ inputs.skip-spark }} \ --skip-flink=${{ inputs.skip-flink }} \ @@ -88,6 +93,13 @@ runs: --skip-gcs=${{ inputs.skip-gcs }} \ --skip-s3=${{ inputs.skip-s3 }} + - name: list downloads + id: list-downloads + shell: bash + run: | + echo "downloaded artifacts:" + echo "/tmp/openlineage_snapshots" + # artifacts snapshots are not published in latest build if no code was changed in them # this checks which of not skipped artifacts are missing and marks them as 'to download from maven' # if previous step was skipped, all are missing (besides skipped) @@ -97,8 +109,8 @@ runs: run: | check_artifact_downloaded() { if [ $2 = 'false' ]; then - if [ -f ./$1 ]; then - echo "$3=$(ls ./$1)" >> $GITHUB_OUTPUT + if [ -f /tmp/openlineage_snapshots/$1 ]; then + echo "$3=$(ls /tmp/openlineage_snapshots/$1)" >> $GITHUB_OUTPUT else echo "skip-$3=false" >> $GITHUB_OUTPUT fi diff --git a/scripts/upload_file_to_gcs.py b/scripts/upload_file_to_gcs.py index 9c81bd6..f41bc3e 100644 --- a/scripts/upload_file_to_gcs.py +++ b/scripts/upload_file_to_gcs.py @@ -31,9 +31,8 @@ def main(): credentials_path = args.credentials if not os.path.exists(local_file_path): - print(f"file {local_file_path} not found") # Local file does not exist; do nothing - sys.exit(1) + sys.exit(0) if not gcs_path.startswith('gs://'): print("Error: GCS path must start with gs://")