Project

General

Profile

Actions

Bug #22407

open

arvadosclient tests can fail if RailsAPI errors include backtrace info

Added by Brett Smith 4 days ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
-
Story points:
-

Description

I haven't tracked down all the factors at play here, but I am seeing this sdk/go/arvadosclient test failure on a fresh development install on Debian 12:

----------------------------------------------------------------------
FAIL: arvadosclient_test.go:119: ServerRequiredSuite.TestErrorResponse

arvadosclient_test.go:128:
    c.Assert(err, ErrorMatches, "arvados API server error: .*")
... error string = "" +
...     "arvados API server error: #<ActiveModel::UnknownAttributeError: unknown attribute 'bogus_attr' for Log.\n" +
...     "\n" +
...     "          raise UnknownAttributeError.new(self, k.to_s)\n" +
...     "          ^^^^^> (req-c60vk3fbnufo32wo3bv5) (422: 422 Unprocessable Entity) returned by 0.0.0.0:44737" 
... regex string = "arvados API server error: .*" 

This passes on my regular box. The difference is that there, the error string is only:

... error string = "arvados API server error: #<ActiveModel::UnknownAttributeError: unknown attribute 'bogus_attr' for Log.> (req-1onsacd6a20qs4qf5vc5) (422: 422 Unprocessable Entity) returned by 0.0.0.0:50171"

With the newlines introduced by the backtrace-ish line, .* fails to match the rest of the string.

I assume we don't want these lines to ever appear. Given that, it would be good to track down where they're coming from and make sure they're disabled in a reliable way.

For reference:

$ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu]

No data to display

Actions

Also available in: Atom PDF