SYNC on gsp/Forecast/all and gsp/{gsp_id}/forecast - DRAFT#255
Merged
Conversation
braddf
approved these changes
Mar 30, 2026
braddf
left a comment
Contributor
There was a problem hiding this comment.
Not sure about the jinja2 addition but otherwise think makes sense so will merge in 👍
# Conflicts: # uv.lock
5 tasks
7 tasks
braddf
added a commit
that referenced
this pull request
Mar 30, 2026
… CPU (#250) * fix(forecast-all): swap json encoding to use Rust-based adapter * fix(forecast-all): PoC grpc-requests sync client * chore(forecast-all): ruff ignores * chore(forecast-all): lint * chore(uv): fix uv.lock merge issue * SYNC on gsp/Forecast/all and gsp/{gsp_id}/forecast - DRAFT (#255) * remake uv.lock, remove strip and timezone * lint * add jinja2 * TDD: add tests * dont use cache if start and end is the same * add params back in * add jinja2 * lint * also use sync for `GetForecastAsTimeseries` * remove code and tidy * dont use real host or port * lint * add mocking * fix(forecast-all): add timestamp validation when gsp_ids not set * chore(forecast-all): lint fixes * fix(forecast-all): use default factories for start/end * fix(forecast-all): sort gsp compact=false response --------- Co-authored-by: Peter Dudfield <34686298+peterdudfield@users.noreply.github.com>
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.
Pull Request
Description
Building on from #250 with a few other fixes.
I wanted to compare the cpu usages and performance compared to #252
Q: Do we need to cache on forecast/all down to 1 hour, but leave it as 1 day on the background_task bit?
Q: Show we just move all routes to use grpc-request?
Helps with https://github.com/openclimatefix/client-private/issues/294
How Has This Been Tested?
Deployed on dev on 2026-03-29 15:30 ish
Deployed change on gsp/{gsp_id}/forecast at 2026-03-29 17:50 ish
CPU seems to stay below 20% (although start up it was quite big)
UI all working
checks in airflow all working, and much faster
Checklist: