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

beats: import time/tzdata explicitly in main #40420

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

mauri870
Copy link
Member

@mauri870 mauri870 commented Aug 1, 2024

Proposed commit message

In order to handle timezones we import Go's own timezone database. This
import is done indirectly by libbeat/common/cfgtype. We trust that this
package will end up being required by the dependency chain of every beats
main binary.

To ensure that the binaries continue to handle timezones correctly even if the
indirect import is removed let's import time/tzdata explicitly in the main packages.

See discussion at #40326.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Author's Checklist

  • All main packages expected to handle timezones should import time/tzdata.

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@mauri870 mauri870 requested review from a team as code owners August 1, 2024 16:50
@mauri870 mauri870 requested review from belimawr and leehinman August 1, 2024 16:50
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 1, 2024
Copy link
Contributor

mergify bot commented Aug 1, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @mauri870? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

In order to handle timezones we import Go's own timezone database. This
import is done indirectly by libbeat/common/cfgtype. We trust that this
package will end up being required by the dependency chain of every beats
main binary.

To ensure that the binaries continue to handle timezones correctly and to
avoid any unexpected issues, let's import time/tzdata explicitly in the
main packages.

See elastic#40326.
@mauri870 mauri870 force-pushed the feature/tzdata-main branch from 68e92c1 to 5459933 Compare August 1, 2024 16:53
@mauri870 mauri870 requested a review from a team as a code owner August 1, 2024 16:53
@pierrehilbert pierrehilbert added Team:obs-ds-hosted-services Label for the Observability Hosted Services team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:Security-Linux Platform Linux Platform Team in Security Solution Team:Security-Windows Platform Windows Platform Team in Security Solution Team:Security-Deployment and Devices Deployment and Devices Team in Security Solution labels Aug 2, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/sec-deployment-and-devices (Team:Security-Deployment and Devices)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/sec-windows-platform (Team:Security-Windows Platform)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 2, 2024
@pierrehilbert pierrehilbert requested a review from rdner August 2, 2024 07:56
@rdner
Copy link
Member

rdner commented Aug 2, 2024

/test

@pierrehilbert
Copy link
Collaborator

/test

@pierrehilbert
Copy link
Collaborator

run docs-build

@pierrehilbert
Copy link
Collaborator

@nfritts / @bturquet could we have someone from your team to review the work here please?

@pierrehilbert
Copy link
Collaborator

/test

@pierrehilbert
Copy link
Collaborator

run docs-build

@pierrehilbert
Copy link
Collaborator

@graphaelli could you please find someone to review here as @bturquet is currently out?

@pierrehilbert pierrehilbert merged commit 7b041ba into elastic:main Aug 12, 2024
145 checks passed
vinit-chauhan pushed a commit to vinit-chauhan/beats that referenced this pull request Aug 13, 2024
In order to handle timezones we import Go's own timezone database. This
import is done indirectly by libbeat/common/cfgtype. We trust that this
package will end up being required by the dependency chain of every beats
main binary.

To ensure that the binaries continue to handle timezones correctly and to
avoid any unexpected issues, let's import time/tzdata explicitly in the
main packages.

See elastic#40326.

Co-authored-by: Pierre HILBERT <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:obs-ds-hosted-services Label for the Observability Hosted Services team Team:Security-Deployment and Devices Deployment and Devices Team in Security Solution Team:Security-Linux Platform Linux Platform Team in Security Solution Team:Security-Windows Platform Windows Platform Team in Security Solution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants