Closed Bug 1632624 Opened 6 months ago Closed 6 months ago

When adding vars to the fields data that is logged to stack driver, convert to a JSON string

Categories

(bugzilla.mozilla.org :: General, defect)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: dkl, Assigned: dkl)

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
Details | Review

BigQuery bugs out when you send logging data that has unknown data structure. We add a fields to the 'Fields' data that is variables that are passed in to the various ThrowUserError or ThrowCodeError exceptions in the Bugzilla code. The $vars hash is converted to key/value pairs in 'Fields' such as "var_$key": "$value". Problem is $value can be an array reference, hash reference, or just a string. BigQuery expects all fields to match a schema and there is not way to say, allow anything.

I propose changing to just passing a single field called 'vars' whose value is a JSON string version of the $vars data.

Attached file GitHub Pull Request

Merged with master.

Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.