Skip to content

Commit efadbfb

Browse files
devin-ai-integration[bot]bot_apklazebnyi
authored
fix(source-google-analytics-data-api, source-google-search-console): add access_token to extract_output to fix OAuth secretId 422 regression (#76190)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: bot_apk <apk@cognition.ai> Co-authored-by: Serhii Lazebnyi <gl_serhii.lazebnyi@airbyte.io>
1 parent a6fe721 commit efadbfb

8 files changed

Lines changed: 60 additions & 2 deletions

File tree

airbyte-integrations/connectors/source-google-analytics-data-api/manifest.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2992,6 +2992,7 @@ spec:
29922992
access_token_url: "https://oauth2.googleapis.com/token?{{client_id_param}}&{{client_secret_param}}&{{auth_code_param}}&{{redirect_uri_param}}&grant_type=authorization_code"
29932993
extract_output:
29942994
- refresh_token
2995+
- access_token
29952996
complete_oauth_output_specification:
29962997
type: object
29972998
properties:

airbyte-integrations/connectors/source-google-analytics-data-api/metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ data:
1212
connectorSubtype: api
1313
connectorType: source
1414
definitionId: 3cc2eafd-84aa-4dca-93af-322d9dfeec1a
15-
dockerImageTag: 2.9.29
15+
dockerImageTag: 2.9.30
1616
dockerRepository: airbyte/source-google-analytics-data-api
1717
documentationUrl: https://docs.airbyte.com/integrations/sources/google-analytics-data-api
1818
externalDocumentationUrls:

airbyte-integrations/connectors/source-google-analytics-data-api/unit_tests/test_components.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
# Copyright (c) 2025 Airbyte, Inc., all rights reserved.
33
#
44

5+
from pathlib import Path
56
from typing import Dict, List, Union
67

78
import pytest
9+
import yaml
810

911

1012
_CONFIG = {
@@ -225,3 +227,28 @@ def test_not_expression_dimension_filter_config_transformation(components_module
225227
}
226228

227229
assert config["custom_reports_array"][0]["dimensionFilter"] == expected_dimension_filter
230+
231+
232+
def test_complete_oauth_output_specification_contains_refresh_and_access_token():
233+
"""Verify that complete_oauth_output_specification declares both refresh_token and access_token,
234+
and that extract_output matches.
235+
236+
Both tokens must be listed so the platform correctly merges the OAuth response into the
237+
connector config when users create sources via the public API with secretId.
238+
239+
Regression test for https://github.com/airbytehq/oncall/issues/11935
240+
"""
241+
manifest_path = Path(__file__).parent.parent / "manifest.yaml"
242+
manifest = yaml.safe_load(manifest_path.read_text())
243+
244+
oauth_spec = manifest["spec"]["advanced_auth"]["oauth_config_specification"]
245+
246+
# extract_output should list both refresh_token and access_token
247+
extract_output = oauth_spec["oauth_connector_input_specification"]["extract_output"]
248+
assert "refresh_token" in extract_output, "refresh_token must be in extract_output"
249+
assert "access_token" in extract_output, "access_token must be in extract_output"
250+
251+
# complete_oauth_output_specification must match extract_output
252+
output_props = oauth_spec["complete_oauth_output_specification"]["properties"]
253+
assert "refresh_token" in output_props, "refresh_token must be in complete_oauth_output_specification"
254+
assert "access_token" in output_props, "access_token must be in complete_oauth_output_specification"

airbyte-integrations/connectors/source-google-search-console/manifest.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ spec:
232232
access_token_url: "https://oauth2.googleapis.com/token?{{client_id_param}}&{{client_secret_param}}&{{auth_code_param}}&{{redirect_uri_param}}&grant_type=authorization_code"
233233
extract_output:
234234
- refresh_token
235+
- access_token
235236
complete_oauth_output_specification:
236237
type: object
237238
properties:

airbyte-integrations/connectors/source-google-search-console/metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ data:
1010
connectorSubtype: api
1111
connectorType: source
1212
definitionId: eb4c9e00-db83-4d63-a386-39cfa91012a8
13-
dockerImageTag: 1.10.30
13+
dockerImageTag: 1.10.31
1414
dockerRepository: airbyte/source-google-search-console
1515
documentationUrl: https://docs.airbyte.com/integrations/sources/google-search-console
1616
externalDocumentationUrls:

airbyte-integrations/connectors/source-google-search-console/unit_tests/test_components.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Copyright (c) 2025 Airbyte, Inc., all rights reserved.
22

33
import logging
4+
from pathlib import Path
45

56
import pytest
7+
import yaml
68

79

810
@pytest.mark.parametrize(
@@ -205,3 +207,28 @@ def test_warning_logged_for_complex_values(self, components_module, caplog):
205207
component.transform(record=record)
206208

207209
assert any("Complex value encountered for field 'clicks'" in msg for msg in caplog.messages)
210+
211+
212+
def test_complete_oauth_output_specification_contains_refresh_and_access_token():
213+
"""Verify that complete_oauth_output_specification declares both refresh_token and access_token,
214+
and that extract_output matches.
215+
216+
Both tokens must be listed so the platform correctly merges the OAuth response into the
217+
connector config when users create sources via the public API with secretId.
218+
219+
Regression test for https://github.com/airbytehq/oncall/issues/11935
220+
"""
221+
manifest_path = Path(__file__).parent.parent / "manifest.yaml"
222+
manifest = yaml.safe_load(manifest_path.read_text())
223+
224+
oauth_spec = manifest["spec"]["advanced_auth"]["oauth_config_specification"]
225+
226+
# extract_output should list both refresh_token and access_token
227+
extract_output = oauth_spec["oauth_connector_input_specification"]["extract_output"]
228+
assert "refresh_token" in extract_output, "refresh_token must be in extract_output"
229+
assert "access_token" in extract_output, "access_token must be in extract_output"
230+
231+
# complete_oauth_output_specification must match extract_output
232+
output_props = oauth_spec["complete_oauth_output_specification"]["properties"]
233+
assert "refresh_token" in output_props, "refresh_token must be in complete_oauth_output_specification"
234+
assert "access_token" in output_props, "access_token must be in complete_oauth_output_specification"

docs/integrations/sources/google-analytics-data-api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ The Google Analytics connector is subject to Google Analytics Data API quotas. P
280280

281281
| Version | Date | Pull Request | Subject |
282282
|:---------------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
283+
| 2.9.30 | 2026-04-09 | [76190](https://github.com/airbytehq/airbyte/pull/76190) | Add access_token to extract_output and complete_oauth_output_specification to fix OAuth secretId 422 regression |
283284
| 2.9.29 | 2026-04-01 | [75580](https://github.com/airbytehq/airbyte/pull/75580) | Add `oauth_connector_input_specification` with granular scopes |
284285
| 2.9.28 | 2026-03-31 | [75678](https://github.com/airbytehq/airbyte/pull/75678) | Update dependencies |
285286
| 2.9.27 | 2026-03-24 | [74568](https://github.com/airbytehq/airbyte/pull/74568) | Update dependencies |

docs/integrations/sources/google-search-console.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ Google Search Console only retains data for websites from the last 16 months. An
244244

245245
| Version | Date | Pull Request | Subject |
246246
|:------------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
247+
| 1.10.31 | 2026-04-09 | [76190](https://github.com/airbytehq/airbyte/pull/76190) | Add access_token to extract_output and complete_oauth_output_specification to fix OAuth secretId 422 regression |
247248
| 1.10.30 | 2026-04-13 | [76276](https://github.com/airbytehq/airbyte/pull/76276) | Rename "concurrent workers" to "concurrent threads" in connector spec |
248249
| 1.10.29 | 2026-04-01 | [75582](https://github.com/airbytehq/airbyte/pull/75582) | Add `oauth_connector_input_specification` with granular scopes |
249250
| 1.10.28 | 2026-03-31 | [75699](https://github.com/airbytehq/airbyte/pull/75699) | Update dependencies |

0 commit comments

Comments
 (0)