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

More retrying changes #377

Closed
wants to merge 8 commits into from
Closed

Conversation

pondzix
Copy link
Contributor

@pondzix pondzix commented Oct 25, 2024

No description provided.

pondzix and others added 8 commits October 25, 2024 14:11
Currently retrying [configuration](https://github.com/snowplow/snowbridge/blob/c8c94f8a13367260f9a1a280cdd5d86098f66521/cmd/cli/cli.go#L213) is hardcoded to 5 attempts with exponential delay (inital 1 second) for each type of an error.

This commit brings a couple of improvements to retrying:

* Make retrying settings configurable from HCL. Max attempts and delay can now be customized.
* Split retrying strategies into 2 categories: transient and setup. Target can now signal what kind of an error has happened and what kind of retrying strategy should be applied.
* HTTP target can now return setup errors by the new response rules configuration. These rules also allows the target to match invalid data. Previously it was either failure (retried) or oversized data.
* Eventually setup errors will also trigger another actions like toggling application health status and sending monitoring alerts. For now behaviour for setup errors is basically the same as for transient errors, but extending behaviour for setup errors should be relatively easy with this structure.
* Add boolean config to enable TLS

* Fix config test
AWS sdk not updated as it broke e2e tests
Adding JQ filter, which allows us to...filter messages based on a configured JQ command. Similar to already existing JQ mapper, but JQ filter requires output of a command to have boolean type.

As there is some shared logic between the mapper and the new filter, I extracted common stuff to `jq_common.go` module.
@pondzix
Copy link
Contributor Author

pondzix commented Oct 30, 2024

Merged and squashed to the cbe1bcc on release branch

@pondzix pondzix closed this Oct 30, 2024
@colmsnowplow colmsnowplow deleted the retrying_more_improvements branch November 13, 2024 17:42
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.

2 participants