elastic / connectors

Source code for all Elastic connectors, developed by the Search team at Elastic, and home of our Python connector development framework
https://www.elastic.co/guide/en/enterprise-search/master/index.html
Other
58 stars 116 forks source link

[Github] 'NoneType' object is not subscriptable #2619

Open artem-shelkovnikov opened 3 weeks ago

artem-shelkovnikov commented 3 weeks ago

Bug Description

Found in telemetry, see stacktrace:

'NoneType' object is not subscriptable

 File "/usr/share/enterprise-search/lib/python3.10/site-packages/connectors/services/job_scheduling.py", line 96, in _schedule
    await data_source.validate_config()
  File "/usr/share/enterprise-search/lib/python3.10/site-packages/connectors/sources/github.py", line 1230, in validate_config
    await self._remote_validation()
  File "/usr/share/enterprise-search/lib/python3.10/site-packages/connectors/sources/github.py", line 1220, in _remote_validation
    invalid_repos = await self.get_invalid_repos()
  File "/usr/share/enterprise-search/lib/python3.10/site-packages/connectors/sources/github.py", line 1152, in get_invalid_repos
    self.org_repos[repo["nameWithOwner"]] = repo

There was already similar problem here: https://github.com/elastic/connectors/issues/2427. It was fixed for 8.13.3, but in a different place.

To Reproduce

Steps to reproduce the behavior:

  1. ???

Expected behavior

Error does not happen or gives user-actionable and user-friendly error message.

nick2432 commented 2 weeks ago

can i work on this?