Closed Bug 1339403 Opened 7 years ago Closed 7 years ago

[TypeError] <antenna.ext.s3.connection.S3Connection object at 0x7f3e07db5908> is not JSON serializable [antenna]

Categories

(Socorro :: Antenna, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

References

Details

Attachments

(1 file)

Earlier this morning, got this email. At the time of this writing, there have been 1.5k events:

https://sentry.prod.mozaws.net/operations/antenna-stage/issues/383152/

"""
Traceback
  File "raven/middleware.py", line 20, in common_exception_handling
    yield
  File "raven/middleware.py", line 98, in __call__
    iterable = self.application(environ, start_response)
  File "falcon/api.py", line 209, in __call__
    responder(req, resp, **params)
  File "antenna/health_resource.py", line 113, in on_get
    resp.body = json.dumps(state.to_dict())
  File "json/__init__.py", line 230, in dumps
    return _default_encoder.encode(obj)
  File "json/encoder.py", line 198, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "json/encoder.py", line 256, in iterencode
    return _iterencode(o, 0)
  File "json/encoder.py", line 179, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <antenna.ext.s3.connection.S3Connection object at 0x7f3e07db5908> is not JSON serializable
"""

That's coming from the __heartbeat__ endpoint. Looks like it's failing the HEAD bucket check and then putting the S3Connection object in the errors list.

Two things wrong here:

1. it shouldn't be failing the HEAD bucket check, so something's not configured right

2. it shouldn't error out when checking health--the .add_error() call is wrong


This bug covers telling Miles about issue 1 and fixing issue 2.
Grabbing this to work on today.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Landed in master. Marking as FIXED.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Switching Antenna bugs to Antenna component.
Component: General → Antenna
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: