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(logging): Add back constants for backward compatibility #15514

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

zmyzheng
Copy link
Contributor

Summary

Before v1.31.0, Telegraf had some public constants inside logging package: https://github.com/influxdata/telegraf/blob/release-1.30/logger/logger.go#L20~#L23. Starting from v1.31.0, these constants are removed and hard-coded strings are used instead in the code. This seems to be a breaking change for some projects referring to these constants. This change is not announced in the release announcement of v1.31.0 as well. It would be great if we can add back those constants to Telegraf source code to have a consistent behavior as the historical code and avoid hard-coded string in the source code.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #15513

@telegraf-tiger
Copy link
Contributor

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.60 % for linux amd64 (new size: 243.5 MB, nightly size 239.7 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

@powersj
Copy link
Contributor

powersj commented Jun 14, 2024

I've approved and will have others review, but again as I mentioned we don't guarantee backwards compatibility in these parts of the code. I fear we may unintentionally break you down the road again.

@powersj powersj 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 Jun 14, 2024
@srebhan srebhan changed the title style(logging): add back constants existing before 1.31.0 fix(logging): Add back constants for backward compatibility Jun 17, 2024
@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Jun 17, 2024
@srebhan srebhan merged commit c22dd1f into influxdata:master Jun 17, 2024
29 checks passed
@github-actions github-actions bot added this to the v1.31.1 milestone Jun 17, 2024
srebhan pushed a commit that referenced this pull request Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging fix pr to fix corresponding bug 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.

Add back constants in the logging package
4 participants