diff --git a/ci/scripts/notify.py b/ci/scripts/notify.py index 69e46f6b5c4f1..0bff5b18552bd 100755 --- a/ci/scripts/notify.py +++ b/ci/scripts/notify.py @@ -10,6 +10,7 @@ # I use `slack_username` since it is more readable, but not officially supported in the docs. MAIN_CRON_TEST_MAP = { "test-notify": ["noelkwan", "noelkwan"], + "test-notify-2": ["noelkwan", "noelkwan"], "backfill-tests": ["noelkwan"], "backwards-compat-tests": ["noelkwan"], "fuzz-test": ["noelkwan"], @@ -69,7 +70,7 @@ def generate_test_status_message(failed_test_map): for test, users in failed_test_map.items(): users = " ".join(map(lambda user: f"<@{user}>", users)) messages.append(f"Test {test} failed {users}") - message = "\\n".join(messages) + message = "\n ".join(messages) return message def get_buildkite_test_status(test): @@ -80,22 +81,14 @@ def get_buildkite_test_status(test): def get_mock_test_status(test): mock_test_map = { "test-notify": "hard_failed", + "test-notify-2": "hard_failed", + "backfill-tests": "", + "backwards-compat-tests": "", + "fuzz-test": "", + "e2e-test-release": "", "e2e-iceberg-sink-tests": "passed", "e2e-java-binding-tests": "soft_failed", - "e2e-clickhouse-sink-tests": "", - "e2e-pulsar-sink-tests": "", - "s3-source-test-for-opendal-fs-engine": "", - "pulsar-source-tests": "", - "connector-node-integration-test": "" - } - return mock_test_map[test] - -def get_mock_test_status_all_pass(test): - mock_test_map = { - "test-notify": "hard_failed", - "e2e-iceberg-sink-tests": "passed", - "e2e-java-binding-tests": "soft_failed", - "e2e-clickhouse-sink-tests": "", + "e2e-clickhouse-sink-tests": "hard_failed", "e2e-pulsar-sink-tests": "", "s3-source-test-for-opendal-fs-engine": "", "pulsar-source-tests": "", @@ -113,7 +106,8 @@ def format_cmd(messages): - slack: channels: - "#notification-buildkite" - message: {messages} + message: | + {messages} YAML """ return cmd diff --git a/ci/workflows/main-cron.yml b/ci/workflows/main-cron.yml index 8d790def06b78..8a6b3b823fb7b 100644 --- a/ci/workflows/main-cron.yml +++ b/ci/workflows/main-cron.yml @@ -796,6 +796,12 @@ steps: command: | bash -c 'echo test && exit -1' + # Notification test. + - key: "test-notify-2" + if: build.pull_request.labels includes "ci/main-cron/test-notify" + command: | + bash -c 'echo test && exit -1' + - wait: true continue_on_failure: true allow_dependency_failure: true