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.
Summary
It's not always possible to ensure that the SQL submitted with a Subscription will be implementable by the operator. In addition to syntax errors, it's possible that the user and operator disagree on what databases or tables exist, or which tables the user has access to. In such cases, the operator would just keep retrying and failing, without providing a reason to the user.
With this change, we report
.status.failed
anytime the operator is unable to implement a pipeline for the Subscription. In addition, we set.status.message
to the offending exception. This gives the user some insight into why the Subscription is not being deployed successfully.N.B. the operator will still backoff and retry failed Subscriptions, rather than give up entirely. In particular, a failed Subscription may suddenly transition to success if the catalog changes, e.g. if a missing table is created etc.
Testing Done
I deployed a subscription with invalid SQL, and validated that the subscription was marked as failed:
Then, after fixing the SQL: