Skip to content

Commit

Permalink
🐛 BigQuery Destination failed conditional binding (#12068)
Browse files Browse the repository at this point in the history
* BigQuery Destination check conditional binding

* fixed checkstyle

* BigQuery Destination fixed bug with contitional binding

* update CHANGELOG

* update CHANGELOG

* add explaining comment

* bump version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
2 people authored and suhomud committed May 23, 2022
1 parent e084a0d commit 2dac264
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- name: BigQuery
destinationDefinitionId: 22f6c74f-5699-40ff-833c-4a879ea40133
dockerRepository: airbyte/destination-bigquery
dockerImageTag: 1.1.0
dockerImageTag: 1.1.1
documentationUrl: https://docs.airbyte.io/integrations/destinations/bigquery
icon: bigquery.svg
resourceRequirements:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
supported_destination_sync_modes:
- "overwrite"
- "append"
- dockerImage: "airbyte/destination-bigquery:1.1.0"
- dockerImage: "airbyte/destination-bigquery:1.1.1"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/destinations/bigquery"
connectionSpecification:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ ENV ENABLE_SENTRY true

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=1.1.0
LABEL io.airbyte.version=1.1.1
LABEL io.airbyte.name=airbyte/destination-bigquery
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import io.airbyte.integrations.destination.bigquery.uploader.BigQueryUploaderFactory;
import io.airbyte.integrations.destination.bigquery.uploader.UploaderType;
import io.airbyte.integrations.destination.bigquery.uploader.config.UploaderConfig;
import io.airbyte.integrations.destination.gcs.GcsDestination;
import io.airbyte.integrations.destination.gcs.GcsDestinationConfig;
import io.airbyte.integrations.destination.gcs.GcsNameTransformer;
import io.airbyte.integrations.destination.gcs.GcsStorageOperations;
Expand Down Expand Up @@ -135,12 +136,13 @@ public AirbyteConnectionStatus checkStorageIamPermissions(final JsonNode config)
.toList();

if (!missingPermissions.isEmpty()) {
LOGGER.error("Please make sure you account has all of these permissions:{}", REQUIRED_PERMISSIONS);
LOGGER.warn("Please make sure you account has all of these permissions:{}", REQUIRED_PERMISSIONS);
// if user or service account has a conditional binding for processing handling in the GCS bucket,
// testIamPermissions will not work properly, so we use the standard check method of GCS destination
final GcsDestination gcsDestination = new GcsDestination();
final JsonNode gcsJsonNodeConfig = BigQueryUtils.getGcsJsonNodeConfig(config);
return gcsDestination.check(gcsJsonNodeConfig);

return new AirbyteConnectionStatus()
.withStatus(AirbyteConnectionStatus.Status.FAILED)
.withMessage("Could not connect to the Gcs bucket with the provided configuration. "
+ "Missing permissions: " + missingPermissions);
}
return new AirbyteConnectionStatus().withStatus(Status.SUCCEEDED);

Expand Down
1 change: 1 addition & 0 deletions docs/integrations/destinations/bigquery.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ This uploads data directly from your source to BigQuery. While this is faster to

| Version | Date | Pull Request | Subject |
|:--------| :--- | :--- | :--- |
| 1.1.1 | 2022-04-15 | [12068](https://github.com/airbytehq/airbyte/pull/12068) | Fixed bug with GCS bucket conditional binding |
| 1.1.0 | 2022-04-06 | [11776](https://github.com/airbytehq/airbyte/pull/11776) | Use serialized buffering strategy to reduce memory consumption. |
| 1.0.2 | 2022-03-30 | [11620](https://github.com/airbytehq/airbyte/pull/11620) | Updated spec |
| 1.0.1 | 2022-03-24 | [11350](https://github.com/airbytehq/airbyte/pull/11350) | Improve check performance |
Expand Down

0 comments on commit 2dac264

Please sign in to comment.