Bug #17492
closedExceptions thrown by the Ruby SDK should include the request id if possible
Updated by Lucas Di Pentima about 3 years ago
Updates at 1859bc3 - branch 17492-ruby-sdk-req-ids
Status update:¶
The arv
CLI command currently implements its own GoogleAPIClient
subclass to add custom behavior. I've replaced that subclass with a new one from the arvados
gem.
The new Arvados::ArvadosClient
class overrides the execute()
method, passing a newly created X-Request-Id: req-xxxxx
header to every request and also adding the request-id to the exception message if it's not there.
Pending:¶
- Add some testing to this new
ArvadosClient
code. It would be ideal to do some unit testing to check the different failure modes, although it's not clear if it's a simple task. - The
arv
CLI testing machinery relies on installing a released version of thearvados
gem, so the gem won't reflect any changes on the CLI test run until we do a proper release.
Updated by Lucas Di Pentima about 3 years ago
Updates at 5e26583 - branch 17492-ruby-sdk-req-ids
Test run:
- Rebased to newest
main
- Reverted
arv
changes because it'll need the Ruby SDK to be released first. - Fixed
Arvados::ArvadosClient
class and added a test that confirms the request id is added to an exception message that doesn't include it.
Updated by Tom Clegg about 3 years ago
This LGTM.
I fell into a hole trying to run tests locally. When I deleted my {tmpdir}/GEMHOME dir in an attempt to resolve a bundler version conflict, run-tests.sh stopped working completely. It seems that it has been installing the desired version of bundler to $HOME but then running the version in {tmpdir}/GEMHOME. I'm guessing jenkins (like my system) still has a version of bundler installed in {tmpdir}/GEMHOME because a previous run-tests.sh would have also installed a version there, because bundler was (still is) listed in Gemfile.lock. Ugh!
I made things work by doing this:
17492-fix-bundler-install @ fba386bcea1c003760fa23daff1ecabc14a476ca -- developer-run-tests: #2902
If this looks right to you, maybe we should merge it?
Updated by Peter Amstutz about 3 years ago
Lucas Di Pentima wrote:
17492-fix-bundler-install LGTM
FWIW I ended up making almost exactly the same fix in the arvbox branch, #18657