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

fix(outputs.influxdb_v2): Fix panic and API error handling #16388

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Jan 9, 2025

Summary

This PR fixes a panic for cases where the server returns a non-retryable status-code. In the course of investigating the matter unit-tests have been added to verify the correct handling of status-codes returned by the server unveiling some more corner-cases handled incorrectly. This PR also fixes those issues and simplifies code in doing so.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16350
resolves #16386

@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Jan 9, 2025

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 telegraf-tiger bot added area/influxdb fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Jan 9, 2025
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Jan 9, 2025

Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip.
Downloads for additional architectures and packages are available below.

⚠️ This pull request increases the Telegraf binary size by 1.40 % for linux amd64 (new size: 277.4 MB, nightly size 273.6 MB)

📦 Click here to get additional PR build artifacts

Artifact URLs

DEB RPM TAR GZ ZIP
amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip
arm64.deb armel.rpm darwin_arm64.tar.gz windows_arm64.zip
armel.deb armv6hl.rpm freebsd_amd64.tar.gz windows_i386.zip
armhf.deb i386.rpm freebsd_armv7.tar.gz
i386.deb ppc64le.rpm freebsd_i386.tar.gz
mips.deb riscv64.rpm linux_amd64.tar.gz
mipsel.deb s390x.rpm linux_arm64.tar.gz
ppc64el.deb x86_64.rpm linux_armel.tar.gz
riscv64.deb linux_armhf.tar.gz
s390x.deb linux_i386.tar.gz
linux_mips.tar.gz
linux_mipsel.tar.gz
linux_ppc64le.tar.gz
linux_riscv64.tar.gz
linux_s390x.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/influxdb fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Telegraf should log if InfluxDB returns a 400 panic: runtime error: index out of range [0] with length 0
1 participant