Skip to content

Conversation

@dolfinus
Copy link
Member

@dolfinus dolfinus commented Sep 22, 2025

Change Summary

Most of SQLAlchemy queries used by consumer are static, and only have different parameter values.
Moved these queries to module to avoid generating them each time repository method is called.

This cannot be used with some queries used by REST API, as filtered columns depend on user input (e.g. pagination endpoints).

That doesn't make consumer faster, as most queries were already cached, it just ensures that queries stay in cache.

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

@dolfinus dolfinus self-assigned this Sep 22, 2025
@dolfinus dolfinus added the ci:skip-changelog Add this label to skip changelog file check label Sep 22, 2025
@github-actions
Copy link

github-actions bot commented Sep 22, 2025

Coverage

Coverage Report •
FileStmtsMissCoverMissing
data_rentgen/db/repositories
   input.py97495%76, 96, 117, 136
   job.py64395%154, 178–179
   location.py69198%157
   operation.py60985%139–140, 143–144, 146–147, 149, 151, 158
   output.py98495%79, 99, 120, 139
   personal_token.py36391%82–84
   run.py922968%176–177, 179–180, 182, 184–185, 188–189, 191–192, 199–200, 203–206, 209–210, 213, 228–230, 238, 255–257, 259–260
   user.py28196%55
TOTAL695439594% 

@dolfinus dolfinus marked this pull request as ready for review September 22, 2025 12:25
@dolfinus dolfinus marked this pull request as draft September 22, 2025 13:02
@dolfinus dolfinus marked this pull request as ready for review September 22, 2025 13:23
@dolfinus dolfinus merged commit cc75570 into develop Sep 23, 2025
11 checks passed
@dolfinus dolfinus deleted the feature/DOP-28871 branch September 23, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:skip-changelog Add this label to skip changelog file check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants