Conversation
There was a problem hiding this comment.
Pull request overview
Enhances DSpace publication results logging by extracting more detail from DSS error payloads so errors are less frequently “N/A” and more actionable.
Changes:
- Replace single-field DSS error logging with a formatted, multi-field error summary (ErrorInfo/DSpaceResponse/ExceptionMessage/ExceptionTraceback).
- Add traceback formatting to keep stack traces readable (first few non-blank lines).
- Extend the job test to assert that DSS error payload details appear in the returned
results[:errors].
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| app/jobs/dspace_publication_results_job.rb | Adds format_dss_error + format_traceback and uses them when ResultType == 'error' to improve logged/error-report detail. |
| test/jobs/dspace_publication_results_job_test.rb | Adds an assertion ensuring ErrorInfo details are surfaced in the collected errors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'validate checksums as no local files were attached to the record. This ' \ | ||
| 'requires staff to manually check the ETD record and DSpace record and take ' \ | ||
| 'appropriate action.' | ||
|
|
There was a problem hiding this comment.
This entire test, not just the new assertions, is very confusing. It looks like we have stubbed an entire run and in this test are checking all the possible error states that the stubs have provided us.
If that's the case, since you didn't update any stubs are these new assertions testing things that were already there or are they testing the new formatting you put in place?
There was a problem hiding this comment.
Good question! Previously, this stub would produce an empty/nil error message because we were only reading DSpaceResponse. So yes, the new assertions are testing new behavior, but it's really hard to discern that in the current test state.
Let me know if the change I just pushed helps clarify the intended test behavior.
JPrevost
left a comment
There was a problem hiding this comment.
That new test is much clearer, thanks!
Why these changes are being introduced: Our current logging doesn't capture much information. (It usually just says 'N/A'.) While DSpace errors are not useful, we should still probably try to capture what's there. Relevant ticket(s): N/A How this addresses that need: That adds some Copilot-suggested changes to enhance our logging in the DSpace publication results job. Side effects of this change: None.
Why these changes are being introduced:
Our current logging doesn't capture much
information. (It usually just says 'N/A'.) While
DSpace errors are not useful, we should still
probably try to capture what's there.
Relevant ticket(s):
N/A
How this addresses that need:
That adds some Copilot-suggested changes to
enhance our logging in the DSpace publication
results job.
Side effects of this change:
None.
Developer
our guide and
all issues introduced by these changes have been resolved or opened as new
issues (link to those issues in the Pull Request details above)
Code Reviewer
(not just this pull request message)
Requires database migrations?
NO
Includes new or updated dependencies?
NO