Skip to content

Remove Telegram notifications - #1001

Open
dmytrotkk wants to merge 1 commit into
developfrom
remove-telegram-notifications
Open

dmytrotkk wants to merge 1 commit into
developfrom
remove-telegram-notifications

Conversation

@dmytrotkk

Copy link
Copy Markdown
Member

Why

No Telegram message has been delivered since skale-admin moved to python-telegram-bot 22 (merged 2025-10-06; first stable release 3.3.0, which reached validators with SKALE 5.0 in July 2026): Bot.send_message is async and the celery task never awaits it.

In node-cli:

  • On active SKALE nodes with both TG_API_KEY and TG_CHAT_ID set, compose_up also started the celery service. That worker's only task is the Telegram delivery, so it did no useful work.
  • node-cli starts the worker only when both values are non-empty, while admin enqueues messages whenever they are not None. With empty values, admin still enqueues, no worker runs, and the tasks pile up in redis.

What changed

  • node_cli/utils/docker_utils.py: removed the docker compose up -d celery step from compose_up, the NOTIFICATION_COMPOSE_SERVICES constant, and the settings parameter of compose_up, which only fed that step.
  • node_cli/operations/base.py and node_cli/operations/fair.py: callers no longer pass settings to compose_up.
  • README: removed TG_API_KEY and TG_CHAT_ID from the optional variables.
  • tests/utils/api_auth_test.py: updated the two compose_up calls.
  • Dependencies are unchanged. node-cli never depended on celery or python-telegram-bot, and redis stays for node_cli/fair/record/redis_record.py.

Compatibility

  • TG_API_KEY and TG_CHAT_ID are now ignored. The tg_api_key and tg_chat_id fields stay in skale-core settings until a skale.py release can drop them safely, so existing env files and node.toml files that set them still load.
  • Release together with the other remove-telegram-notifications PRs (skale-node, skale-admin, bounty-agent, provision). This one must ship no later than skale-node's: without it, nodes with both TG settings set run docker compose up -d celery, which fails with no such service: celery once the compose file drops the service.
  • On update, node-cli runs docker compose down with the old compose file before it replaces the file, so an existing celery container is removed.

Verification

  • ruff check (0.17.3) passes, and ruff format --check passes on every edited file.
  • scripts/run_tests.sh ran in the repo's Docker image against a docker-in-docker daemon on a private network, for develop and for this branch. Both give 283 passed and 8 failed, and the same 8 tests fail on both. They depend on the host: root user, no docker group or CLI, no btrfs or test-disk, no outside network. tests/utils/api_auth_test.py passes.
  • With run_cmd mocked, compose_up was called for active and passive SKALE, active fair (normal and boot) and passive fair, with the TG settings set and unset. The commands match develop, except that develop also runs docker compose up -d celery for active SKALE with both TG settings set.
  • scripts/build.sh builds the skale and fair binaries without network access, and both run and print their help and version.
  • git grep -I -i for celery, telegram, tg_ and notif finds nothing outside the LICENSE text and the tg_* keys kept in tests/fixtures/settings.py.

Part of skalenetwork/skale-node#891

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant