Skip to content

Commit

Permalink
🐛Source Google Search Console: Verify access to all sites when perfor…
Browse files Browse the repository at this point in the history
…ming connection check (airbytehq#6315)

* Upd connection check: verify all the site urls

* Fix typo

* Bump version
  • Loading branch information
gaart authored Sep 23, 2021
1 parent 9aa5a5a commit 9a6cf1e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"sourceDefinitionId": "eb4c9e00-db83-4d63-a386-39cfa91012a8",
"name": "Google Search Console (native)",
"dockerRepository": "airbyte/source-google-search-console",
"dockerImageTag": "0.1.0",
"dockerImageTag": "0.1.1",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/google-search-console"
}
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@
- sourceDefinitionId: eb4c9e00-db83-4d63-a386-39cfa91012a8
name: Google Search Console
dockerRepository: airbyte/source-google-search-console
dockerImageTag: 0.1.0
dockerImageTag: 0.1.1
documentationUrl: https://docs.airbyte.io/integrations/sources/google-search-console
sourceType: api
- sourceDefinitionId: bad83517-5e54-4a3d-9b53-63e85fbd4d7c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.0
LABEL io.airbyte.version=0.1.1
LABEL io.airbyte.name=airbyte/source-google-search-console
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ def check_connection(self, logger: AirbyteLogger, config: Mapping[str, Any]) ->
try:
stream_kwargs = self.get_stream_kwargs(config)
sites = Sites(**stream_kwargs)
stream_slice = next(sites.stream_slices(SyncMode.full_refresh))
sites_gen = sites.read_records(sync_mode=SyncMode.full_refresh, stream_slice=stream_slice)
next(sites_gen)
stream_slice = sites.stream_slices(SyncMode.full_refresh)

# stream_slice returns all site_urls and we need to make sure that
# the connection is successful for all of them
for _slice in stream_slice:
sites_gen = sites.read_records(sync_mode=SyncMode.full_refresh, stream_slice=_slice)
next(sites_gen)
return True, None

except Exception as error:
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/google-search-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,5 @@ You should now be ready to use the Google Workspace Admin Reports API connector

| Version | Date | Pull Request | Subject |
| :------ | :-------- | :----- | :------ |
| `0.1.1` | 2021-09-22 | [6315](https://github.com/airbytehq/airbyte/pull/6315) | Verify access to all sites when performing connection check |
| `0.1.0` | 2021-09-03 | [5350](https://github.com/airbytehq/airbyte/pull/5350) | Initial Release |

0 comments on commit 9a6cf1e

Please sign in to comment.