Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

migrate to new bq client #201

Merged
merged 11 commits into from Jan 17, 2019
Merged

migrate to new bq client #201

merged 11 commits into from Jan 17, 2019

Conversation

honnix
Copy link
Member

@honnix honnix commented Jan 14, 2019

Hey, I just made a Pull Request!

Description

  • Upgrade to new bq client
  • Upgrade scio

Motivation and Context

The current version of bq is not working well with Scio.

Have you tested this? If so, how?

Checklist for PR author(s)

  • Changes are covered by unit test
  • All tests pass
  • Code coverage check passes
  • Error handling is tested
  • Errors are handled at the appropriate layer
  • Errors that cannot be handled where they occur are propagated
  • Relevant documentation updated
  • This PR has NO breaking change to public API
  • This PR has breaking change to public API and it is documented

Checklist for PR reviewer(s)

  • This PR has been incorporated in release note for the coming version
  • Risky changes introduced by this PR have been all considered

pom.xml Outdated
@@ -474,15 +479,24 @@
<ignoreSourcePackage>
<package>org.slf4j</package>
</ignoreSourcePackage>
<ignoreSourcePackage>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now how useful it is to have missinglink? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo not useful enough

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will leave this for this PR and we can consider how to move forward in later one.

@@ -75,25 +71,6 @@ public TableId createStagingTableId(TableId tableId, String location) {
return randomStagingTableId(tableId, location);
}

@Override
public BigQueryResult query(QueryRequest queryRequest) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to bring back this method?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not unless it's needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. Even query is wrapped in a JobInfo, and QueryRequest should not be used anymore.

@honnix
Copy link
Member Author

honnix commented Jan 15, 2019

Note that this is quite a breaking change, but seems no one is using this feature yet.

@@ -16,7 +16,8 @@

<properties>
<scala.baseVersion>2.12</scala.baseVersion>
<scala.version>2.12.6</scala.version>
<scala.version>2.12.8</scala.version>
<scio.version>0.7.0-beta3</scio.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the oldest version of scio we want to support?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea. We never talked about this. There have been some breaking changes in Scio across versions. It would be hard to support them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we try to avoid touching the parts of scio that tend to break so that flo can work with a range of scio versions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably support at least the latest stable release, i.e. 0.6.1.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will take a look, but I remember this PR addresses some incompatibility introduced by scio 0.7 already.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are quite many different versions of libs depended by beam2.6 which is depended by scio 0.6.1.

I'm not having a good feeling when it comes to our users of mono repo (which is already on scio 0.7.0-beta3).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing it in a separated PR: #204

return BigQueryOperation.ofQuery(() -> QueryRequest.of(query));
public BigQueryOperation<T> query(String query) {
final QueryJobConfiguration queryConfig = newBuilder(query)
// Use standard SQL syntax for queries.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be javadoc instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. I just copied Google's sample code. xD

@danielnorberg
Copy link
Contributor

danielnorberg commented Jan 17, 2019

👍 with #204

@honnix honnix merged commit a382e64 into master Jan 17, 2019
@honnix honnix deleted the upgrade-bq-client branch January 17, 2019 07:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants