[source-github] connection doesn't sync when source is created via API is invalid
- Lenguaje dominante
- Python
- Estrellas
- 22.1k
- Forks
- 5.3k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
### Connector Name
source-github
### Connector Version
1.8.26
### What step the error happened?
Other
### Relevant information
I use cloud.airbyte.com
When I create a source via API with:
```
{
'sourceType': 'github',
'api_url': 'https://api.github.com/',
'max_waiting_time': 10,
'credentials': {
'option_title': 'PAT Credentials',
'personal_access_token': '*********************************************************************************************'},
'repositories': ['org/repo1', 'org/repo2', 'org/repo3']
}
```
I received a 200 status, but I cannot create a connection with this source.
So, I go to source settings UI and press the "Retest saved source" button. I get `Configuration check failed
'AttributeError("\'NoneType\' object has no attribute \'get\'")'`
I tried to update the source via API after creation, but it didn't help.
After updating the access token via UI and saving it, it works, and I don't get any errors.
What should I do to fix this?
### Relevant log output
During source testing:
```shell
2025-04-05 08:32:04 info
2025-04-05 08:32:05 info ----- START CHECK -----
2025-04-05 08:32:05 info
2025-04-05 08:32:13 info Connector exited, processing output
2025-04-05 08:32:13 info Output file jobOutput.json found
2025-04-05 08:32:13 info Connector exited with exit code 0
2025-04-05 08:32:13 info Reading messages from protocol version 0.2.0
2025-04-05 08:32:13 error Check failed
2025-04-05 08:32:13 info Checking for optional control message...
2025-04-05 08:32:13 info Writing output of ef69ef6e-aa7f-4af1-a01d-ef775033524e_5162c2f9-c864-42ca-800b-dcb71e6b9f62_0_check to the doc store
2025-04-05 08:32:13 info Marking workload ef69ef6e-aa7f-4af1-a01d-ef775033524e_5162c2f9-c864-42ca-800b-dcb71e6b9f62_0_check as successful
2025-04-05 08:32:13 info
2025-04-05 08:32:13 info Deliberately exiting process with code 0.
2025-04-05 08:32:13 info ----- END CHECK -----
2025-04-05 08:32:13 info
```
During connection creation:
```shell
2025-04-05 09:06:48 info
2025-04-05 09:06:48 info Connector exited, processing output
2025-04-05 09:06:48 info ----- START DISCOVER -----
2025-04-05 09:06:48 info Output file jobOutput.json found
2025-04-05 09:06:48 info
2025-04-05 09:06:48 info Connector exited with exit code 1
2025-04-05 09:06:48 info Reading messages from protocol version 0.2.0
2025-04-05 09:06:48 error 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "/airbyte/integration_code/main.py", line 9, in
run()
File "/airbyte/integration_code/source_github/run.py", line 17, in run
launch(source, sys.argv[1:])
File "/usr/local/lib/python3.11/site-packages/airbyte_cdk/entrypoint.py", line 234, in launch
for message in source_entrypoint.run(parsed_args):
File "/usr/local/lib/python3.11/site-packages/airbyte_cdk/entrypoint.py", line 117, in run
yield from map(AirbyteEntrypoint.airbyte_message_to_string, self.discover(source_spec, config))
File "/usr/local/lib/python3.11/site-packages/airbyte_cdk/entrypoint.py", line 152, in discover
catalog = self.source.discover(self.logger, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/airbyte_cdk/sources/abstract_source.py", line 74, in discover
streams = [stream.as_airbyte_stream() for stream in self.streams(config=config)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/airbyte/integration_code/source_github/source.py", line 212, in streams
authenticator = self._get_authenticator(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/airbyte/integration_code/source_github/source.py", line 134, in _get_authenticator
return MultipleTokenAuthenticatorWithRateLimiter(tokens=tokens)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/airbyte/integration_code/source_github/utils.py", line 64, in __init__
self.check_all_tokens()
File "/airbyte/integration_code/source_github/utils.py", line 139, in check_all_tokens
self._check_token_limits(token)
File "/airbyte/integration_code/source_github/utils.py", line 125, in _check_token_limits
remaining_info_core = rate_limit_info.get("core")
^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
2025-04-05 09:06:48 info Checking for optional control message...
2025-04-05 09:06:48 info Writing output of ef69ef6e-aa7f-4af1-a01d-ef775033524e_65d76873-75d5-4f00-b5be-a43924fc8577_0_discover to the doc store
2025-04-05 09:06:48 info Marking workload ef69ef6e-aa7f-4af1-a01d-ef775033524e_65d76873-75d5-4f00-b5be-a43924fc8577_0_discover as successful
2025-04-05 09:06:48 info
2025-04-05 09:06:48 info Deliberately exiting process with code 0.
2025-04-05 09:06:48 info ----- END DISCOVER -----
2025-04-05 09:06:48 info
```
### Contribute
- [ ] Yes, I want to contribute
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.