Skip to content

bug: Python SDK doesn't handle Exceptions raised in TableResolver.resolve as expected #15525

@hydratim

Description

@hydratim

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Exceptions raised are incorrectly handled in Scheduler.resolve_table.

Instead of being reported to the CLI they are seemingly ignored.

Expected Behavior

Any Exception raised by a plugin's iterator should result in either Errors or Warnings being reported in the CLI.

CloudQuery (redacted) config

N/A

Steps To Reproduce

Write a Python plugin and raise an error in a table iterator.

CloudQuery (redacted) logs

cloudquery sync TestConfig.yaml
Loading spec(s) from TestConfig.yaml
Starting sync for: youtube (grpc@localhost:7777) -> [sqlite (v2.4.11)]
Sync completed successfully. Resources: 0, Errors: 0, Warnings: 0, Time: 0s

CloudQuery version

3.18.0

Additional Context

Thread Crash Log:
Traceback (most recent call last):
File "C:\Users\plain\AppData\Local\pypoetry\Cache\virtualenvs\example-dXPVP8vs-py3.11\Lib\site-packages\cloudquery\sdk\scheduler\scheduler.py", line 106, in resolve_table
for item in resolver.resolve(client, parent_item):
File "REDACTED", line 57, in resolve
for video_response in client.client.video_iterator():
File "REDACTED", line 63, in video_iterator
raise ValueError(f"authentication error: {e.reason}") from e
ValueError: authentication error: Request had invalid authentication credentials.

Pull request (optional)

  • I can submit a pull request

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions