Skip to content

Fix Windows FIPS upgrade failure caused by mismatched directory name - #16065

Merged
lorienhu merged 2 commits into
mainfrom
lhu-windows-fips-unpack
Aug 7, 2026
Merged

lorienhu merged 2 commits into
mainfrom
lhu-windows-fips-unpack

Conversation

@lorienhu

@lorienhu lorienhu commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Strip 'fips' from filename prefix for .zip in the upgrade unpack step, matching the naming for .tar.gz archives.

Why is it important?

Windows FIPS upgrades failed due to a mismatch between the directory name computed from the zip filename and the actual directory name inside the archive.

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 Upgrade integration tests for Windows FIPS should be enabled in separate PR for tracking.

Disruptive User Impact

N/A

How to test this PR locally

go test ./internal/pkg/agent/application/upgrade/... -run TestGetFileNamePrefix -v

Related issues

@lorienhu lorienhu self-assigned this Aug 7, 2026
@lorienhu
lorienhu requested a review from a team as a code owner August 7, 2026 00:23
@lorienhu
lorienhu requested a review from ycombinator August 7, 2026 00:23
@lorienhu lorienhu added the bug Something isn't working label Aug 7, 2026
@lorienhu
lorienhu requested a review from macdewee August 7, 2026 00:23
@lorienhu lorienhu added 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 Aug 7, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

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

@lorienhu
lorienhu force-pushed the lhu-windows-fips-unpack branch from 057deb6 to 4284297 Compare August 7, 2026 00:34
@lorienhu
lorienhu force-pushed the lhu-windows-fips-unpack branch from 4284297 to 01587c1 Compare August 7, 2026 00:35
@github-actions

This comment has been minimized.

@ycombinator
ycombinator enabled auto-merge (squash) August 7, 2026 15:48
@ycombinator
ycombinator disabled auto-merge August 7, 2026 15:48
Comment thread internal/pkg/agent/application/upgrade/step_unpack_test.go
ycombinator
ycombinator previously approved these changes Aug 7, 2026

@ycombinator ycombinator left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this.

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

cc @lorienhu

@lorienhu
lorienhu merged commit 6ed40ea into main Aug 7, 2026
24 checks passed
@lorienhu
lorienhu deleted the lhu-windows-fips-unpack branch August 7, 2026 22:30
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@Mergifyio backport 9.5 9.4 8.19

@mergify

mergify Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

lorienhu added a commit that referenced this pull request Aug 7, 2026
…16065) (#16088)

Strip 'fips' from filename prefix for .zip in the upgrade unpack step, matching the naming for .tar.gz archives.

(cherry picked from commit 6ed40ea)

Co-authored-by: Lorien Hu <lorien@lorienhu.com>
lorienhu added a commit that referenced this pull request Aug 8, 2026
…16065) (#16087)

Strip 'fips' from filename prefix for .zip in the upgrade unpack step, matching the naming for .tar.gz archives.

(cherry picked from commit 6ed40ea)

Co-authored-by: Lorien Hu <lorien@lorienhu.com>
lorienhu added a commit that referenced this pull request Aug 9, 2026
…16065)

Strip 'fips' from filename prefix for .zip in the upgrade unpack step, matching the naming for .tar.gz archives.

(cherry picked from commit 6ed40ea)
lorienhu added a commit that referenced this pull request Aug 10, 2026
…16065) (#16086)

Strip 'fips' from filename prefix for .zip in the upgrade unpack step, matching the naming for .tar.gz archives.

(cherry picked from commit 6ed40ea)

Co-authored-by: Lorien Hu <lorien@lorienhu.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.

[Windows][FIPS] Upgrade from 9.5.0-SNAPSHOT to 9.6.0-SNAPSHOT fails because .elastic-agent.active.commit is missing.

2 participants