Fix TODOs and improve code quality#261
Open
vicky-dx wants to merge 1 commit into
Open
Conversation
- Improve stdout/stderr handling in CLI.run_command() * Separate stdout and stderr capture * Better error reporting and debugging * Fix subprocess.run() usage - Remove code duplication in database user management * Create reusable __handle_db_user_changes() helper * Eliminate ~70 lines of duplicated code * Apply DRY principle - Enhance directory validation * Add robust __is_valid_kobo_install_directory() method * Multi-file validation (git repo + key files) * More reliable installation detection - Add customizable proxy port feature * Allow users to customize exposed_nginx_docker_port * Advanced mode option for external HTTP/HTTPS ports * Maintain backward compatibility - Fix bugs * Resolve undefined backend_role variable * Fix type hint compilation errors - Update .gitignore * Add Python best practices * Ignore venv, cache, IDE, and OS files - Update tests * Fix test mocks for new CLI.run_command() signature * Support both docker-compose and docker compose formats * All 34 config tests passing Fixes existing TODO comments and improves code maintainability.
noliveleger
requested changes
Nov 26, 2025
Comment on lines
+1328
to
+1331
| elif not self.__dict.get('mongo_secured'): | ||
| # Only password changed or first time securing | ||
| self.__write_upsert_db_users_trigger_file('', 'mongo') | ||
| self.__dict['mongo_secured'] = True |
Contributor
There was a problem hiding this comment.
It never enters this block on password (only) change. So the file which triggers the password change in MongoDB is never created.
Pull main and merge it in your branch, you will see that test_update_mongo_passwords is now failing!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve stdout/stderr handling in CLI.run_command()
Remove code duplication in database user management
Enhance directory validation
Add customizable proxy port feature
Fix bugs
Update .gitignore
Update tests
Fixes existing TODO comments and improves code maintainability.