From 8b0938660cb9d172381dacc5e82fc52d3de17584 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 02:20:03 -0700 Subject: [PATCH 01/11] Finish internal build. --- .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 e9063a53f..9a24d4848 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -28,7 +28,7 @@ jobs: invoke-reusable-workflow: name: "Build and Release Internally" - uses: "VersusFacit/dbt-release/.github/workflows/internal-archive-release.yml@main" + uses: "dbt-labs/dbt-release/.github/workflows/internal-archive-release.yml@main" with: version_number: "${{ inputs.version_number }}" From dd50e8f9ab543bb1fa41cfc3f14294210923d045 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 02:31:44 -0700 Subject: [PATCH 02/11] Add comments. --- .github/workflows/release-internal.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index 9a24d4848..1e086fb4b 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -1,3 +1,18 @@ +# 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: From cd9871c78ec55e60b9284e6e3a7e8b78d8a1513e Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 02:35:29 -0700 Subject: [PATCH 03/11] Add different branch reference for testing with that unmerged workflow. --- .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 1e086fb4b..5dfd2ab80 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -43,7 +43,7 @@ jobs: invoke-reusable-workflow: name: "Build and Release Internally" - uses: "dbt-labs/dbt-release/.github/workflows/internal-archive-release.yml@main" + uses: "dbt-labs/dbt-release/.github/workflows/internal-archive-release.yml@mp/finish_internal_workflow" with: version_number: "${{ inputs.version_number }}" From 084846ce9cdfce1171dc9eb9556946bf403667e4 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 14:07:01 -0700 Subject: [PATCH 04/11] Debug setup --- setup.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.py b/setup.py index beffa3348..c72c82ebd 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,13 @@ def _plugin_version_trim() -> str: """ attributes = {} exec(VERSION.read_text(), attributes) + print("================") + print("================") + print(attributes["version"]) pattern = r"\+build\d+$" + print(re.sub(pattern, "", attributes["version"])) + print("================") + print("================") return re.sub(pattern, "", attributes["version"]) From 7a252dce912f5e2683292bc2f42ac1d192eadb4f Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 14:20:55 -0700 Subject: [PATCH 05/11] Revert setup.py --- setup.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/setup.py b/setup.py index c72c82ebd..beffa3348 100644 --- a/setup.py +++ b/setup.py @@ -43,13 +43,7 @@ def _plugin_version_trim() -> str: """ attributes = {} exec(VERSION.read_text(), attributes) - print("================") - print("================") - print(attributes["version"]) pattern = r"\+build\d+$" - print(re.sub(pattern, "", attributes["version"])) - print("================") - print("================") return re.sub(pattern, "", attributes["version"]) From c56d334922322e228ca711d1f62355603c5ff33a Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 14:36:47 -0700 Subject: [PATCH 06/11] 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 5dfd2ab80..99b89e357 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 4eb4a690bc839582b28c87cc0e2ded6943b92070 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 14:40:18 -0700 Subject: [PATCH 07/11] Add changelog --- .changes/unreleased/Under the Hood-20240320-144007.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Under the Hood-20240320-144007.yaml diff --git a/.changes/unreleased/Under the Hood-20240320-144007.yaml b/.changes/unreleased/Under the Hood-20240320-144007.yaml new file mode 100644 index 000000000..0c5c2b56f --- /dev/null +++ b/.changes/unreleased/Under the Hood-20240320-144007.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Finalize the redshift internal release build workflow +time: 2024-03-20T14:40:07.659826-07:00 +custom: + Author: versusfacit + Issue: "38" From 6b9b68ec9b4bf376041c5df67c0cb7f50c8ee1f7 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 19:18:49 -0700 Subject: [PATCH 08/11] 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 99b89e357..5493711a6 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 b43b247defd6028dc2c94c8506c863412744a4a4 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Fri, 22 Mar 2024 13:25:03 -0700 Subject: [PATCH 09/11] 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 5493711a6..0cb93c9f3 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 5abe586e2f028a4987269e85d466ee5f89037c57 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Tue, 26 Mar 2024 12:58:29 -0700 Subject: [PATCH 10/11] Finalize workflow. --- .../unreleased/Under the Hood-20240320-144007.yaml | 6 ------ .github/workflows/release-internal.yml | 11 ++++------- 2 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 .changes/unreleased/Under the Hood-20240320-144007.yaml diff --git a/.changes/unreleased/Under the Hood-20240320-144007.yaml b/.changes/unreleased/Under the Hood-20240320-144007.yaml deleted file mode 100644 index 0c5c2b56f..000000000 --- a/.changes/unreleased/Under the Hood-20240320-144007.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Under the Hood -body: Finalize the redshift internal release build workflow -time: 2024-03-20T14:40:07.659826-07:00 -custom: - Author: versusfacit - Issue: "38" diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index 0cb93c9f3..b281a3185 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: "redshift" - sha: "${{ inputs.sha }}" + ref: "${{ inputs.ref }}" secrets: "inherit" From fdf021723074c6a4e0dc495a7b7cfd9005d99589 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Tue, 26 Mar 2024 15:36:52 -0700 Subject: [PATCH 11/11] 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 b281a3185..0ce0f9adf 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 }}"