Skip to content

Commit

Permalink
Do not swallow GCS failure when checking BigQuery config (airbytehq#2…
Browse files Browse the repository at this point in the history
…0501)

* Do not swallow GCS failure when checking BigQuery config

* bump version of BigQuery denormalized

* add changelog

* auto-bump connector version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
grishick and octavia-squidington-iii authored Dec 15, 2022
1 parent 25900b7 commit a12ca28
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- name: BigQuery
destinationDefinitionId: 22f6c74f-5699-40ff-833c-4a879ea40133
dockerRepository: airbyte/destination-bigquery
dockerImageTag: 1.2.8
dockerImageTag: 1.2.9
documentationUrl: https://docs.airbyte.com/integrations/destinations/bigquery
icon: bigquery.svg
normalizationRepository: airbyte/normalization
Expand All @@ -56,7 +56,7 @@
- name: BigQuery (denormalized typed struct)
destinationDefinitionId: 079d5540-f236-4294-ba7c-ade8fd918496
dockerRepository: airbyte/destination-bigquery-denormalized
dockerImageTag: 1.2.8
dockerImageTag: 1.2.9
documentationUrl: https://docs.airbyte.com/integrations/destinations/bigquery
icon: bigquery.svg
normalizationRepository: airbyte/normalization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@
supported_destination_sync_modes:
- "overwrite"
- "append"
- dockerImage: "airbyte/destination-bigquery:1.2.8"
- dockerImage: "airbyte/destination-bigquery:1.2.9"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/destinations/bigquery"
connectionSpecification:
Expand Down Expand Up @@ -831,7 +831,7 @@
- "overwrite"
- "append"
- "append_dedup"
- dockerImage: "airbyte/destination-bigquery-denormalized:1.2.8"
- dockerImage: "airbyte/destination-bigquery-denormalized:1.2.9"
spec:
documentationUrl: "https://docs.airbyte.com/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.2.8
LABEL io.airbyte.version=1.2.9
LABEL io.airbyte.name=airbyte/destination-bigquery-denormalized
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.2.8
LABEL io.airbyte.version=1.2.9
LABEL io.airbyte.name=airbyte/destination-bigquery
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ public AirbyteConnectionStatus check(final JsonNode config) {
.build();

if (UploadingMethod.GCS.equals(uploadingMethod)) {
checkGcsPermission(config);
final AirbyteConnectionStatus status = checkGcsPermission(config);
if(!status.getStatus().equals(Status.SUCCEEDED)) {
return status;
}
}

final ImmutablePair<Job, String> result = BigQueryUtils.executeQuery(bigquery, queryConfig);
Expand All @@ -120,7 +123,7 @@ public AirbyteConnectionStatus check(final JsonNode config) {
* and delete an actual file. The latter is important because even if the service account may have
* the proper permissions, the HMAC keys can only be verified by running the actual GCS check.
*/
public AirbyteConnectionStatus checkGcsPermission(final JsonNode config) {
private AirbyteConnectionStatus checkGcsPermission(final JsonNode config) {
final JsonNode loadingMethod = config.get(BigQueryConsts.LOADING_METHOD);
final String bucketName = loadingMethod.get(BigQueryConsts.GCS_BUCKET_NAME).asText();
final List<String> missingPermissions = new ArrayList<>();
Expand Down
2 changes: 2 additions & 0 deletions docs/integrations/destinations/bigquery.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Now that you have set up the BigQuery destination connector, check out the follo

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:----------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------|
| 1.2.9 | 2022-12-14 | [#20501](https://github.com/airbytehq/airbyte/pull/20501) | Report GCS staging failures that occur during connection check |
| 1.2.8 | 2022-11-22 | [#19489](https://github.com/airbytehq/airbyte/pull/19489) | Added non-billable projects handle to check connection stage |
| 1.2.7 | 2022-11-11 | [#19358](https://github.com/airbytehq/airbyte/pull/19358) | Fixed check method to capture mismatch dataset location |
| 1.2.6 | 2022-11-10 | [#18554](https://github.com/airbytehq/airbyte/pull/18554) | Improve check connection method to handle more errors |
Expand Down Expand Up @@ -190,6 +191,7 @@ Now that you have set up the BigQuery destination connector, check out the follo

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:----------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------|
| 1.2.9 | 2022-12-14 | [#20501](https://github.com/airbytehq/airbyte/pull/20501) | Report GCS staging failures that occur during connection check |
| 1.2.8 | 2022-11-22 | [#19489](https://github.com/airbytehq/airbyte/pull/19489) | Added non-billable projects handle to check connection stage |
| 1.2.7 | 2022-11-11 | [#19358](https://github.com/airbytehq/airbyte/pull/19358) | Fixed check method to capture mismatch dataset location |
| 1.2.6 | 2022-11-10 | [#18554](https://github.com/airbytehq/airbyte/pull/18554) | Improve check connection method to handle more errors |
Expand Down

0 comments on commit a12ca28

Please sign in to comment.