Skip to content

Conversation

@RedstoneEnjoyer
Copy link
Contributor

Раскомментил функции алертов send_telegram_message и сверки бд fetch_dwh_db

Поправил ошибку импорта дага dwh_integrity_check

@justanothercatgirl
Copy link
Contributor

а зачем из отправки сообщения в тг убрал контекст? оно же ссылки отправляло с помощью него, не? `dags/common/integrity_check.py:27

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Russian-language comments throughout the codebase to improve code documentation and adds the structlog library as a testing dependency. The changes also remove the unused return value handling from the fetch_dwh_db function call and the result parameter from send_telegram_message calls.

  • Added inline documentation comments in Russian to explain code logic in multiple files
  • Added structlog==23.1.0 to requirements.txt under a new "Тестирование" (Testing) section
  • Removed unused return value assignment and parameter passing in the integrity check DAG

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
requirements.txt Added structlog dependency and organized requirements with Russian section headers
plugins/api_utils/send_telegram_message.py Added Russian comments explaining the graph link generation and Telegram message sending logic
plugins/api_utils/fetch_dwh_db.py Added Russian comments explaining data integrity checks and TODO note for future alerts
dags/common/integrity_check.py Removed unused return value handling and parameter passing; added inline comment

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RedstoneEnjoyer
Copy link
Contributor Author

RedstoneEnjoyer commented Nov 3, 2025

а зачем из отправки сообщения в тг убрал контекст? оно же ссылки отправляло с помощью него, не? `dags/common/integrity_check.py:27

Переменная result которая была раньше в аргументах send_telegram_message это не контекст. Она - результат функции fetch_dwh_db которая возвращает кортеж различий между БД API и DWH.
Как раз из-за того что result передается в функцию send_telegram_message возникает ошибка на airflow в этом даге - TypeError: too many positional arguments.

context как аргумент передается сам так как обе функции (fetch_dwh_db и send_telegram_message) были задекорированы через task

@justanothercatgirl
Copy link
Contributor

копилот еблан, декораторы вижу, доку airflow почитал, аргументы вижу

Все остальные изенения комменты

выглядит как фикс

@RedstoneEnjoyer RedstoneEnjoyer merged commit 2e37132 into main Nov 5, 2025
8 checks passed
@RedstoneEnjoyer RedstoneEnjoyer deleted the fix/integrity-check branch November 5, 2025 11:35
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.

4 participants