From bd3fcd6a978492ef258a2150d1abe749ce453277 Mon Sep 17 00:00:00 2001 From: Ariel Schulz Date: Mon, 12 Oct 2026 09:30:04 +0200 Subject: [PATCH 1/3] Switch to slackapi/slack-github-action --- .github/workflows/dependency-update.yml | 17 ++++++++++------- doc/changes/unreleased.md | 1 + .../github/workflows/dependency-update.yml | 17 ++++++++++------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/dependency-update.yml b/.github/workflows/dependency-update.yml index ebf821467..04890623b 100644 --- a/.github/workflows/dependency-update.yml +++ b/.github/workflows/dependency-update.yml @@ -112,11 +112,14 @@ jobs: - name: Report New Pull Request to Slack Channel id: report-pr-slack if: ${{ steps.create-pr.outputs.pr_url }} - uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # 2.5.0 + uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0 with: - status: '${{ job.status }}' - token: '${{ secrets.GITHUB_TOKEN }}' - notification_title: 'Dependency update for {repo} created a Pull Request' - message_format: '{workflow} created Pull Request ${{ steps.create-pr.outputs.pr_url }}' - env: - SLACK_WEBHOOK_URL: '${{ secrets.INTEGRATION_TEAM_SECURITY_UPDATES_WEBHOOK }}' + webhook: ${{ secrets.INTEGRATION_TEAM_SECURITY_UPDATES_WEBHOOK }} + webhook-type: incoming-webhook + payload: |- + text: "Dependency update for ${{ github.repository }} created a Pull Request: ${{ steps.create-pr.outputs.pr_url }}" + blocks: + - type: section + text: + type: mrkdwn + text: "*Dependency update for `${{ github.repository }}` created a Pull Request*\n<${{ steps.create-pr.outputs.pr_url }}|View Pull Request>" diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index d30e29caf..b5440f45c 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -10,3 +10,4 @@ ## Refactoring * #924: Removed the deprecated `lint:dependencies` Nox session and its unused implementation and tests. +* #972: Switched from ravsamhq/notify-slack-action to maintained slackapi/slack-github-action diff --git a/exasol/toolbox/templates/github/workflows/dependency-update.yml b/exasol/toolbox/templates/github/workflows/dependency-update.yml index 802998f6a..a4d068151 100644 --- a/exasol/toolbox/templates/github/workflows/dependency-update.yml +++ b/exasol/toolbox/templates/github/workflows/dependency-update.yml @@ -111,11 +111,14 @@ jobs: - name: Report New Pull Request to Slack Channel id: report-pr-slack if: ${{ steps.create-pr.outputs.pr_url }} - uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # 2.5.0 + uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0 with: - status: '${{ job.status }}' - token: '${{ secrets.GITHUB_TOKEN }}' - notification_title: 'Dependency update for {repo} created a Pull Request' - message_format: '{workflow} created Pull Request ${{ steps.create-pr.outputs.pr_url }}' - env: - SLACK_WEBHOOK_URL: '${{ secrets.INTEGRATION_TEAM_SECURITY_UPDATES_WEBHOOK }}' + webhook: ${{ secrets.INTEGRATION_TEAM_SECURITY_UPDATES_WEBHOOK }} + webhook-type: incoming-webhook + payload: |- + text: "Dependency update for ${{ github.repository }} created a Pull Request: ${{ steps.create-pr.outputs.pr_url }}" + blocks: + - type: section + text: + type: mrkdwn + text: "*Dependency update for `${{ github.repository }}` created a Pull Request*\n<${{ steps.create-pr.outputs.pr_url }}|View Pull Request>" From 68eacb2871c4d46f54b16dc647ab509ec0d5b185 Mon Sep 17 00:00:00 2001 From: Ariel Schulz Date: Mon, 12 Oct 2026 09:41:14 +0200 Subject: [PATCH 2/3] Remove versioned header as main migration done --- .github/workflows/build-and-publish.yml | 1 - .github/workflows/cd.yml | 1 - .github/workflows/check-release-tag.yml | 1 - .github/workflows/checks.yml | 1 - .github/workflows/ci.yml | 1 - .github/workflows/dependency-update.yml | 1 - .github/workflows/fast-tests.yml | 1 - .github/workflows/gh-pages.yml | 1 - .github/workflows/matrix.yml | 1 - .github/workflows/merge-gate.yml | 1 - .github/workflows/periodic-validation.yml | 1 - .github/workflows/pr-merge.yml | 1 - .github/workflows/report.yml | 1 - doc/changes/unreleased.md | 2 +- exasol/toolbox/config.py | 10 +++------- test/unit/config_test.py | 6 +----- test/unit/util/workflows/workflow_test.py | 6 +++--- 17 files changed, 8 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index b3fca0c7b..7675486b4 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: Build & Publish on: diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d6f152b9b..a7916d2dc 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: CD on: diff --git a/.github/workflows/check-release-tag.yml b/.github/workflows/check-release-tag.yml index cf552af1d..333b02c14 100644 --- a/.github/workflows/check-release-tag.yml +++ b/.github/workflows/check-release-tag.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: Check Release Tag on: diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 143d9000e..def9305d1 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: Checks on: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93ba1575a..152fa5c18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: CI on: diff --git a/.github/workflows/dependency-update.yml b/.github/workflows/dependency-update.yml index 04890623b..c562139d3 100644 --- a/.github/workflows/dependency-update.yml +++ b/.github/workflows/dependency-update.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: Dependency Update on: diff --git a/.github/workflows/fast-tests.yml b/.github/workflows/fast-tests.yml index 743dc1db6..7ae93ca73 100644 --- a/.github/workflows/fast-tests.yml +++ b/.github/workflows/fast-tests.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: Fast-Tests on: diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index bd8ac0045..772c732cb 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: Publish Documentation on: diff --git a/.github/workflows/matrix.yml b/.github/workflows/matrix.yml index 100e49bcf..ad92bf5e8 100644 --- a/.github/workflows/matrix.yml +++ b/.github/workflows/matrix.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: Build Matrix on: diff --git a/.github/workflows/merge-gate.yml b/.github/workflows/merge-gate.yml index 18e604e63..778fd219f 100644 --- a/.github/workflows/merge-gate.yml +++ b/.github/workflows/merge-gate.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: Merge-Gate on: diff --git a/.github/workflows/periodic-validation.yml b/.github/workflows/periodic-validation.yml index 710d6764e..863cdf3db 100644 --- a/.github/workflows/periodic-validation.yml +++ b/.github/workflows/periodic-validation.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: Periodic-Validation on: diff --git a/.github/workflows/pr-merge.yml b/.github/workflows/pr-merge.yml index fa79e68be..79f9c2e51 100644 --- a/.github/workflows/pr-merge.yml +++ b/.github/workflows/pr-merge.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: PR-Merge on: diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index 87d6facc3..5221cd947 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -1,5 +1,4 @@ # Generated and maintained by the exasol-toolbox. -# Last generated with exasol-toolbox version 10.4.0. name: Status Report on: diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index b5440f45c..6f00ecaa4 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -10,4 +10,4 @@ ## Refactoring * #924: Removed the deprecated `lint:dependencies` Nox session and its unused implementation and tests. -* #972: Switched from ravsamhq/notify-slack-action to maintained slackapi/slack-github-action +* #972: Switched from ravsamhq/notify-slack-action to maintained slackapi/slack-github-action & removed workflow versioned header diff --git a/exasol/toolbox/config.py b/exasol/toolbox/config.py index 8f987ffad..ad1e54b9f 100644 --- a/exasol/toolbox/config.py +++ b/exasol/toolbox/config.py @@ -20,7 +20,6 @@ ) from pydantic_core.core_schema import ValidationInfo -from exasol.toolbox import __version__ from exasol.toolbox.nox.plugin import ( METHODS_SPECIFIED_FOR_HOOKS, PLUGIN_ATTR_NAME, @@ -28,11 +27,8 @@ from exasol.toolbox.util.version import Version from exasol.toolbox.util.workflows.render_yaml import GithubTemplateContext -WORKFLOW_HEADER_PREFIX = ( - "# Generated and maintained by the exasol-toolbox.\n" - "# Last generated with exasol-toolbox version " -) -WORKFLOW_HEADER_PATTERN = rf"\A{re.escape(WORKFLOW_HEADER_PREFIX)}[^\n]+\.\n" +WORKFLOW_HEADER_PREFIX = "# Generated and maintained by the exasol-toolbox." +WORKFLOW_HEADER_PATTERN = rf"\A{re.escape(WORKFLOW_HEADER_PREFIX)}\n" def get_methods_with_hook_implementation( @@ -348,7 +344,7 @@ def github_template_dict(self) -> GithubTemplateContext: os_version=self.os_version, python_versions=self.python_versions, sonar_token_name=self.sonar_token_name, - workflow_header=f"{WORKFLOW_HEADER_PREFIX}{__version__}.", + workflow_header=WORKFLOW_HEADER_PREFIX, ) @computed_field # type: ignore[misc] diff --git a/test/unit/config_test.py b/test/unit/config_test.py index 8b4f34fc7..b4e73af92 100644 --- a/test/unit/config_test.py +++ b/test/unit/config_test.py @@ -1,4 +1,3 @@ -import re from collections.abc import Iterable from pathlib import Path from unittest.mock import Mock @@ -35,10 +34,7 @@ def test_works_as_defined(tmp_path, test_project_config_factory): root_path = config.root_path config_dump = config.model_dump() workflow_header = config_dump["github_template_dict"].pop("workflow_header") - assert re.sub(r"version [^\n]+\.", "version X.Y.Z.", workflow_header) == ( - "# Generated and maintained by the exasol-toolbox.\n" - "# Last generated with exasol-toolbox version X.Y.Z." - ) + assert workflow_header == "# Generated and maintained by the exasol-toolbox." assert config_dump == { "add_to_excluded_python_paths": (), "create_major_version_tags": False, diff --git a/test/unit/util/workflows/workflow_test.py b/test/unit/util/workflows/workflow_test.py index 6023c59e9..f3702d834 100644 --- a/test/unit/util/workflows/workflow_test.py +++ b/test/unit/util/workflows/workflow_test.py @@ -213,7 +213,7 @@ class TestNormalizeContent: @staticmethod def test_strips_workflow_header_when_requested(): content = ( - f"{WORKFLOW_HEADER_PREFIX}8.0.0.\n\n" + f"{WORKFLOW_HEADER_PREFIX}\n\n" "jobs:\n" " build:\n" " runs-on: ubuntu-24.04\n" @@ -226,14 +226,14 @@ def test_strips_workflow_header_when_requested(): @staticmethod def test_keeps_workflow_header_when_not_requested(): content = ( - f"{WORKFLOW_HEADER_PREFIX}8.0.0.\n\n" + f"{WORKFLOW_HEADER_PREFIX}\n\n" "jobs:\n" " build:\n" " runs-on: ubuntu-24.04\n" ) assert Workflow._normalize_content(content, strip_header=False) == ( - f"{WORKFLOW_HEADER_PREFIX}8.0.0.\n\n" + f"{WORKFLOW_HEADER_PREFIX}\n\n" "jobs:\n" " build:\n" " runs-on: ubuntu-24.04" From 712d089abb70cd3d781ee9d493e077b81c892d18 Mon Sep 17 00:00:00 2001 From: Ariel Schulz Date: Mon, 12 Oct 2026 09:55:11 +0200 Subject: [PATCH 3/3] Fix integration test --- test/integration/util/dependencies/audit_integration_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/integration/util/dependencies/audit_integration_test.py b/test/integration/util/dependencies/audit_integration_test.py index d78723a73..194fba7fd 100644 --- a/test/integration/util/dependencies/audit_integration_test.py +++ b/test/integration/util/dependencies/audit_integration_test.py @@ -180,7 +180,9 @@ def test_poetry_export_versions(self, create_export_poetry_project, tmp_path): ) content = requirements_txt.read_text() - assert self.extract_package_names(content) == EXPORT_PACKAGES + # Poetry may emit a package more than once when it is shared by multiple + # dependency groups or extras. + assert set(self.extract_package_names(content)) == set(EXPORT_PACKAGES) assert "--hash=" in content