Releases: orenlab/pytmbot
v0.2.1
This update includes the following changes and improvements:
🆕 New
- Added an experimental feature to check for updates to Docker images. You can now receive notifications about new image versions directly in your bot (feature is still in testing).
🔧 Improvements
- Logger: Refactored code for better readability and performance.
📦 Dependencies
- All dependencies have been updated to their latest versions.
Feel free to test the new functionality and report any issues! 🚀
v.0.2.0 Final
🚀 The Biggest Bot Update Ever! 🎉
We’re thrilled to introduce the largest update to our bot yet! Here’s what you need to know:
📋 Key Changes:
• Main Changes Overview
Since the release of the RC version, we’ve been hard at work refining the bot, addressing issues, and optimizing its systems to deliver the best experience possible.
This update not only resolves previous challenges but also lays the foundation for exciting new features and enhancements in the future.
✨ Stay tuned—this is just the beginning! ✨
v0.2.0-rc2 HotFix
Release Notes
Fixed: SessionManager Bug
We have resolved an issue in the Session Manager that occasionally caused the background session cleanup process to block bot threads. This fix enhances the stability and performance of the bot, ensuring smoother operation during cleanup activities.
Thank you for your continued support, and please let us know if you encounter any further issues!
v0.2.0-rc1
🚀 pytmbot v0.2.0-rc1 Release Notes
We're excited to announce the release of pytmbot v0.2.0-rc1
! This version introduces a complete architectural overhaul, with changes touching every module, method, and class in the bot. Additionally, this release brings support for plugins, enhanced security, Docker container management, and significant performance optimizations. Below is a detailed breakdown of what's new and improved in this release.
✨ New Features
-
Complete Architecture Overhaul:
- Every module, method, and class has been refactored for improved performance, maintainability, and modularity. This overhaul enhances the bot's scalability and prepares it for future expansion.
-
Plugin Management System:
- Implemented a new system for managing plugins, enabling users to easily register and manage custom plugins.
- Monitor Plugin: Monitors server status and health metrics.
- Outline Plugin: Provides basic integration with Outline Server API.
More info: plugins.md
-
Bot Configuration Overhaul:
- The entire bot configuration has been migrated to
pytmbot.yaml
, simplifying setup and management.
- The entire bot configuration has been migrated to
-
Docker Container Management:
- Added basic support for managing Docker containers directly from the bot:
- Start, stop, and restart containers.
- Planned: Container renaming (currently disabled).
- Added basic support for managing Docker containers directly from the bot:
-
Role-based Access Control:
- Introduced support for role separation:
- Regular Users: Standard bot functionality.
- Super Administrators: Elevated privileges for managing advanced features such as container management and log retrieval.
- Introduced support for role separation:
-
2-Factor Authentication (2FA):
- Added a built-in 2FA system to enhance account security during authentication processes. This, in combination with the access control and session management system, restricts access to advanced functionality like Docker container management and log retrieval.
-
Session Management System:
- Implemented a new mechanism for managing user sessions, including automatic cleanup of expired sessions to improve security and performance.
-
Salt Generation Mode:
- The bot container can now be launched in a special mode to generate a cryptographic "salt" for use in the bot configuration, enhancing security.
-
Docker Image Optimization:
- The bot's Docker image has been optimized and compressed to just 16MB, significantly reducing the size without sacrificing functionality.
🛠️ Improvements
-
Inline Handlers Refactor:
- Introduced inline handlers for critical functions, improving responsiveness and modularity.
-
Docker Awareness:
- Added recognition logic to detect if the bot is running in a Docker container, enabling environment-specific optimizations.
-
Custom Jinja2 Filter:
- Added support for custom filters in Jinja2 templates, allowing for more flexible rendering in response templates.
-
Security Enhancements:
- Introduced session expiration cleanup and security locks across all methods to protect sensitive data.
🐛 Bug Fixes
-
Error Handling in Handlers:
- Fixed several errors in bot handlers, ensuring smooth execution and preventing crashes.
-
Plugin Error Fixes:
- Resolved issues in the plugin system to prevent malfunctions when loading or unloading plugins.
-
Session Management:
- Addressed issues with expired sessions, optimizing session locking for better concurrency and improved security.
📚 Documentation Updates
- Updated all documentation, including:
README.md
PLUGINS.md
auth_control.md
security.md
- Docker and CI-related documentation for improved developer guidance.
⬆️ Dependency Updates
- Updated Dependencies:
pydantic
updated for better validation.emoji
updated from2.12.1
to2.13.0
.pytelegrambotapi
updated from4.22.1
to4.23.0
.- Removed unused modules for a leaner dependency list.
🔧 Chores
-
Code Refactoring:
- Significant refactoring across all modules, methods, and classes for improved code structure and maintainability.
-
Code Style Improvements:
- Ensured consistent code formatting and style adherence across the codebase.
-
Version Bump:
- Version bumped to
0.2.0-rc1
to signify this release candidate.
- Version bumped to
Feel free to provide feedback and report any issues here.
v0.1.1
v0.1.0
A major release, not only in terms of version, but also in terms of features and technology.
What's New
💡 Features
- Additional information about containers is now available in the interface (accessible with an inline button).
- Access to container logs is also available through the inline button. Bot grabs the last 50 lines of logs, but not more than 3800 characters.
- The Containers section has been updated. It is now called Docker and provides information not only on containers, but also on Docker images.
🔌 Technical details
- All template responses are now cached, making compilation (when reusing the template) much faster.
- LRU cache has been added for several methods.
- Support for working with streams has been added to the method of processing information about containers. This allows the method to work faster on systems with a large number of containers and CPU cores.
- Application dependency updates have been added to all CI/CD processes. Updates are applied daily, and the latest images can be found on hub.docker.com.
- Detailed instructions on running the bot in debug mode have been added. You can find them here.
- For all CI/CD processes, we enable SBOM (Software Bill of Materials) and provenance attestation.
- Added registration of bot commands when starting the bot (for example: /start)
- We continue the work we started on refactoring the code and optimizing the bot's architecture.
🕰️ Outdated version
- Due to changes in our CI/CD (continuous integration and continuous delivery) processes and some code updates, we have decided to stop supporting versions lower than 0.0.9. Detailed information about the supported versions can be found here.
👾 Fixed bugs
- In the Memory handler, the percentage field is measured in bytes #53
- Replace this
re.sub()
call by astr.replace()
function call. #54 - Failed at app.core.adapters.docker_adapter: key error 'usage' #55
- A large number of running containers significantly slows down the output of the container handler. #56
v0.0.9
What's Changed
💡 Features
- Basic information about the network connection
- The "About Me" section, which allows users to check for updates regarding the bot:
/check_bot_updates
- The ability to run correctly outside containers directly on the host machine
🔌 Technical details
- Complete and comprehensive code refactoring.
- Added docstring and code explanations
- The beginning of adding unit tests has begun
👾 Over
- pyTMbot is back on hub.docker.com
Full Changelog: v0.0.8...v0.0.9
v.0.0.8
What's Changed
An important update, in terms of image delivery mechanisms. Since this version, I, like the rest of the developers from my country, can no longer publish images on hub.docker.com
The default method for delivering pyTMbot images is now the GitHub registry
- Optimized logs
- Global code refactoring
- All dependencies have been updated
- Added a new feature to check for bot updates:
/check_bot_updates
v0.0.7
v0.0.6.1
What's Changed
- Fixed exception handling.
24 error handling by @orenlab in #25
26 error telebot threaded polling exception by @orenlab in #29
- The CI/CD process has been completely overhauled.
- The pre-build images of the bot are now on hub.docker.com
- The documentation has been updated and expanded.
- All dependencies have been updated
Full Changelog: 0.0.5...0.0.6