[BI-2908] Remove cache.get() dependencies from BrAPIObservationDAO#531
Open
jloux-brapi wants to merge 3 commits into
Open
[BI-2908] Remove cache.get() dependencies from BrAPIObservationDAO#531jloux-brapi wants to merge 3 commits into
jloux-brapi wants to merge 3 commits into
Conversation
- Create tickets for optimizations and improvements to downstream usages of these calls and mark with TODOs
humsika
reviewed
Jul 7, 2026
| @@ -165,8 +174,14 @@ private void processObservations(String programKey, List<BrAPIObservation> obser | |||
| /** | |||
| * Get all observations for a program from the cache. | |||
Contributor
There was a problem hiding this comment.
Can you please update this comment as we are not reading from the cache anymore.
Collaborator
Author
There was a problem hiding this comment.
Removed this and another one I found.
humsika
reviewed
Jul 7, 2026
| import org.apache.commons.lang3.tuple.Pair; | ||
| import org.brapi.client.v2.ApiResponse; | ||
| import org.brapi.client.v2.model.exceptions.ApiException; | ||
| import org.brapi.client.v2.model.queryParams.core.TrialQueryParams; |
Contributor
There was a problem hiding this comment.
These imports are not being used in the class, please cleanup the unused imports.
Collaborator
Author
There was a problem hiding this comment.
Removed this unused import and other unused ones.
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.
Description
Story: BI-2908
Replaced
programCache.get()in ObservationDAO with BrAPI GET call.The max amount of observations retrieved by this call will be the allowed maximum from the
CACHE_BRAPI_FETCH_PAGE_SIZE=65000variable in.envThis should be enough for now, until optimizations are made to some code via other tickets created, like BI-2961, BI-2963 and BI-2964
Dependencies
Testing
Checklist: