From 413dbd6f506724b28470629c90d3082dfaf26d7f Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Wed, 25 Mar 2026 13:52:47 +0100 Subject: [PATCH 1/3] chore: add notifications [skip ci] --- .github/workflows/ci_new.yaml | 17 +++++++++++++++++ .github/workflows/clean_up.yaml | 9 +++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/ci_new.yaml b/.github/workflows/ci_new.yaml index d79f806a..8679e134 100644 --- a/.github/workflows/ci_new.yaml +++ b/.github/workflows/ci_new.yaml @@ -33,6 +33,23 @@ jobs: - name: Checkout uses: actions/checkout@v6 + - name: Notify Google Chat + if: ${{ always() }} # Use always to ensure that the notification is also send on failure of former steps + uses: SimonScholz/google-chat-action@main + with: + webhookUrl: '${{ secrets.GOOGLE_WEBHOOK_URL }}' + jobStatus: '${{ job.status }}' + title: CI pipeline + subtitle: "on: ${{ github.event_name }}" + #imageUrl: https://raw.githubusercontent.com/SimonScholz/simonscholz.github.io/gatsby-homepage/src/assets/img/avatar.webp + #imageType: SQUARE + #imageAltText: Alternative image text + #createDefaultSection: false + #collapsibleDefaultSection: false + #uncollapsibleWidgetsCount: 3 + #additionalSections: '[{"header": "Additional Section", "collapsible": true, "widgets": [{"decoratedText": {"startIcon": {"knownIcon": "STAR"},"text": "Additional Section"}}] }]' + #threadKey: ${{ github.event.number }} + - name: Notify uses: ./.github/actions/notify with: diff --git a/.github/workflows/clean_up.yaml b/.github/workflows/clean_up.yaml index 318c5054..369e973e 100644 --- a/.github/workflows/clean_up.yaml +++ b/.github/workflows/clean_up.yaml @@ -34,6 +34,15 @@ jobs: - name: Checkout uses: actions/checkout@v6 + - name: Notify Google Chat + if: ${{ always() }} # Use always to ensure that the notification is also send on failure of former steps + uses: SimonScholz/google-chat-action@main + with: + webhookUrl: '${{ secrets.GOOGLE_WEBHOOK_URL }}' + jobStatus: '${{ job.status }}' + title: CI pipeline + subtitle: "on: ${{ github.event_name }} \n
with filter prefix: ${{ inputs.res_prefix }}" + - name: Notify uses: ./.github/actions/notify with: From ff144042ba106553b598b8f4ac7953db286ed611 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Wed, 25 Mar 2026 13:56:44 +0100 Subject: [PATCH 2/3] chore: add notifications [skip ci] --- .github/actions/acc_test/action.yaml | 4 ++-- .github/workflows/clean_up.yaml | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 23bcd84e..99a1ffeb 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -214,7 +214,7 @@ runs: TF_ACC_KEK_KEY_RING_ID=${TF_ACC_KEK_KEY_RING_ID} \ TF_ACC_KEK_KEY_VERSION=${TF_ACC_KEK_KEY_VERSION} \ TF_ACC_KEK_SERVICE_ACCOUNT=${TF_ACC_KEK_SERVICE_ACCOUNT} \ - go test -v ${{ inputs.test_file }} -timeout=${{ inputs.test_timeout_string }} + go test -v ${{ inputs.test_file }} -timeout=${{ inputs.test_timeout_string }} | tee -a acc_test_run.log echo "::endgroup::" env: TF_ACC_PROJECT_ID: ${{ inputs.project_id }} @@ -243,7 +243,7 @@ runs: # testArguments: "./... -timeout ${{ inputs.test_timeout_string }}" # moduleDirectory: "stackit" - - name: Run acceptance tests + - name: Run all acceptance tests if: ${{ inputs.test_file == '' }} shell: bash run: | diff --git a/.github/workflows/clean_up.yaml b/.github/workflows/clean_up.yaml index 369e973e..edb14bb4 100644 --- a/.github/workflows/clean_up.yaml +++ b/.github/workflows/clean_up.yaml @@ -40,19 +40,19 @@ jobs: with: webhookUrl: '${{ secrets.GOOGLE_WEBHOOK_URL }}' jobStatus: '${{ job.status }}' - title: CI pipeline - subtitle: "on: ${{ github.event_name }} \n
with filter prefix: ${{ inputs.res_prefix }}" + title: CLEAN-UP pipeline + subtitle: "${{ github.event_name }} with filter prefix ${{ inputs.res_prefix }}" - - name: Notify - uses: ./.github/actions/notify - with: - webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} - title: CI pipeline started - event_title: ${{ github.event.type }} - event_author: ${{ github.event.actor.login }} - event_body: "Filter: ${{ inputs.res_prefix }}" - event_number: ${{ github.event.id }} - event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ github.run_id }}" +# - name: Notify +# uses: ./.github/actions/notify +# with: +# webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} +# title: CI pipeline started +# event_title: ${{ github.event.type }} +# event_author: ${{ github.event.actor.login }} +# event_body: "Filter: ${{ inputs.res_prefix }}" +# event_number: ${{ github.event.id }} +# event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ github.run_id }}" - name: Clean uses: ./.github/actions/clean_up From b06e7ffd4030f4c04b2e9426e982d3e4e8cffc07 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Wed, 25 Mar 2026 16:53:23 +0100 Subject: [PATCH 3/3] chore: add tests [skip ci] --- .github/workflows/clean_up.yaml | 4 ++-- .github/workflows/tf-acc-test.yaml | 17 ++++++++++++++++ .../postgresflex_acc_test.go | 20 +++++++++++++++++++ .../sqlserverflex_acc_test.go | 17 ++++++++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clean_up.yaml b/.github/workflows/clean_up.yaml index edb14bb4..b5a84fed 100644 --- a/.github/workflows/clean_up.yaml +++ b/.github/workflows/clean_up.yaml @@ -41,13 +41,13 @@ jobs: webhookUrl: '${{ secrets.GOOGLE_WEBHOOK_URL }}' jobStatus: '${{ job.status }}' title: CLEAN-UP pipeline - subtitle: "${{ github.event_name }} with filter prefix ${{ inputs.res_prefix }}" + subtitle: "${{ github.event_name }} with filter prefix \"${{ inputs.res_prefix }}\"" # - name: Notify # uses: ./.github/actions/notify # with: # webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} -# title: CI pipeline started +# title: CLEAN-UP pipeline # event_title: ${{ github.event.type }} # event_author: ${{ github.event.actor.login }} # event_body: "Filter: ${{ inputs.res_prefix }}" diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 85c78437..cc76fd61 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -30,6 +30,14 @@ jobs: - name: Checkout uses: actions/checkout@v6 + - name: Notify Google Chat + if: ${{ always() }} # Use always to ensure that the notification is also send on failure of former steps + uses: SimonScholz/google-chat-action@main + with: + webhookUrl: '${{ secrets.GOOGLE_WEBHOOK_URL }}' + title: Acceptance Tests started + subtitle: "${{ github.event_name }}" + - name: Notify uses: ./.github/actions/notify with: @@ -71,6 +79,15 @@ jobs: tf_acc_kek_key_version: ${{ vars.TF_ACC_KEK_KEY_VERSION }} tf_acc_kek_service_account: ${{ vars.TF_ACC_KEK_SERVICE_ACCOUNT }} + - name: Notify Google Chat + if: ${{ always() }} # Use always to ensure that the notification is also send on failure of former steps + uses: SimonScholz/google-chat-action@main + with: + webhookUrl: '${{ secrets.GOOGLE_WEBHOOK_URL }}' + jobStatus: '${{ job.status }}' + title: Acceptance Tests started + subtitle: "${{ github.event_name }} finished" + - name: Notify uses: ./.github/actions/notify with: diff --git a/stackit/internal/services/postgresflexalpha/postgresflex_acc_test.go b/stackit/internal/services/postgresflexalpha/postgresflex_acc_test.go index 6c057cfb..4dd1e6ea 100644 --- a/stackit/internal/services/postgresflexalpha/postgresflex_acc_test.go +++ b/stackit/internal/services/postgresflexalpha/postgresflex_acc_test.go @@ -157,6 +157,9 @@ func TestAccInstance(t *testing.T) { updVersion := updNetACL updVersion.Version = "17" + updRetention := updVersion + updRetention.RetentionDays = 40 + testItemID := testutils.ResStr(pfx, "instance", exData.TfName) compareValuesSame := statecheck.CompareValue(compare.ValuesSame()) resource.ParallelTest( @@ -337,6 +340,23 @@ func TestAccInstance(t *testing.T) { ), ), }, + // Update retention_days + { + PreConfig: func() { + t.Logf(" ... %s - %s", t.Name(), "update version") + }, + Config: testutils.StringFromTemplateMust( + "testdata/instance_template.gompl", + updVersion, + ), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr( + testItemID, + "retention_days", + strconv.Itoa(int(updVersion.RetentionDays)), + ), + ), + }, // Import test // test instance imports { diff --git a/stackit/internal/services/sqlserverflexbeta/sqlserverflex_acc_test.go b/stackit/internal/services/sqlserverflexbeta/sqlserverflex_acc_test.go index 77955dd5..399eed3f 100644 --- a/stackit/internal/services/sqlserverflexbeta/sqlserverflex_acc_test.go +++ b/stackit/internal/services/sqlserverflexbeta/sqlserverflex_acc_test.go @@ -142,6 +142,9 @@ func TestAccInstance(t *testing.T) { updSizeData := exData updSizeData.Size = 25 + updRetentionDays := updSizeData + updRetentionDays.RetentionDays = 30 + testInstanceID := testutils.ResStr(pfx, "instance", exData.TfName) compareValuesSame := statecheck.CompareValue(compare.ValuesSame()) @@ -210,6 +213,20 @@ func TestAccInstance(t *testing.T) { defaultNoEncInstanceTestChecks(testInstanceID, updSizeData), ), }, + // Update retention_days + { + PreConfig: func() { + t.Logf("testing: %s - %s", t.Name(), "update storage.retention_days and verify") + }, + ExpectNonEmptyPlan: true, + Config: testutils.StringFromTemplateMust( + "testdata/instance_template.gompl", + updRetentionDays, + ), + Check: resource.ComposeTestCheckFunc( + defaultNoEncInstanceTestChecks(testInstanceID, updRetentionDays), + ), + }, // Import test // test instance imports {