-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pivotal ID # 172671360: Warn users about upcoming public release #324
Merged
jhoanmanuelms
merged 3 commits into
master
from
bugfix/pivotal-172671360-processing-errors
Jan 26, 2021
Merged
Pivotal ID # 172671360: Warn users about upcoming public release #324
jhoanmanuelms
merged 3 commits into
master
from
bugfix/pivotal-172671360-processing-errors
Jan 26, 2021
Conversation
This file contains 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
- Log error instead of failing when getting extended submissions - Fix notification messages
Avoid propagating null instances of the extended submission
Juan-EBI
reviewed
Jan 25, 2021
} | ||
val submissions = page.content.filterNotNull() | ||
|
||
return PageImpl(submissions, page.pageable, submissions.size.toLong()) |
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.
I think this logic should in the service.
@Transactional(readOnly = true)
override fun getExtendedSubmissions(filter: SubmissionFilter, offset: Long, limit: Int): Page<Result<ExtSubmission>> {
val filterSpecs = SubmissionFilterSpecification(filter)
val pageable = OffsetPageRequest(offset, limit, Sort.by(defaultOrder))
return submissionRepository
.findAll(filterSpecs.specification, pageable, EntityGraphs.named(SIMPLE_GRAPH))
.map { runCatching { getExtByAccNoAndVersion(it.accNo, it.version) } }
}
and in the service.
fun getExtendedSubmissions(request: ExtPageRequest): Page<ExtSubmission> {
val filter = SubmissionFilter(
rTimeFrom = request.fromRTime,
rTimeTo = request.toRTime,
released = request.released
)
return submissionRepository
.getExtendedSubmissions(filter, request.offset, request.limit)
.onEach { it.onFailure { logger.error .... } }
.map { it.getOrNull() }
....
}
I would also add a unit test or many check that page is calculated correctly.
- Improve error processing - Add unit test to validate the page is properly processed
Juan-EBI
approved these changes
Jan 26, 2021
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.
LGTM
jhoanmanuelms
added a commit
that referenced
this pull request
Mar 20, 2021
Feature * Pivotal ID # 176052254: JSON Submission Attributes Validation (#310) * Pivotal #ID:175163839: Submission Query Operations In Mongo (#319) * Pivotal-176168841: Allow to check inactive user registration (#315) * Pivotal ID # 176522202: Ext Submission serialization (#322) * Pivotal ID # 172671360: Warn users about upcoming public release (#324) * Pivotal #ID 176479707: Mongo implement draft funtionality (#327) * Pivotal #ID 176479720: Mongo Metadata Query (#328) * Pivotal ID # 175163839: Mongo Submission Stats (#331) * Pivotal ID # 176886357: Async Submission Request (#334) * Pivotal ID # 176977556: Delete Submissions In Mongo (#341) * Pivotal ID #176679139: Ext Submission File List Refactor (#344) * Pivotal ID # 177042374: Delete Draft After Submission (#349) * Pivotal ID# 174948695: PTSubmit Delete Operation (#351) * Pivotal #ID 177076728: Use PMC new streaming API (#346) * Pivotal ID # 177267343: Validate EU-ToxRisk Submissions (#352) Bugfix * Pivotal ID # 176052264: Inner Folder Mapping (#311) * Pivotal ID # 172671360: Ignore Empty Value Attributes (#314) * Pivotal ID # 176377632: File list extension is missing in BIA studies (#321) * Pivotal #ID 174642598: TSV Double Quotes (#350) * Pivotal ID # 176501169: FTP Folders Missing (#335) Chore * Pivotal ID # 176377544: Add refresh users directory structure api endpoint (#320) * Pivotal #ID 176479473: Migrate biostudies test to TestContainers (#323) * Pivotal ID # 176779952: Mongo iTests CI (#332) * Pivotal #Id 176838189: Rename PMC mongo collections (#333) * Pivotal #ID: 177040448: Store request as plain json (#336) * Pivotal ID #175894089: Check if queues in RabbitMQ are persistent (#339) * Pivotal ID #177074116 : model table section properly (#338) * Pivotal ID # 176886824: Improve API Docs (#337) * Pivotal #ID 177193125: Improve collection template validation (#345) Co-authored-by: Juan <jcamilorada@ebi.ac.uk>
jhoanmanuelms
added a commit
that referenced
this pull request
Mar 21, 2021
Feature * Pivotal ID # 176052254: JSON Submission Attributes Validation (#310) * Pivotal #ID:175163839: Submission Query Operations In Mongo (#319) * Pivotal-176168841: Allow to check inactive user registration (#315) * Pivotal ID # 176522202: Ext Submission serialization (#322) * Pivotal ID # 172671360: Warn users about upcoming public release (#324) * Pivotal #ID 176479707: Mongo implement draft funtionality (#327) * Pivotal #ID 176479720: Mongo Metadata Query (#328) * Pivotal ID # 175163839: Mongo Submission Stats (#331) * Pivotal ID # 176886357: Async Submission Request (#334) * Pivotal ID # 176977556: Delete Submissions In Mongo (#341) * Pivotal ID #176679139: Ext Submission File List Refactor (#344) * Pivotal ID # 177042374: Delete Draft After Submission (#349) * Pivotal ID# 174948695: PTSubmit Delete Operation (#351) * Pivotal #ID 177076728: Use PMC new streaming API (#346) * Pivotal ID # 177267343: Validate EU-ToxRisk Submissions (#352) Bugfix * Pivotal ID # 176052264: Inner Folder Mapping (#311) * Pivotal ID # 172671360: Ignore Empty Value Attributes (#314) * Pivotal ID # 176377632: File list extension is missing in BIA studies (#321) * Pivotal #ID 174642598: TSV Double Quotes (#350) * Pivotal ID # 176501169: FTP Folders Missing (#335) Chore * Pivotal ID # 176377544: Add refresh users directory structure api endpoint (#320) * Pivotal #ID 176479473: Migrate biostudies test to TestContainers (#323) * Pivotal ID # 176779952: Mongo iTests CI (#332) * Pivotal #Id 176838189: Rename PMC mongo collections (#333) * Pivotal #ID: 177040448: Store request as plain json (#336) * Pivotal ID #175894089: Check if queues in RabbitMQ are persistent (#339) * Pivotal ID #177074116 : model table section properly (#338) * Pivotal ID # 176886824: Improve API Docs (#337) * Pivotal #ID 177193125: Improve collection template validation (#345) Co-authored-by: Juan <jcamilorada@ebi.ac.uk>
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.
https://www.pivotaltracker.com/story/show/172671360