Project

General

Profile

Actions

Bug #17830

closed

Controller doesn't propagate back X-Request-Id headers on "new code path" endpoints

Added by Lucas Di Pentima over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Story points:
-
Release relationship:
Auto

Description

Examples:

Request to arvbox's controller

$ curl -v -H "Authorization: OAuth2 xxxtokenxxx" http://localhost:8003/arvados/v1/container_requests/invalid
*   Trying 127.0.0.1...
* TCP_NODELAY set
...
< HTTP/1.1 404 Not Found
< Access-Control-Allow-Headers: Authorization, Content-Type, X-Http-Method-Override
< Access-Control-Allow-Methods: GET, HEAD, PUT, POST, PATCH, DELETE
< Access-Control-Allow-Origin: *
< Access-Control-Max-Age: 86486400
< Content-Type: application/json
< X-Content-Type-Options: nosniff
< Date: Tue, 22 Jun 2021 20:30:53 GMT
< Content-Length: 128
<
{"errors":["//railsapi.internal/arvados/v1/container_requests/invalid: 404 Not Found: Path not found (req-nmeiu3bkuepn10km5uv4)"]}
* Connection #0 to host localhost left intact

Request to arvbox's railsAPI

$ curl -v -H "Authorization: OAuth2 xxxtokenxxx" http://localhost:8004/arvados/v1/container_requests/invalid
*   Trying 127.0.0.1...
...
< HTTP/1.1 404 Not Found
< Content-Type: application/json; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Status: 404 Not Found
< Cache-Control: no-cache
< Access-Control-Allow-Origin: *
< Referrer-Policy: strict-origin-when-cross-origin
< X-Permitted-Cross-Domain-Policies: none
< Access-Control-Max-Age: 86486400
< X-XSS-Protection: 1; mode=block
< X-Request-Id: e04d4235-ffc4-4df2-ac78-3bd1031fa302
< Access-Control-Allow-Headers: Authorization, Content-Type
< Access-Control-Allow-Methods: GET, HEAD, PUT, POST, DELETE
< X-Download-Options: noopen
< X-Runtime: 0.014451
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
< Date: Tue, 22 Jun 2021 20:33:19 GMT
< X-Powered-By: Phusion Passenger 6.0.2
< Server: nginx/1.15.8 + Phusion Passenger 6.0.2
<
* Connection #0 to host localhost left intact
{"errors":["Path not found (req-84gl5jhcyy7oqfkxp19r)"],"error_token":"1624393999+99d17f5f"}

Not sure why I'm getting a uuid-like X-Request-Id header when making requests directly to railsAPI, but if I send a custom one with the curl call, I get it back correctly.

https://api.rubyonrails.org/classes/ActionDispatch/RequestId.html


Subtasks 1 (0 open1 closed)

Task #17865: Review 17830-reqid-header-propagation-fixResolvedLucas Di Pentima07/22/2021Actions

Related issues 3 (1 open2 closed)

Related to Arvados - Bug #18008: [api] reqid not always being recorded in the api server logNewActions
Blocks Arvados - Bug #17779: Exceptions thrown by the Python SDK should include the request id if possibleResolvedTom Clegg09/29/2021Actions
Blocks Arvados - Bug #17492: Exceptions thrown by the Ruby SDK should include the request id if possibleResolvedLucas Di Pentima02/08/2022Actions
Actions

Also available in: Atom PDF