Event log refactor 290#635
Merged
Mastermind-U merged 23 commits intomainfrom Jul 29, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the event log system by consolidating server startup logic and standardizing LDAP protocol constants. The main changes include moving shared utility functions to reduce code duplication, centralizing server initialization patterns, and replacing hardcoded protocol numbers with enum constants for better maintainability.
- Consolidated server startup logic into a reusable
run_serverfunction - Moved request/response utility functions from API auth module to LDAP protocol helpers
- Replaced hardcoded LDAP protocol operation numbers with enum constants
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| app/schedule.py | Refactored scheduler function to async factory pattern, removed uvloop dependency |
| app/multidirectory.py | Added generic run_server function, converted LDAP and scheduler to use factory pattern |
| app/ldap_protocol/utils/helpers.py | Added IP and user agent extraction functions from auth utils |
| app/ldap_protocol/objects.py | Added ProtocolRequests and ProtocolResponse enums, simplified docstrings |
| app/ldap_protocol/ldap_responses.py | Replaced hardcoded protocol numbers with ProtocolResponse enum values |
| app/ldap_protocol/ldap_requests/*.py | Replaced hardcoded protocol numbers with ProtocolRequests enum values |
| app/ldap_protocol/asn1parser.py | Converted LDAPOID from validated string to StrEnum with predefined values |
| app/api/auth/utils.py | Removed file - functions moved to ldap_protocol helpers |
| app/api/auth/*.py | Updated imports to use moved utility functions |
| app/alembic/script.py.mako | Added docstrings to upgrade/downgrade functions |
00b5747 to
fbde6bf
Compare
0f4e9e9 to
f218e8b
Compare
…DAP request and response classes
fbde6bf to
0e5be86
Compare
…amline dependency management and improve code readability
… test structure and dependency management
…gement for LDAP operations
Mastermind-U
suggested changes
Jul 29, 2025
Contributor
|
Closes #638 |
Mastermind-U
approved these changes
Jul 29, 2025
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.