feat: Report table errors from plugins via gRPC#320
Merged
kodiakhq[bot] merged 3 commits intomainfrom Sep 3, 2025
Merged
Conversation
670eeab to
d30be5c
Compare
erezrokah
commented
Sep 3, 2025
| yield plugin_pb2.Sync.Response( | ||
| migrate_table=plugin_pb2.Sync.MessageMigrateTable(table=buf) | ||
| ) | ||
| elif isinstance(msg, SyncErrorMessage) and request.withErrorMessages: |
Member
Author
There was a problem hiding this comment.
This is the main change (part 1) to add the feature
erezrokah
commented
Sep 3, 2025
| depth=depth, | ||
| exc_info=e, | ||
| ) | ||
| res.put(SyncErrorMessage(resolver.table.name, str(e))) |
Member
Author
There was a problem hiding this comment.
This is the main change (part 2) to add the feature
erezrokah
commented
Sep 3, 2025
| total_errors = 0 | ||
| for msg in response: | ||
| if msg.insert is not None: | ||
| message_type = msg.WhichOneof("message") |
Member
Author
There was a problem hiding this comment.
msg.WhichOneof("message") is the correct way to know the message type.
On other non insert message the condition msg.insert is not None is true as well
hermanschaaf
approved these changes
Sep 3, 2025
kodiakhq bot
pushed a commit
that referenced
this pull request
Sep 3, 2025
🤖 I have created a release *beep* *boop* --- ## [0.1.47](v0.1.46...v0.1.47) (2025-09-03) ### Features * Report table errors from plugins via gRPC ([#320](#320)) ([79d026e](79d026e)) ### Bug Fixes * **deps:** Update dependency cloudquery-plugin-pb to v0.0.47 ([#318](#318)) ([cc679a3](cc679a3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes cloudquery/cloudquery#15525, the Python equivalent of cloudquery/plugin-sdk#2195
Most of the changes are actually to the MemDB plugin
(that's why tests are failing, PR in draft while I fix those), as I turned it into a "real" plugin that uses the SDK scheduler so I can test this change.