From 722c46b12de92b31d154ef674b9e786c8ab99421 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Wed, 25 Mar 2026 11:09:32 +0100 Subject: [PATCH 1/6] chore: add notification action [skip ci] --- .github/actions/notify/action.yaml | 106 +++++++++++++++++++++++++++++ .github/workflows/notify_pr.yaml | 22 ++++++ .github/workflows/tf-acc-test.yaml | 20 ++++++ 3 files changed, 148 insertions(+) create mode 100644 .github/actions/notify/action.yaml create mode 100644 .github/workflows/notify_pr.yaml diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml new file mode 100644 index 00000000..2a248c7e --- /dev/null +++ b/.github/actions/notify/action.yaml @@ -0,0 +1,106 @@ +name: Send pull request notification to Google Chat +description: | + Sends a notification to a Google Chat room when a pull request is opened. + +inputs: + title: + description: "The title of the notification." + required: true + default: 'no title provided' + + event_author: + description: "The author of the event." + required: true + default: 'unknown' + + event_title: + description: "The title of the event." + required: true + + event_body: + description: "The body of the event." + required: true + default: 'no body provided' + + event_number: + description: "The number of the event." + required: true + default: 'no number provided' + + event_url: + description: "The url of the event." + required: true + default: 'none' + + +runs: + using: "composite" + steps: + - name: Install prerequisites + shell: bash + run: apk add --no-cache curl jq + + - name: Send PR notification to Google Chat + shell: bash + run: | + set -e + + PAYLOAD=$(jq -n \ + --arg repo "${{ github.repository }}" \ + --arg title "${{ inputs.event_title }}" \ + --arg body "${{ inputs.event_body }}" \ + --arg author "${{ inputs.event_author }}" \ + --arg url "${{ inputs.event_url }}" \ + '{ + "header": { + "title": "${{ inputs.title }}", + "subtitle": "Repo: \($repo)", + "imageUrl": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/git.png", + "imageType": "SQUARE" + }, + "sections": [ + { + "header": $title, + "collapsible": false, + "widgets": [ + { + "decoratedText": { + "icon": { + "knownIcon": "PERSON" + }, + "text": "Opened by: \($author)" + } + }, + { + "textParagraph": { + "text": $body, + "maxLines": 2 + } + } + ] + }, + { + "widgets": [ + { + "buttonList": { + "buttons": [ + { + "text": "View Source Event", + "type": "FILLED", + "onClick": { + "openLink": { + "url": $url + } + } + } + ] + } + } + ] + } + ] + }') + + curl --fail-with-body -X POST -H 'Content-Type: application/json' \ + "${{ secrets.GOOGLE_WEBHOOK_URL }}&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD&threadKey=${REPO}/pr/${PR_NUMBER}" \ + -d "$(jq -n --argjson card "$PAYLOAD" '{ "cardsV2": [ { "cardId": "new-pr", "card": $card } ] }')" diff --git a/.github/workflows/notify_pr.yaml b/.github/workflows/notify_pr.yaml new file mode 100644 index 00000000..b80286f5 --- /dev/null +++ b/.github/workflows/notify_pr.yaml @@ -0,0 +1,22 @@ +name: Notify Google Chat on new PR + +on: + pull_request: + types: + - opened + +jobs: + notify-pr-google-chat: + runs-on: docker + container: + image: alpine:latest + steps: + - name: Notify + uses: ./.github/actions/notify + with: + title: New Pull Request + event_title: ${{ github.event.pull_request.title }} + event_author: ${{ github.event.pull_request.user.login }} + event_body: ${{ github.event.pull_request.body || 'No description provided.' }} + event_number: ${{ github.event.pull_request.number }} + event_url: ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 473ad815..b38997cb 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -27,6 +27,16 @@ jobs: name: Acceptance Tests runs-on: stackit-docker steps: + - name: Notify + uses: ./.github/actions/notify + with: + title: Terraform Acceptance Tests started + event_title: ${{ github.event.type }} + event_author: ${{ github.event.actor.login }} + event_body: 'No event body.' + event_number: ${{ github.event.id }} + event_url: "${{ github.repositoryUrl }}" + - name: Checkout uses: actions/checkout@v6 @@ -59,3 +69,13 @@ jobs: tf_acc_kek_key_ring_id: ${{ vars.TF_ACC_KEK_KEY_RING_ID }} tf_acc_kek_key_version: ${{ vars.TF_ACC_KEK_KEY_VERSION }} tf_acc_kek_service_account: ${{ vars.TF_ACC_KEK_SERVICE_ACCOUNT }} + + - name: Notify + uses: ./.github/actions/notify + with: + title: Terraform Acceptance Tests finished + event_title: ${{ github.event.type }} + event_author: ${{ github.event.actor.login }} + event_body: 'No event body.' + event_number: ${{ github.event.id }} + event_url: "${{ github.repositoryUrl }}" From 064d2cf1db35c60adb1e3c1219dcfdb3004023bf Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Wed, 25 Mar 2026 11:17:33 +0100 Subject: [PATCH 2/6] chore: add notification action [skip ci] --- .github/actions/notify/action.yaml | 2 +- .github/workflows/notify_pr.yaml | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index 2a248c7e..ece86e61 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -38,7 +38,7 @@ runs: steps: - name: Install prerequisites shell: bash - run: apk add --no-cache curl jq + run: apt update && apt install -y curl jq - name: Send PR notification to Google Chat shell: bash diff --git a/.github/workflows/notify_pr.yaml b/.github/workflows/notify_pr.yaml index b80286f5..888523da 100644 --- a/.github/workflows/notify_pr.yaml +++ b/.github/workflows/notify_pr.yaml @@ -7,9 +7,7 @@ on: jobs: notify-pr-google-chat: - runs-on: docker - container: - image: alpine:latest + runs-on: stackit-docker steps: - name: Notify uses: ./.github/actions/notify From 683bc64c126924670ee7d53a26777724669e01fe Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Wed, 25 Mar 2026 12:14:54 +0100 Subject: [PATCH 3/6] chore: add notification action [skip ci] --- .github/actions/acc_test/action.yaml | 11 -------- .github/actions/notify/action.yaml | 41 ++++++++++++++++++---------- .github/workflows/notify_pr.yaml | 21 ++++++++------ .github/workflows/tf-acc-test.yaml | 6 ++-- 4 files changed, 43 insertions(+), 36 deletions(-) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 857f3e35..23bcd84e 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -65,20 +65,9 @@ inputs: description: "testfile to run" default: '' - -#outputs: -# random-number: -# description: "Random number" -# value: ${{ steps.random-number-generator.outputs.random-number }} - runs: using: "composite" steps: -# - name: Random Number Generator -# id: random-number-generator -# run: echo "random-number=$(echo $RANDOM)" >> $GITHUB_OUTPUT -# shell: bash - - name: Install needed tools shell: bash run: | diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index ece86e61..c4da2bef 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -1,8 +1,11 @@ -name: Send pull request notification to Google Chat -description: | - Sends a notification to a Google Chat room when a pull request is opened. +name: Send notification via Google Chat +description: "Sends a notification to a Google Chat room when a pull request is opened." inputs: + webhook_url: + description: "The URL of the Google Chat webhook." + required: true + title: description: "The title of the notification." required: true @@ -32,28 +35,35 @@ inputs: required: true default: 'none' - runs: using: "composite" steps: - name: Install prerequisites shell: bash - run: apt update && apt install -y curl jq + run: | + echo "::group::apt install" + set -e + apt update + apt install -y curl jq + echo "::endgroup::" - - name: Send PR notification to Google Chat + - name: Notify via Google Chat Webhook shell: bash + env: + WEBHOOK: ${{ inputs.webhook_url }} run: | set -e PAYLOAD=$(jq -n \ - --arg repo "${{ github.repository }}" \ - --arg title "${{ inputs.event_title }}" \ - --arg body "${{ inputs.event_body }}" \ - --arg author "${{ inputs.event_author }}" \ - --arg url "${{ inputs.event_url }}" \ + --arg header_title "${{ inputs.title }}" \ + --arg repo "${{ github.repository || '' }}" \ + --arg title "${{ inputs.event_title || 'no event title given' }}" \ + --arg body "${{ inputs.event_body || 'no event body given' }}" \ + --arg author "${{ inputs.event_author || 'no event author given' }}" \ + --arg url "${{ inputs.event_url || 'no event url given' }}" \ '{ "header": { - "title": "${{ inputs.title }}", + "title": "$header_title", "subtitle": "Repo: \($repo)", "imageUrl": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/git.png", "imageType": "SQUARE" @@ -101,6 +111,9 @@ runs: ] }') - curl --fail-with-body -X POST -H 'Content-Type: application/json' \ - "${{ secrets.GOOGLE_WEBHOOK_URL }}&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD&threadKey=${REPO}/pr/${PR_NUMBER}" \ + curl \ + --fail-with-body \ + -X POST \ + -H 'Content-Type: application/json' \ + "${{ inputs.webhook_url }}&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD&threadKey=${{ github.repository }}/pr/${{ inputs.event_number }}" \ -d "$(jq -n --argjson card "$PAYLOAD" '{ "cardsV2": [ { "cardId": "new-pr", "card": $card } ] }')" diff --git a/.github/workflows/notify_pr.yaml b/.github/workflows/notify_pr.yaml index 888523da..fd84a220 100644 --- a/.github/workflows/notify_pr.yaml +++ b/.github/workflows/notify_pr.yaml @@ -1,4 +1,4 @@ -name: Notify Google Chat on new PR +name: Notify on new PR on: pull_request: @@ -6,15 +6,20 @@ on: - opened jobs: - notify-pr-google-chat: + notify: + name: Notify via Google Chat runs-on: stackit-docker steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Notify uses: ./.github/actions/notify with: - title: New Pull Request - event_title: ${{ github.event.pull_request.title }} - event_author: ${{ github.event.pull_request.user.login }} - event_body: ${{ github.event.pull_request.body || 'No description provided.' }} - event_number: ${{ github.event.pull_request.number }} - event_url: ${{ github.event.pull_request.html_url }} + webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} + title: "New Pull Request" + event_title: "${{ github.event.pull_request.title }}" + event_author: "${{ github.event.pull_request.user.login }}" + event_body: "${{ github.event.pull_request.body || 'No description provided.' }}" + event_number: "${{ github.event.pull_request.number }}" + event_url: "${{ github.event.pull_request.html_url }}" diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index b38997cb..5d90284d 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -27,6 +27,9 @@ jobs: name: Acceptance Tests runs-on: stackit-docker steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Notify uses: ./.github/actions/notify with: @@ -37,9 +40,6 @@ jobs: event_number: ${{ github.event.id }} event_url: "${{ github.repositoryUrl }}" - - name: Checkout - uses: actions/checkout@v6 - - name: Run Test (workflow dispatch) if: ${{ github.event_name == 'workflow_dispatch' }} uses: ./.github/actions/acc_test From 6e6e7716318fe3f2a0761c8fd9edecd81bf4ea44 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Wed, 25 Mar 2026 12:17:16 +0100 Subject: [PATCH 4/6] chore: add notification action [skip ci] --- .github/workflows/tf-acc-test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 5d90284d..93c7832c 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -33,6 +33,7 @@ jobs: - name: Notify uses: ./.github/actions/notify with: + webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} title: Terraform Acceptance Tests started event_title: ${{ github.event.type }} event_author: ${{ github.event.actor.login }} @@ -73,6 +74,7 @@ jobs: - name: Notify uses: ./.github/actions/notify with: + webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} title: Terraform Acceptance Tests finished event_title: ${{ github.event.type }} event_author: ${{ github.event.actor.login }} From bb15293dd314f263a7c01bd3fd58da6c3de00a7f Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Wed, 25 Mar 2026 13:30:36 +0100 Subject: [PATCH 5/6] fix: adjust timeout --- .github/actions/notify/action.yaml | 45 ++++++++++++++----- .../internal/wait/postgresflexalpha/wait.go | 2 +- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index c4da2bef..8c3fbdd1 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -38,6 +38,19 @@ inputs: runs: using: "composite" steps: +# - name: event list +# shell: bash +# run: | +# cat <<'EOF' +# ${{ toJSON(github) }} +# EOF +# +# - name: print env +# shell: bash +# run: | +# env +# exit 1 + - name: Install prerequisites shell: bash run: | @@ -54,23 +67,23 @@ runs: run: | set -e - PAYLOAD=$(jq -n \ - --arg header_title "${{ inputs.title }}" \ + PAYLOAD=$(jq -n -r \ + --arg header "${{ inputs.title }}" \ --arg repo "${{ github.repository || '' }}" \ --arg title "${{ inputs.event_title || 'no event title given' }}" \ --arg body "${{ inputs.event_body || 'no event body given' }}" \ --arg author "${{ inputs.event_author || 'no event author given' }}" \ - --arg url "${{ inputs.event_url || 'no event url given' }}" \ - '{ + --arg url "${{ inputs.event_url || github.repositoryUrl || github.server_url }}" \ + '{ "cardsV2": [ { "cardId": "notify-${{ github.run_id }}", "card": { "header": { - "title": "$header_title", + "title": "\($header)", "subtitle": "Repo: \($repo)", "imageUrl": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/git.png", "imageType": "SQUARE" }, "sections": [ { - "header": $title, + "header": "\($title)", "collapsible": false, "widgets": [ { @@ -83,7 +96,7 @@ runs: }, { "textParagraph": { - "text": $body, + "text": "\($body)", "maxLines": 2 } } @@ -99,7 +112,7 @@ runs: "type": "FILLED", "onClick": { "openLink": { - "url": $url + "url": "\($url)" } } } @@ -109,11 +122,21 @@ runs: ] } ] - }') + }} ] }') + + #curl \ + # --fail-with-body \ + # -X POST \ + # -H 'Content-Type: application/json' \ + # "${{ inputs.webhook_url }}&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD&threadKey=${{ github.repository }}/pr/${{ inputs.event_number }}" \ + # -d "$(jq -n --argjson card "$PAYLOAD" '{ "cardsV2": [ { "cardId": "new-pr", "card": "\($card)" } ] }')" + + #CARD=$(jq -n --argjson card $(echo $PAYLOAD | jq -r) '{ "cardsV2": [ { "cardId": "notify", "card": $card } ] }') + echo "${PAYLOAD}" | jq -r curl \ --fail-with-body \ -X POST \ -H 'Content-Type: application/json' \ - "${{ inputs.webhook_url }}&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD&threadKey=${{ github.repository }}/pr/${{ inputs.event_number }}" \ - -d "$(jq -n --argjson card "$PAYLOAD" '{ "cardsV2": [ { "cardId": "new-pr", "card": $card } ] }')" + "${{ inputs.webhook_url }}" \ + -d "${PAYLOAD}" diff --git a/stackit/internal/wait/postgresflexalpha/wait.go b/stackit/internal/wait/postgresflexalpha/wait.go index 71877f76..930fe501 100644 --- a/stackit/internal/wait/postgresflexalpha/wait.go +++ b/stackit/internal/wait/postgresflexalpha/wait.go @@ -58,7 +58,7 @@ func CreateInstanceWaitHandler( ) *wait.AsyncActionHandler[v3alpha1api.GetInstanceResponse] { instanceCreated := false var instanceGetResponse *v3alpha1api.GetInstanceResponse - maxWait := time.Minute * 45 + maxWait := time.Minute * 90 startTime := time.Now() extendedTimeout := 0 maxFailedCount := 3 From d5b4e02437c919c591a47f10c9736590724c7eeb Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Wed, 25 Mar 2026 13:31:03 +0100 Subject: [PATCH 6/6] fix: adjust timeout --- .github/actions/notify/action.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index 8c3fbdd1..f260d087 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -124,16 +124,6 @@ runs: ] }} ] }') - #curl \ - # --fail-with-body \ - # -X POST \ - # -H 'Content-Type: application/json' \ - # "${{ inputs.webhook_url }}&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD&threadKey=${{ github.repository }}/pr/${{ inputs.event_number }}" \ - # -d "$(jq -n --argjson card "$PAYLOAD" '{ "cardsV2": [ { "cardId": "new-pr", "card": "\($card)" } ] }')" - - #CARD=$(jq -n --argjson card $(echo $PAYLOAD | jq -r) '{ "cardsV2": [ { "cardId": "notify", "card": $card } ] }') - echo "${PAYLOAD}" | jq -r - curl \ --fail-with-body \ -X POST \