-
Notifications
You must be signed in to change notification settings - Fork 504
Improve logging Angular implementation #1255
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
Conversation
…ON-ID and X-REFERRER headers
|
Assigning this to @artlowel and I to review once it's ready (since it's small though, I flagged for 1 approval, so whoever tests it first is fine with me). Currently though, it appears to be failing some tests @atarix83 . Let us know when you feel it's ready for review. UPDATE: It looks like the test failures might be a random hiccup with e2e tests. I've restarted them to see if they succeed the second time. |
tdonohue
left a comment
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.
@atarix83 : I gave this a try today, and (currently) it crashes the entire UI when running yarn start. It builds successfully, but when I access the UI it never successfully loads, and on the commandline I see this error:
[10:34:33 GMT-0500 (Central Daylight Time)] Listening at http://localhost:4000/
ERROR {
statusCode: undefined,
statusText: undefined,
message: "Cannot read property 'length' of undefined"
}
I suspect this issue is the same reason that the e2e tests currently all fail...the UI isn't starting up properly for some reason.
|
I can reproduce @tdonohue's issue. On the client I also get a CORS error on every request. Perhaps that is the cause for the problem, and if that's the case it may simply be an issue with the REST PR: DSpace/DSpace#3303 |
tdonohue
left a comment
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.
👍 Re-tested today with the updated backend PR (DSpace/DSpace#3303) and it's working now. As mentioned in a recent meeting, the necessary change was on the backend -- the new Http Headers needed to be added to the list of "allowedHeaders" in Spring Boot.
All in all, this looks good to me.
REMINDER TO ALL: Because our e2e tests run on the latest REST API main code, they will never succeed for this PR until the corresponding REST API PR is merged (as the main code will block the new HTTP Headers sent by this PR). So, e2e test failures can be ignored in this PR as they are expected behavior.
artlowel
left a comment
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.
Thanks @atarix83!
|
After merging the REST side PR (DSpace/DSpace#3303), all PR checks now succeed! Merging this one as well since it's at +2. |
References
Description
To get the best from this logging mechanism, the Angular UI should be improved by adding to all the requests these two new custom header
X-CORRELATION-ID with a random generated uuid or any hard to conflict string generated at the application load and keep stable for all the browsing session
X-REFERRER to note the page that has generated the REST request
Instructions for Reviewers
Check in the browser network console if the new headers are attached for each request to rest server
List of changes in this PR:
Checklist
yarn run lintpackage.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.