Skip to content

Event log refactor 290#635

Merged
Mastermind-U merged 23 commits intomainfrom
event_log_refactor_290
Jul 29, 2025
Merged

Event log refactor 290#635
Mastermind-U merged 23 commits intomainfrom
event_log_refactor_290

Conversation

@rimu-stack
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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_server function
  • 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

Comment thread app/ldap_protocol/ldap_requests/extended.py Outdated
@rimu-stack rimu-stack force-pushed the event_log_refactor_290 branch from fbde6bf to 0e5be86 Compare July 24, 2025 15:45
Comment thread app/ldap_protocol/ldap_requests/base.py
Comment thread app/ldap_protocol/utils/helpers.py Outdated
Comment thread app/ldap_protocol/objects.py
Comment thread app/multidirectory.py Outdated
Comment thread app/ldap_protocol/kerberos/ldap_structure.py Outdated
Comment thread app/ldap_protocol/objects.py
Comment thread app/ldap_protocol/ldap_requests/contexts.py
@Mastermind-U
Copy link
Copy Markdown
Contributor

Closes #638

@Mastermind-U Mastermind-U changed the base branch from event_log_290 to main July 29, 2025 08:58
@Mastermind-U Mastermind-U merged commit 97305fb into main Jul 29, 2025
4 checks passed
@Mastermind-U Mastermind-U deleted the event_log_refactor_290 branch July 29, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants