Skip to content

Fix binary build time returned by version command#13140

Merged
ebeahan merged 1 commit intomainfrom
fix/build-time
Mar 13, 2026
Merged

Fix binary build time returned by version command#13140
ebeahan merged 1 commit intomainfrom
fix/build-time

Conversation

@swiatekm
Copy link
Contributor

@swiatekm swiatekm commented Mar 12, 2026

What does this PR do?

Fixes a bug where the build time reported by the agent binary is the zero value. This was accidentally broken by #12856, where the global containing this value was moved to the Settings struct, but was never actually populated.

I've also added unit tests and verified that the output of version is correct in an existing integration test.

Why is it important?

The reported build time should be accurate.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • 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/fragments using the changelog tool
  • I have added an integration test or an E2E test

How to test this PR locally

Build the agent and run elastic-agent version --binary-only. Packaging isn't necessary.

@mergify
Copy link
Contributor

mergify bot commented Mar 12, 2026

This pull request does not have a backport label. Could you fix it @swiatekm? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@swiatekm swiatekm added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team backport-active-all Automated backport with mergify to all the active branches labels Mar 13, 2026
@swiatekm swiatekm marked this pull request as ready for review March 13, 2026 09:21
@swiatekm swiatekm requested a review from a team as a code owner March 13, 2026 09:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @swiatekm

@ebeahan ebeahan merged commit 9265949 into main Mar 13, 2026
28 checks passed
@ebeahan ebeahan deleted the fix/build-time branch March 13, 2026 16:05
@github-actions
Copy link
Contributor

@Mergifyio backport 8.19 9.2 9.3

@mergify
Copy link
Contributor

mergify bot commented Mar 13, 2026

backport 8.19 9.2 9.3

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Mar 13, 2026
mergify bot pushed a commit that referenced this pull request Mar 13, 2026
mergify bot pushed a commit that referenced this pull request Mar 13, 2026
ebeahan pushed a commit that referenced this pull request Mar 13, 2026
(cherry picked from commit 9265949)

Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
ebeahan pushed a commit that referenced this pull request Mar 13, 2026
(cherry picked from commit 9265949)

Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
ebeahan pushed a commit that referenced this pull request Mar 13, 2026
(cherry picked from commit 9265949)

Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants