Skip to content
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 # 183126684: Log Submission Draft ID #648

Merged
merged 3 commits into from
Dec 13, 2022

Conversation

jhoanmanuelms
Copy link
Contributor

https://www.pivotaltracker.com/story/show/183126684

  • Include draft related information in the logs
  • Change the logging level for the retry web template from error to warning

- Include draft related information in the logs
- Change the logging level for the retry web template from error to warning
@jhoanmanuelms jhoanmanuelms self-assigned this Dec 6, 2022
@@ -65,16 +65,26 @@ class SubmissionSubmitter(
try {
logger.info { "${rqt.accNo} ${rqt.owner} Started processing submission request" }

rqt.draftKey?.let { draftService.setProcessingStatus(rqt.owner, it) }
rqt.draftKey?.let {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is adding too much complexity to this method, we times the same conditional (if draftkey != null) in this few lines. Not really sure about but we may consider include accNo and owner in draftService operations to log on each status change. Not much better as we will be including parameters only for logging purposes but as it is righ it looks super verbose.

val processed = submissionProcessor.processSubmission(rqt)
parentInfoService.executeCollectionValidators(processed)
rqt.draftKey?.let { draftService.setAcceptedStatus(it) }
rqt.draftKey?.let {
logger.info { "${rqt.accNo} ${rqt.owner} Assigned accNo '${processed.accNo}' to draft with key '$it'" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one I can guess can be moved to submissionProcessor.processSubmission where actuallty this happens (I am looking for way to reduce verbosity here )

Copy link
Contributor

@Juan-EBI Juan-EBI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM please consider comments

@jhoanmanuelms jhoanmanuelms merged commit 15d5c63 into master Dec 13, 2022
@jhoanmanuelms jhoanmanuelms deleted the feature/pivotal-#183126684-log-draft-id branch December 13, 2022 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants