Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snowbridge v3 #1068

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

Snowbridge v3 #1068

wants to merge 41 commits into from

Conversation

colmsnowplow
Copy link
Contributor

PR to update docs for Snowbridge v3

Things to check:

@pondzix - I would appreciate your paying close attention to whether everything is accurate. Specifically I'm not 100% sure of the part that states that setup errors mean we'll stop processing all data for the retry period. Is that accurate?

@stanch - in addition to a normal PR review, I have marked some features as beta, wdyt about this? Happy to discuss to explain!

Copy link

netlify bot commented Nov 7, 2024

Deploy Preview for snowplow-docs ready!

Name Link
🔨 Latest commit 44f5717
🔍 Latest deploy log https://app.netlify.com/sites/snowplow-docs/deploys/678e8410a74ae900083366c4
😎 Deploy Preview https://deploy-preview-1068--snowplow-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@colmsnowplow colmsnowplow requested a review from pondzix November 7, 2024 16:56
@colmsnowplow
Copy link
Contributor Author

Note that we may wish to hold off on merging until such a time as we're ready to announce


A transient failure is a failure which we expect to succeed again on retry. For example some temporary network error, or when we encounter throttling. Typically you would configure a short backoff for this type of failure. When we encounter a transient failure, we keep processing the rest of the data as normal, under the expectation that everyhting is operating as normal. The failed data is retried after a backoff.

A setup failure is one which we don't expect to be immediately resolved, for example an incorrect address, or an invalid API Key. Typically you would configue a long backoff for this type of failure, under the assumption that the issue needs to be fixed with either a configuration change or a change to the target itself (eg. permissions need to be granted). When we encounter a setup error, we stop attempting to process any data, and the whole app waits for the backoff period before trying again. Setup errors will be retried 5 times, before the app crashes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we stop attempting to process any data

We don't do anything explicit to stop processing in this case. Right now setup is pretty much like transient, but with much longer backoff. In the future we might add monitoring/alerts/health toggle for setup errors, but it's not there now.

In practice, if you mark your HTTP response as setup error in config, it probably means nothing gets through and we indeed 'stop' processing anything. But there is no code in Snowbridge that would say stop pulling from source now, we hit setup error!.

Theoretically it's possible to have both: setup and transient simultaneously. Then it means your setup error probably shouldn't be configured as setup error.


A setup failure is one which we don't expect to be immediately resolved, for example an incorrect address, or an invalid API Key. Typically you would configue a long backoff for this type of failure, under the assumption that the issue needs to be fixed with either a configuration change or a change to the target itself (eg. permissions need to be granted). When we encounter a setup error, we stop attempting to process any data, and the whole app waits for the backoff period before trying again. Setup errors will be retried 5 times, before the app crashes.

As of v3.0.0, only the http target can be configured to return setup errors, via the response rules feature - configuration details for response rules can be found in [the http target configuration section](/docs/destinations/forwarding-events/snowbridge/configuration/targets/http/index.md). For all other targets, all errors returned will be considered transient, and behaviour can be configured using the `tranisent` block of the retry configuration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As of v3.0.0, only the http target can be configured to return setup errors, via the response rules feature - configuration details for response rules can be found in [the http target configuration section](/docs/destinations/forwarding-events/snowbridge/configuration/targets/http/index.md). For all other targets, all errors returned will be considered transient, and behaviour can be configured using the `tranisent` block of the retry configuration.
As of v3.0.0, only the http target can be configured to return setup errors, via the response rules feature - configuration details for response rules can be found in [the http target configuration section](/docs/destinations/forwarding-events/snowbridge/configuration/targets/http/index.md). For all other targets, all errors returned will be considered transient, and behaviour can be configured using the `transient` block of the retry configuration.


`jq` runs a jq command on the message data, and outputs the result of the command. While jq supports multi-element results, commands must output only a single element - this single element can be an array data type.

The provided command must return a boolean result. `false` filters the message out, `true` keeps it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this line shouldn't be here as it's only for filter, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. Done. Ty.

@pkutaj pkutaj closed this Jan 8, 2025
@pkutaj pkutaj deleted the snowbridge-v3 branch January 8, 2025 11:38
@colmsnowplow colmsnowplow restored the snowbridge-v3 branch January 15, 2025 13:26
@colmsnowplow
Copy link
Contributor Author

@pkutaj any reason this was closed, or was it done in error?

@pondzix pondzix reopened this Jan 20, 2025
@pkutaj
Copy link
Contributor

pkutaj commented Jan 20, 2025

That was surely my mistake, thanks Piotr for re-opening!

@stanch
Copy link
Collaborator

stanch commented Jan 20, 2025

Rebased on main

@@ -34,6 +38,8 @@ Writes of oversized messages to the failure target will be recorded with 'Oversi

In the unlikely event that Snowbridge encounters data which is invalid for the target destination (for example empty data is invalid for pubsub), it will create a [generic error failed event](/docs/fundamentals/failed-events/index.md#generic-error), emit it to the failure target, and ack the original message.

As of version 3.0.0, the http target may produce invalid failures. This occurs when the a POST request body cannot be formed, when the templating feature's attempts to template data result in an error, or when the response conforms to a response rules configuration which sepcifies that the failure is to be treated as invalid. You can find more details in the [configuration section](/docs/destinations/forwarding-events/snowbridge/configuration/targets/http/index.md).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“invalid failures” sounds like the failures themselves are invalid (which I assume is not the case?)

Maybe may produce “invalid event” failures?

colmsnowplow and others added 16 commits January 20, 2025 16:40
…ransformations/builtin/reusable/_jqDescription.md

Co-authored-by: Nick <[email protected]>
…ransformations/builtin/reusable/_jqHelpers.md

Co-authored-by: Nick <[email protected]>
…ransformations/builtin/reusable/_jqHelpers.md

Co-authored-by: Nick <[email protected]>
…argets/http/index.md

Co-authored-by: Piotr Poniedziałek <[email protected]>
@@ -34,6 +38,8 @@ Writes of oversized messages to the failure target will be recorded with 'Oversi

In the unlikely event that Snowbridge encounters data which is invalid for the target destination (for example empty data is invalid for pubsub), it will create a [generic error failed event](/docs/fundamentals/failed-events/index.md#generic-error), emit it to the failure target, and ack the original message.

As of version 3.0.0, the http target may produce invalid failures. This occurs when the a POST request body cannot be formed, when the templating feature's attempts to template data result in an error, or when the response conforms to a response rules configuration which sepcifies that the failure is to be treated as invalid. You can find more details in the [configuration section](/docs/destinations/forwarding-events/snowbridge/configuration/targets/http/index.md).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As of version 3.0.0, the http target may produce invalid failures. This occurs when the a POST request body cannot be formed, when the templating feature's attempts to template data result in an error, or when the response conforms to a response rules configuration which sepcifies that the failure is to be treated as invalid. You can find more details in the [configuration section](/docs/destinations/forwarding-events/snowbridge/configuration/targets/http/index.md).
As of version 3.0.0, the http target may produce 'invalid' type failures. This occurs when the a POST request body cannot be formed, when the templating feature's attempts to template data result in an error, or when the response conforms to a response rules configuration which sepcifies that the failure is to be treated as invalid. You can find more details in the [configuration section](/docs/destinations/forwarding-events/snowbridge/configuration/targets/http/index.md).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stanch this work?

…ransformations/builtin/reusable/_jqDescription.md

Co-authored-by: Nick <[email protected]>
…ransformations/builtin/reusable/_jqDescription.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants