From 9bb30a7bc94b777a777396b41905a82d77a2e7fe Mon Sep 17 00:00:00 2001 From: Mila Page Date: Mon, 18 Mar 2024 18:12:58 -0700 Subject: [PATCH 1/9] Add dummy file. --- .github/workflows/release-internal.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/release-internal.yml diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml new file mode 100644 index 00000000..d868682a --- /dev/null +++ b/.github/workflows/release-internal.yml @@ -0,0 +1 @@ +# this is an empty file From 2ed7ef7b2e1553acaf92ec51f72cfc3a517b07a2 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 13:46:02 -0700 Subject: [PATCH 2/9] Add dispatch to the workflow because I can't even test this on another branch without this presesnt. --- .github/workflows/release-internal.yml | 55 +++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index d868682a..d560787e 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -1 +1,54 @@ -# this is an empty file +# What? +# +# Send a sha as a fully fledged relase to an internal archive for further processing. +# +# How? +# +# Checkout the sha +# Test it +# Build it +# Upload it +# +# When? +# +# Manual trigger + +name: Release internal patch + +on: + workflow_dispatch: + inputs: + version_number: + description: "The release version number (i.e. 1.0.0b1)" + type: string + required: true + sha: + description: "The sha to use (leave empty to use latest on main)" + type: string + required: false + package_test_command: + description: "Package test command" + type: string + default: "python -c \"import dbt.adapters.postgres\"" + required: true + +defaults: + run: + shell: "bash" + +env: + PYTHON_TARGET_VERSION: 3.11 + +jobs: + invoke-reusable-workflow: + name: "Build and Release Internally" + + uses: "dbt-labs/dbt-release/.github/workflows/internal-archive-release.yml@mp/finish_internal_workflow" + + with: + version_number: "${{ inputs.version_number }}" + package_test_command: "${{ inputs.package_test_command }}" + dbms_name: "postgres" + sha: "${{ inputs.sha }}" + + secrets: "inherit" From 1b5f21c2cb9f8d64c455001df696efbe1f62c772 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 15:07:58 -0700 Subject: [PATCH 3/9] Adjust comments --- .github/workflows/release-internal.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index d560787e..27b06c4b 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -1,17 +1,14 @@ # What? # -# Send a sha as a fully fledged relase to an internal archive for further processing. +# Tag and release an arbitrary sha. Uploads to an internal archive for further processing. # # How? # -# Checkout the sha -# Test it -# Build it -# Upload it +# After checking out and testing the provided sha, the image is built and uploaded. # # When? # -# Manual trigger +# Manual trigger. name: Release internal patch From 1abf319a38b9819618e6905605afb2d29e3cfa10 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 15:09:38 -0700 Subject: [PATCH 4/9] Adjust comments --- .changes/unreleased/Under the Hood-20240320-150905.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Under the Hood-20240320-150905.yaml diff --git a/.changes/unreleased/Under the Hood-20240320-150905.yaml b/.changes/unreleased/Under the Hood-20240320-150905.yaml new file mode 100644 index 00000000..5074569d --- /dev/null +++ b/.changes/unreleased/Under the Hood-20240320-150905.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Finalize the postgres workflow +time: 2024-03-20T15:09:05.315793-07:00 +custom: + Author: versusfacit + Issue: "38" From 047cc93418790a9e14b8d6ae70b5b5cb94071c0b Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 17:08:10 -0700 Subject: [PATCH 5/9] Change input references to make documentation recommendations. --- .github/workflows/integration-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 874001c4..691029e3 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -71,8 +71,8 @@ jobs: shell: bash run: | ./.github/scripts/update_dev_packages.sh \ - ${{ github.event.inputs.dbt_adapters_branch }} \ - ${{ github.event.inputs.core_branch }} + ${{ inputs.dbt_adapters_branch }} \ + ${{ inputs.core_branch }} - name: Setup postgres shell: bash From 857ce01fd15900ccfd08f34c828891aa572d4bd2 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 19:17:37 -0700 Subject: [PATCH 6/9] Tweaks to input params. --- .github/workflows/release-internal.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index 27b06c4b..b3f2a4f4 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -20,9 +20,10 @@ on: type: string required: true sha: - description: "The sha to use (leave empty to use latest on main)" + description: "The ref (sha or branch name) to use" type: string - required: false + default: "main" + required: true package_test_command: description: "Package test command" type: string From 133819291539877f68e906c98cf7fadd57104023 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Fri, 22 Mar 2024 13:24:22 -0700 Subject: [PATCH 7/9] Change python version to match Cloud. --- .github/workflows/release-internal.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index b3f2a4f4..4427a22c 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -10,7 +10,7 @@ # # Manual trigger. -name: Release internal patch +name: "Release internal patch" on: workflow_dispatch: @@ -35,7 +35,7 @@ defaults: shell: "bash" env: - PYTHON_TARGET_VERSION: 3.11 + PYTHON_TARGET_VERSION: 3.8 jobs: invoke-reusable-workflow: From a2d0c182f4eb35da6540fdee38188758927920c3 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Tue, 26 Mar 2024 12:46:13 -0700 Subject: [PATCH 8/9] Finalize postgres job. Adjust param name and nix env var. --- .../unreleased/Under the Hood-20240320-150905.yaml | 6 ------ .github/workflows/release-internal.yml | 11 ++++------- 2 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 .changes/unreleased/Under the Hood-20240320-150905.yaml diff --git a/.changes/unreleased/Under the Hood-20240320-150905.yaml b/.changes/unreleased/Under the Hood-20240320-150905.yaml deleted file mode 100644 index 5074569d..00000000 --- a/.changes/unreleased/Under the Hood-20240320-150905.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Under the Hood -body: Finalize the postgres workflow -time: 2024-03-20T15:09:05.315793-07:00 -custom: - Author: versusfacit - Issue: "38" diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index 4427a22c..08e413df 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -1,10 +1,10 @@ # What? # -# Tag and release an arbitrary sha. Uploads to an internal archive for further processing. +# Tag and release an arbitrary ref. Uploads to an internal archive for further processing. # # How? # -# After checking out and testing the provided sha, the image is built and uploaded. +# After checking out and testing the provided ref, the image is built and uploaded. # # When? # @@ -19,7 +19,7 @@ on: description: "The release version number (i.e. 1.0.0b1)" type: string required: true - sha: + ref: description: "The ref (sha or branch name) to use" type: string default: "main" @@ -34,9 +34,6 @@ defaults: run: shell: "bash" -env: - PYTHON_TARGET_VERSION: 3.8 - jobs: invoke-reusable-workflow: name: "Build and Release Internally" @@ -47,6 +44,6 @@ jobs: version_number: "${{ inputs.version_number }}" package_test_command: "${{ inputs.package_test_command }}" dbms_name: "postgres" - sha: "${{ inputs.sha }}" + ref: "${{ inputs.ref }}" secrets: "inherit" From 86eec03595158a148571110cddd1f40a2048d3b5 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Tue, 26 Mar 2024 15:35:25 -0700 Subject: [PATCH 9/9] Change branch reference of workflow to main. --- .github/workflows/release-internal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index 08e413df..01f1a9e3 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -38,7 +38,7 @@ jobs: invoke-reusable-workflow: name: "Build and Release Internally" - uses: "dbt-labs/dbt-release/.github/workflows/internal-archive-release.yml@mp/finish_internal_workflow" + uses: "dbt-labs/dbt-release/.github/workflows/internal-archive-release.yml@main" with: version_number: "${{ inputs.version_number }}"