[go: up one dir, main page]

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

[dy] Optimize pipeline schedules LIST api #4058

Merged
merged 13 commits into from
Dec 8, 2023
Merged

Conversation

dy46
Copy link
Contributor
@dy46 dy46 commented Nov 22, 2023

Description

This PR changes how we fetch certain fields on the pipeline_schedules LIST endpoint. The pipeline_runs_count, pipeline_in_progress_runs_count and tags were all being fetched individually for every pipeline schedule that was being returned, so I changed the logic to instead fetch these fields once for all schedules.

There doesn't seem to be a major performance improvement on the requests because the pipeline_schedule requests generally include a small limit for pagination purposes. I'm also not sure if my implementation of the queries is optimal, so there could be an issue there as well.

How Has This Been Tested?

  • Tested locally with /api/pipeline_schedules endpoint
  • Verified pipeline schedule unit tests are still working
  • Compared LIST pipeline_schedules responses before and after the change

Screenshot 2023-12-08 at 10 11 43 AM

Checklist

  • The PR is tagged with proper labels (bug, enhancement, feature, documentation)
  • I have performed a self-review of my own code
  • I have added unit tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • If new documentation has been added, relative paths have been added to the appropriate section of docs/mint.json

cc: @wangxiaoyou1993

@dy46 dy46 added the enhancement Polish or UX improvements label Nov 22, 2023
@dy46 dy46 force-pushed the dy--resolve_n+1_query_issue branch from bc69a11 to cea0691 Compare December 8, 2023 01:07
@dy46 dy46 force-pushed the dy--resolve_n+1_query_issue branch from cea0691 to c9b32c6 Compare December 8, 2023 01:09
@dy46 dy46 changed the title [dy] Resolve pipeline schedules N+1 query issue [dy] Optimize pipeline schedules LIST api Dec 8, 2023
@dy46 dy46 force-pushed the dy--resolve_n+1_query_issue branch from 47a9cb5 to d3c82a8 Compare December 8, 2023 18:10
@dy46 dy46 merged commit 7c3bdb4 into master Dec 8, 2023
9 checks passed
@dy46 dy46 deleted the dy--resolve_n+1_query_issue branch December 8, 2023 18:55
@tommydangerous tommydangerous mentioned this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Polish or UX improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant