-
Notifications
You must be signed in to change notification settings - Fork 31
♻️ webserver: Enhance Action Confirmation Token Logic (🚨🗃️) #8150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
♻️ webserver: Enhance Action Confirmation Token Logic (🚨🗃️) #8150
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8150 +/- ##
==========================================
+ Coverage 87.36% 87.84% +0.48%
==========================================
Files 1954 1954
Lines 76107 76105 -2
Branches 1342 1342
==========================================
+ Hits 66491 66858 +367
+ Misses 9212 8843 -369
Partials 404 404
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
8277e0f
to
87e1d95
Compare
|
…ed token management
…confirmation tokens in user workflows
…ove legacy database dependencies
…eval in _rest_dependencies.py
…service and clean up related tests
…arbage collector plugin
6c6cc6b
to
838783e
Compare
There was a problem hiding this 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 refactors the confirmation business logic by replacing the legacy database access layer with a well-structured service and repository pattern. The changes modernize the codebase by removing old AsyncpgStorage
implementations and introducing new ConfirmationService
and ConfirmationRepository
classes for managing confirmation tokens and codes.
- Removes legacy repository modules and replaces with modern service/repository architecture
- Updates confirmation token handling with new domain models and service layer
- Refactors tests to use new fixture patterns with
ConfirmationService
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
test files | Updates test fixtures and assertions to use new ConfirmationService and ConfirmationRepository |
_models.py |
Adds new domain models Confirmation and related types |
_confirmation_service.py |
New service layer encapsulating confirmation business logic |
_confirmation_repository.py |
New repository layer for data access using modern asyncpg engine |
REST controllers | Updates to use dependency injection pattern for confirmation service |
product models | Minor Field annotation improvements |
database migration | Updates confirmation table schema for timezone-aware timestamps |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
services/web/server/tests/unit/with_dbs/03/login/test_login_registration.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/login/_confirmation_service.py
Show resolved
Hide resolved
...core_postgres_database/migration/versions/9dddb16914a4_update_confirmation_created_column.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the asynpg additional connection pool goes away with this right?
services/web/server/src/simcore_service_webserver/login/_controller/rest/change.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/login/_controller/rest/change.py
Show resolved
Hide resolved
…le assignment in API base URL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
services/web/server/src/simcore_service_webserver/login/_invitations_service.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
@mergify queue |
🟠 Waiting for conditions to match
|
|
What do these changes do?
This PR upgrades the logic behind confirmation tokens and codes by dropping old database access and helpers and introducing a well structured service and repository layers.
Background
Example Use Case
Current Status
login
but it will be moved on its own sub-domain since the functionality will be used in other sub-domains e.g. to confirm project sharing.Overview of Changes
ConfirmationService
: Service layer for managing confirmation tokens and codesConfirmationRepository
: Repository layer that controls the storage of confirmation tokens and codes by accessing toconfirmations
users
tableslogin_repository_legacy*.py
modules and transforms into_confirmation_repository.py
AsyncpgStorage
and uses new asynpg engineConfirmation
domain modeldb: AsyncpgStorage, login_options: LoginOptions
fixtures by newconfirmation_service: ConfirmationService
fixtureRelated issue/s
How to test
Dev-ops