-
Notifications
You must be signed in to change notification settings - Fork 1
[BI-2806] Remove trials cache #516
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
Open
jloux-brapi
wants to merge
13
commits into
epic/BI-2862
Choose a base branch
from
feature/BI-2806
base: epic/BI-2862
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a04b36e
Add todos
jloux-brapi b8444e9
Merge branch 'develop' into feature/BI-2806
jloux-brapi df7affd
Remove unused method from BrAPITrialDAO
jloux-brapi d1ae3d9
Fix first get method
jloux-brapi c1b0174
Update getTrials(UUID) method to use brapi directly
jloux-brapi 6b6a695
Udpate remaining getMethods, fix enough exRef things to pass unit tests
jloux-brapi bb30594
Remove code setting brapiId to exRef
jloux-brapi a36229b
Merge branch 'develop' into fix_exrefs
jloux-brapi 35cde9c
Changes to support ExperimentControllerIntegrationTest
jloux-brapi af7ceda
Fix remaining test failures and alter some code to support dbIds
jloux-brapi 6854606
Remove cache from last get method
jloux-brapi 1f18377
Remove cache from trial update
jloux-brapi c2083d8
Remove cache from post method and remove entirely for trials
jloux-brapi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ | |
| import io.micronaut.security.rules.SecurityRule; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.brapi.client.v2.model.exceptions.ApiException; | ||
| import org.brapi.v2.model.BrAPIExternalReference; | ||
| import org.brapi.v2.model.core.BrAPITrial; | ||
| import org.brapi.v2.model.core.response.BrAPITrialSingleResponse; | ||
| import org.breedinginsight.api.auth.*; | ||
|
|
@@ -158,10 +159,8 @@ public HttpResponse<?> trialsTrialDbIdPut(@PathVariable("programId") UUID progra | |
| return HttpResponse.notFound(); | ||
| } | ||
|
|
||
| // TODO: Remove for trialDbId once cache is removed for that entity | ||
| private void setDbIds(BrAPITrial trial) { | ||
| trial.trialDbId(Utilities.getExternalReference(trial.getExternalReferences(), Utilities.generateReferenceSource(referenceSource, ExternalReferenceSource.TRIALS)) | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was preventing the frontend effectively from being able to use brapiTrialDbIds in the router. Bit of a nasty bugger. Expecting more changes like this in the future for other entities. |
||
| .orElseThrow(() -> new IllegalStateException("No BI external reference found")) | ||
| .getReferenceID()); | ||
| trial.programDbId(Utilities.getExternalReference(trial.getExternalReferences(), Utilities.generateReferenceSource(referenceSource, ExternalReferenceSource.PROGRAMS)) | ||
| .orElseThrow(() -> new IllegalStateException("No BI external reference found")) | ||
| .getReferenceID()); | ||
|
|
||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of a get ahead of the curve change. It might be able to remain as is, but might be tough to find later on when we use trialDbIds directly for studies.