Conversation
added 30 commits
April 26, 2025 11:49
-updated docker tag
…/runtime stages for smaller, safer image
…admins in UserService.create
…d enhance security - Switched build and runtime images to python:3.12-slim-bookworm - Removed unnecessary apt-get upgrade and libc-bin installation - Created non-root user using Debian best practices (adduser/addgroup) - Split ENTRYPOINT and CMD for better container override flexibility - Reduced final image size and minimized potential security vulnerabilities
…in fixture - Added Faker unique handling to users_with_same_role_50_users fixture - Cleared Faker's unique generator between runs to avoid collisions - Ensured generated users have unique nicknames and emails - Fixed IntegrityError (duplicate key violation) during test setup - Confirmed pagination tests now pass
…nAPI docs; chore(docker): optimize Dockerfile for faster builds, security, and smaller image
…sername and password
- Default to SQLite in CI to avoid real database connection during tests - Use PostgreSQL for Docker deployments - Removed unnecessary PostgreSQL components for environments that don't need them - Ensured DATABASE_URL switches correctly based on environment
added 30 commits
April 28, 2025 22:36
… configuration - Fixed email verification flow by flushing session before sending emails (ensures user.id is available in token link) - Updated email_service to use correct verification URL structure - Integrated logging.conf for better visibility (INFO/DEBUG level support) - Connected logging config to app startup via logging.config - Updated .gitignore and .dockerignore to exclude log files
… and expected tokens for better traceability
…d FileNotFoundError in CI
Added detailed logs inside verify_email_with_token() to trace email verification steps. Now logging user lookup, token comparison, and commit success/failure. Helps diagnose why email_verified was not updating after clicking verification links. Prepared for easier troubleshooting by showing exact mismatches and session issues. Removed duplicate logger key.
…deprecated 'app' parameter Replaced deprecated AsyncClient(app=app) usage with AsyncClient(transport=ASGITransport(app=app)) to ensure compatibility with httpx >=0.24.0. This resolves setup errors in API tests using pytest.
- Added detailed logging to the /verify-email route to track verification attempts, user lookup, and results. - Improved error handling and response clarity. - Ensured logs record both success and failure scenarios for easier debugging. - Verified token and user state before updating verification status.
- Removed inline comment from `args` in fileHandler to avoid ConfigParser error - Confirmed log output now writes to both console and 'logs/app.log' - Updated logger levels and formatters for improved clarity
- Updated .env to include SERVER_BASE_URL with correct port - Modified Settings class to correctly load server_base_url as a string - Verified that email verification links now include http://localhost:8000
- Fix incorrect logger import in email_service.py - Fix parameter name mismatch in send_verification_email method - Improve register endpoint to check for existing emails before registration - Ensure proper HTTP status code (400) is returned for duplicate emails - Remove custom exception handlers to use FastAPI's default error handling This commit fixes an issue where attempting to register with an existing email address would result in a 500 Internal Server Error instead of a proper 400 Bad Request response.
- Updated SMTP connection logic to properly handle mock emails - Added Kafka topic initialization scripts for reliable topic creation - Created start-app.sh for streamlined application startup - Updated Dockerfile with necessary dependencies - Improved documentation for Kafka event-driven architecture - Fixed authentication token handling
…d handling, all tests passing
…MTP username typo in .env for email notifications reliability
- Standardize all email endpoints to use path parameters instead of request bodies - Fix email verification to work with browser GET requests - Add dropdown menus for role selection in role upgrade endpoint - Fix path parameter handling in email test endpoints - Add missing get_user_service dependency - Update test cases to match new parameter style - Remove deprecated request models
- Update /emails/test/account-locked/{user_id} to set is_locked and failed_login_attempts in the database
- Commit and refresh user after status change
- Improves test endpoint realism and allows DB verification via pgAdmin
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.
No description provided.