-
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
base: epic/BI-2862
Are you sure you want to change the base?
Changes from all commits
a04b36e
b8444e9
df7affd
d1ae3d9
c1b0174
6b6a695
bb30594
a36229b
35cde9c
af7ceda
6854606
1f18377
c2083d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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.
Member
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. Another thing I think we'll need to resolve is having inconsistent UUIDs like using the BrAPI trialDbId here but then the DeltaBreed program UUID below. |
||
| .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()); | ||
|
|
||
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.
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.
Ya probably ok for poc but could cause confusing issues mixing deltabreed UUIDs and BrAPI UUIDs.