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 timestamp conversion in opamp bridge #3582

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

swiatekm
Copy link
Contributor

Description:

Kubernetes (and Go in general) allow for signed unix timestamps representing dates before 01-01-1970. However, OpAMP only accepts unsigned timestamps. Until now, opamp bridge simply assumed the conversion could always be carried out. This change instead returns errors when either the bridge or the respective K8s resources have negative Unix timestamps.

Unblocks #3538 and building the operator with Go 1.23 by addressing gosec errors.

@swiatekm swiatekm requested a review from a team as a code owner December 30, 2024 16:18
@swiatekm swiatekm added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Dec 30, 2024
@swiatekm
Copy link
Contributor Author

I didn't include a changelog because I doubt this really affects anyone, but I can be persuaded otherwise.

Kubernetes (and Go in general) allow for signed unix timestamps
representing dates before 01-01-1970. However, OpAMP only accepts
unsigned timestamps. Until now, opamp bridge simply assumed the
conversion could always be carried out. This change instead returns
errors when either the bridge or the respective K8s resources have
negative Unix timestamps.
@swiatekm swiatekm force-pushed the fix/opampbridge-timestamps branch from 4481edb to 956600a Compare December 30, 2024 16:20
@swiatekm swiatekm merged commit 8061478 into open-telemetry:main Dec 30, 2024
38 checks passed
@swiatekm swiatekm deleted the fix/opampbridge-timestamps branch December 31, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants