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

feat: adds optional list of non retryable http statuscodes to http output plugin #10186

Merged
merged 7 commits into from
Dec 20, 2021

Conversation

nvinzens
Copy link
Contributor

Issue that describes the need for the change: #9365

Fixed by adding an optionally configurable list of statuscodes (<100 or >300) upon which HTTP requests should not be retried. In the case of thanos the fix would be to configure non_retryable_statuscodes = [409].

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Nov 26, 2021
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Very nice solution @nvinzens! There are some comments for not changing existing tests and to add a log message that metrics are dropped.

plugins/outputs/http/http.go Show resolved Hide resolved
plugins/outputs/http/http_test.go Show resolved Hide resolved
@srebhan srebhan self-assigned this Dec 1, 2021
@srebhan srebhan added the plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins label Dec 1, 2021
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for this nice feature @nvinzens! Can you please resolve the merge conflict?

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for your effort @nvinzens!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Dec 3, 2021
@powersj
Copy link
Contributor

powersj commented Dec 10, 2021

@nvinzens Can you rebase on master and fix the couple conflicts? Then I'm happy to +1 this.

@nvinzens nvinzens force-pushed the feature/do-not-retry-on-409-error branch from 0e1c7b9 to 512b2d1 Compare December 14, 2021 12:39
@nvinzens
Copy link
Contributor Author

@powersj done

@nvinzens
Copy link
Contributor Author

Since this is a feature it would have to be merged before tomorrow or else we have to wait until mid March, is that correct?

@powersj
Copy link
Contributor

powersj commented Dec 14, 2021

Since this is a feature it would have to be merged before tomorrow or else we have to wait until mid March, is that correct?

Right now when we do a new minor release we cut two release candidates as well. When we cut the first one is when we grab all the new features from master. Additional RCs and the final release only include bug fixes. Unfortunately, that means this would not make it for v1.21.0.

That said, we are looking at a new release model to avoid waiting 3 months for a new feature to make it into a release. TBD on when we start the new process, but I do want to put an end to this waiting.

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Still looks good to me.

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

1 small change we caught in pairs, but then we can merge.

plugins/outputs/http/README.md Show resolved Hide resolved
@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger
Copy link
Contributor

@nvinzens
Copy link
Contributor Author

Sorry, looks like something went wrong on the rebase. Now it complains about the CLA 🤨

@nvinzens
Copy link
Contributor Author

!signed-cla

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@srebhan
Copy link
Member

srebhan commented Dec 15, 2021

@nvinzens can you please sign the Contibutor License Agreement (CLA) to get this PR merged? If you have done so, please add a comment here with the content

!signed-cla

@nvinzens
Copy link
Contributor Author

I'm not quite sure what happened here, I have signed the CLA and all previous checks were successful. Do I have to sign it again?

@srebhan
Copy link
Member

srebhan commented Dec 20, 2021

!signed-cla

@srebhan
Copy link
Member

srebhan commented Dec 20, 2021

@nvinzens I also had this issue on another PR, but it passes now... :-) Triggering @powersj for another review.

@srebhan srebhan requested a review from powersj December 20, 2021 17:08
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks for seeing this through!

@powersj powersj merged commit c6faf3d into influxdata:master Dec 20, 2021
@mzbroch
Copy link

mzbroch commented Dec 20, 2021

Thanks @nvinzens for this contribution! Much appreciated!

powersj pushed a commit to powersj/telegraf that referenced this pull request Jan 21, 2022
nniehoff pushed a commit to networktocode/telegraf that referenced this pull request Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants