New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 787231 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Refactor infra/libs/bigquery

Project Member Reported by katthomas@chromium.org, Nov 21 2017

Issue description

Some functionality has been removed due to bigquery updates (https://chromium-review.googlesource.com/c/infra/infra/+/779942).

First of all, we don't need the lock anymore:
I added the lock because the bigquery client uses httplib2, which can cause SSL errors when multiple threads use the same connection. This was happening on CQ. Looks like it uses requests instead of httplib2 as of 0.26.0, so the lock is no longer needed!

Without insert_id generation and the lock, BigQueryHelper really doens't need to be a class. Refactor send_rows to be a standalone method that accepts a BQ client. 


 
Note: this will change the signature of send_rows, which will require an update to clients. Currently this is only CQ, so the sooner this is done, the better.


Project Member

Comment 2 by bugdroid1@chromium.org, Nov 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/2e716e1e381b901fc66c43cae89d55ea53446b12

commit 2e716e1e381b901fc66c43cae89d55ea53446b12
Author: Katie Thomas <katthomas@google.com>
Date: Thu Nov 30 16:35:03 2017

[bigquery] refactor BigQueryHelper

After a recent version bump, the lock is no loger necessary. At this
point, the class is no longer necessary either, so remove it.

This is a backwards incompatible change. At the point, BQH has only one
client, CQ, which will be updated in a subsequent CL.

Bug:787231
Change-Id: I37d03b3d36fdb904e5885b3d09e7db1a13be7660
Reviewed-on: https://chromium-review.googlesource.com/797250
Commit-Queue: Katie Thomas <katthomas@google.com>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

[modify] https://crrev.com/2e716e1e381b901fc66c43cae89d55ea53446b12/infra/libs/bigquery/test/helper_test.py
[modify] https://crrev.com/2e716e1e381b901fc66c43cae89d55ea53446b12/infra/libs/bigquery/__init__.py
[modify] https://crrev.com/2e716e1e381b901fc66c43cae89d55ea53446b12/infra/libs/bigquery/helper.py

Owner: katthomas@chromium.org
Status: Fixed (was: Available)

Sign in to add a comment