Skip to content
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

refactor(core): simplify document log queries by removing baseQuery #517

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

geclos
Copy link
Collaborator

@geclos geclos commented Oct 29, 2024

This refactor simplifies the logic for querying document logs with metadata and errors by removing the baseQuery intermediate step and instead using a repository. This commit also fixes a bug where the document log was getting fetched from a paginated query which could occasionally result in false not found errors.

  • Updated computeDocumentLogsWithMetadataQuery to return the repository scope directly.
  • Refactored related test files to align with the new query structure.
  • Removed redundant code and imports related to the old baseQuery approach.
  • Ensured all tests pass with the new query structure.

This change improves code readability and maintainability by reducing unnecessary complexity in the query logic.

This refactor simplifies the logic for querying document logs with
metadata and errors by removing the `baseQuery` intermediate step and
instead using a repository. This commit also fixes a bug where the
document log was getting fetched from a paginated query which could
occasionally result in false not found errors.

- Updated `computeDocumentLogsWithMetadataQuery` to return the repository scope directly.
- Refactored related test files to align with the new query structure.
- Removed redundant code and imports related to the old `baseQuery` approach.
- Ensured all tests pass with the new query structure.

This change improves code readability and maintainability by reducing unnecessary complexity in the query logic.
@geclos geclos force-pushed the fix/compute_document_logs_query branch from d4cb65f to bc9a58a Compare October 29, 2024 09:02
@geclos geclos merged commit 29a9cb8 into main Oct 29, 2024
3 checks passed
@geclos geclos deleted the fix/compute_document_logs_query branch October 29, 2024 09:18
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant