Ensure directory is made within zip artifacts#4985
Merged
ebeahan merged 2 commits intoelastic:mainfrom May 29, 2025
Merged
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
|
ebeahan
approved these changes
May 29, 2025
mergify bot
pushed a commit
that referenced
this pull request
May 29, 2025
* Ensure directory is made within zip artifacts * Make test:release extraction stricter (cherry picked from commit 813f39f)
ebeahan
pushed a commit
that referenced
this pull request
May 29, 2025
michel-laterman
added a commit
that referenced
this pull request
Sep 3, 2025
* Ensure directory is made within zip artifacts * Make test:release extraction stricter
michel-laterman
added a commit
to michel-laterman/fleet-server
that referenced
this pull request
Sep 3, 2025
* Ensure directory is made within zip artifacts * Make test:release extraction stricter
michel-laterman
added a commit
to michel-laterman/fleet-server
that referenced
this pull request
Sep 4, 2025
* Ensure directory is made within zip artifacts * Make test:release extraction stricter
michel-laterman
added a commit
to michel-laterman/fleet-server
that referenced
this pull request
Sep 4, 2025
* Ensure directory is made within zip artifacts * Make test:release extraction stricter
michel-laterman
added a commit
that referenced
this pull request
Sep 24, 2025
michel-laterman
added a commit
that referenced
this pull request
Sep 24, 2025
* Convert Makefile to magefile.go (#4912) Reimplement Makefile targets in mage. Change buildkite pipeline to use mage. Change Dockerfile* to use mage. (cherry picked from commit db5f46b) # Conflicts: # .buildkite/pipeline.yml # .buildkite/scripts/common.sh # .buildkite/scripts/local_build.sh # .buildkite/scripts/test-release.sh # Dockerfile.build # Dockerfile.fips # Makefile # NOTICE.txt # README.md # dev-tools/cloud/Makefile # dev-tools/cloud/terraform/main.tf # dev-tools/e2e/Dockerfile # dev-tools/e2e/build.sh # dev-tools/e2e/validatecerts.go # dev-tools/go.mod # dev-tools/go.sum # docs/developers-guide.md # docs/docker-images.md # docs/fips.md # testing/e2e/fips_test.go * Ensure directory is made within zip artifacts (#4985) * Ensure directory is made within zip artifacts * Make test:release extraction stricter * Fail cloude2e step if tests can't run, fix image publication (#5000) Fail the pipeline if cloude2e tests can't run. mage docker:image now uses the DOCKER_IMAGE env var. * Add multiplatform images (#5075) Fixes issue where change from make to mage, result in the loss of creating multiple platform images. * Fix cherry-picks * change to serialdeps * Use magefile from main * Remove FIPS references, use docker plugin * Use bk plugins * cleanup go.mod in dev-tools and pkg/api * Add missing EC secret to cloud e2e step * Review feedback
ycombinator
added a commit
to ycombinator/fleet-server
that referenced
this pull request
Mar 24, 2026
…ractZip Remove MkdirAll(filepath.Dir(path)) calls for regular files and symlinks so that missing directory entries in archives surface as test failures rather than being silently papered over (ref: PR elastic#4985). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ycombinator
added a commit
to ycombinator/fleet-server
that referenced
this pull request
Mar 25, 2026
…ry entries The Linux elastic-agent snapshot tar omits explicit directory entries for some paths (e.g. components/certs/), unlike the macOS archive. Restore MkdirAll for regular files and symlinks in extractTar only; extractZip intentionally omits it per PR elastic#4985 review feedback to catch missing directory entries in zip archives we produce ourselves. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ycombinator
added a commit
to ycombinator/fleet-server
that referenced
this pull request
Mar 25, 2026
…ractZip Remove MkdirAll(filepath.Dir(path)) calls for regular files and symlinks so that missing directory entries in archives surface as test failures rather than being silently papered over (ref: PR elastic#4985). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ycombinator
added a commit
to ycombinator/fleet-server
that referenced
this pull request
Mar 25, 2026
…ry entries The Linux elastic-agent snapshot tar omits explicit directory entries for some paths (e.g. components/certs/), unlike the macOS archive. Restore MkdirAll for regular files and symlinks in extractTar only; extractZip intentionally omits it per PR elastic#4985 review feedback to catch missing directory entries in zip archives we produce ourselves. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ycombinator
added a commit
that referenced
this pull request
Mar 25, 2026
* test(e2e): add EDOT Collector OpAMP E2E test - Add TestEDOTOpAMP to verify that the EDOT Collector bundled inside the Elastic Agent package can connect to Fleet Server over OpAMP and enroll in .fleet-agents - Extract shared agent download/extract helpers (downloadElasticAgent, extractAgentArchive) into agent_download.go, refactoring the duplicated code from AgentInstallSuite - Fix TestOpAMP: pre-create the bin/ directory before running make otelcontribcol, which requires it to exist Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * e2e: add TestOpAMPWithEDOTCollector and refactor shared OpAMP setup - Extract shared download/extract helpers into agent_download.go with caching (sha512 comparison), FileReplacer, ExtractFilter, and correct chmod after extraction - Extract startFleetServerForOpAMP and writeOpAMPCollectorConfig helpers shared by both OpAMP tests - Rename TestOpAMP → TestOpAMPWithUpstreamCollector - Add TestOpAMPWithEDOTCollector: downloads elastic-agent package, runs elastic-agent otel subcommand, verifies EDOT Collector enrolls in Fleet Server over OpAMP Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(e2e): clean up OpAMP test comments and simplify writeOpAMPCollectorConfig Update inline comments, simplify writeOpAMPCollectorConfig to take a single configFilePath parameter, and add newlines after Require() statements for readability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(e2e): improve EDOT test readability Elaborate on the processExited comment and move the Cleanup block below the early-exit check so the flow reads top-to-bottom. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(e2e): fix stale comments in EDOT test Rename "immediate exit" to "early exit" for consistency and update the Cleanup comment now that it is registered after the early-exit check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(e2e): extract standalone extractTar/extractZip into agent_download.go Move archive extraction out of AgentInstallSuite into standalone functions so both AgentInstallSuite and StandAloneSuite can reuse them. AgentInstallSuite now overwrites the fleet-server binary after extraction instead of during. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(e2e): remove implicit parent directory creation in extractTar/extractZip Remove MkdirAll(filepath.Dir(path)) calls for regular files and symlinks so that missing directory entries in archives surface as test failures rather than being silently papered over (ref: PR #4985). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(e2e): replace static instance UIDs with generated UUIDv7s Use uuid.Must(uuid.NewV7()) instead of hardcoded UUIDs for OpAMP test instance UIDs, as suggested in review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
mergify bot
pushed a commit
that referenced
this pull request
Mar 25, 2026
* test(e2e): add EDOT Collector OpAMP E2E test - Add TestEDOTOpAMP to verify that the EDOT Collector bundled inside the Elastic Agent package can connect to Fleet Server over OpAMP and enroll in .fleet-agents - Extract shared agent download/extract helpers (downloadElasticAgent, extractAgentArchive) into agent_download.go, refactoring the duplicated code from AgentInstallSuite - Fix TestOpAMP: pre-create the bin/ directory before running make otelcontribcol, which requires it to exist Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * e2e: add TestOpAMPWithEDOTCollector and refactor shared OpAMP setup - Extract shared download/extract helpers into agent_download.go with caching (sha512 comparison), FileReplacer, ExtractFilter, and correct chmod after extraction - Extract startFleetServerForOpAMP and writeOpAMPCollectorConfig helpers shared by both OpAMP tests - Rename TestOpAMP → TestOpAMPWithUpstreamCollector - Add TestOpAMPWithEDOTCollector: downloads elastic-agent package, runs elastic-agent otel subcommand, verifies EDOT Collector enrolls in Fleet Server over OpAMP Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(e2e): clean up OpAMP test comments and simplify writeOpAMPCollectorConfig Update inline comments, simplify writeOpAMPCollectorConfig to take a single configFilePath parameter, and add newlines after Require() statements for readability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(e2e): improve EDOT test readability Elaborate on the processExited comment and move the Cleanup block below the early-exit check so the flow reads top-to-bottom. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(e2e): fix stale comments in EDOT test Rename "immediate exit" to "early exit" for consistency and update the Cleanup comment now that it is registered after the early-exit check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(e2e): extract standalone extractTar/extractZip into agent_download.go Move archive extraction out of AgentInstallSuite into standalone functions so both AgentInstallSuite and StandAloneSuite can reuse them. AgentInstallSuite now overwrites the fleet-server binary after extraction instead of during. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(e2e): remove implicit parent directory creation in extractTar/extractZip Remove MkdirAll(filepath.Dir(path)) calls for regular files and symlinks so that missing directory entries in archives surface as test failures rather than being silently papered over (ref: PR #4985). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(e2e): replace static instance UIDs with generated UUIDv7s Use uuid.Must(uuid.NewV7()) instead of hardcoded UUIDs for OpAMP test instance UIDs, as suggested in review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 5ece964) # Conflicts: # testing/e2e/stand_alone_test.go
mergify bot
pushed a commit
that referenced
this pull request
Mar 25, 2026
* test(e2e): add EDOT Collector OpAMP E2E test - Add TestEDOTOpAMP to verify that the EDOT Collector bundled inside the Elastic Agent package can connect to Fleet Server over OpAMP and enroll in .fleet-agents - Extract shared agent download/extract helpers (downloadElasticAgent, extractAgentArchive) into agent_download.go, refactoring the duplicated code from AgentInstallSuite - Fix TestOpAMP: pre-create the bin/ directory before running make otelcontribcol, which requires it to exist Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * e2e: add TestOpAMPWithEDOTCollector and refactor shared OpAMP setup - Extract shared download/extract helpers into agent_download.go with caching (sha512 comparison), FileReplacer, ExtractFilter, and correct chmod after extraction - Extract startFleetServerForOpAMP and writeOpAMPCollectorConfig helpers shared by both OpAMP tests - Rename TestOpAMP → TestOpAMPWithUpstreamCollector - Add TestOpAMPWithEDOTCollector: downloads elastic-agent package, runs elastic-agent otel subcommand, verifies EDOT Collector enrolls in Fleet Server over OpAMP Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(e2e): clean up OpAMP test comments and simplify writeOpAMPCollectorConfig Update inline comments, simplify writeOpAMPCollectorConfig to take a single configFilePath parameter, and add newlines after Require() statements for readability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(e2e): improve EDOT test readability Elaborate on the processExited comment and move the Cleanup block below the early-exit check so the flow reads top-to-bottom. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(e2e): fix stale comments in EDOT test Rename "immediate exit" to "early exit" for consistency and update the Cleanup comment now that it is registered after the early-exit check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(e2e): extract standalone extractTar/extractZip into agent_download.go Move archive extraction out of AgentInstallSuite into standalone functions so both AgentInstallSuite and StandAloneSuite can reuse them. AgentInstallSuite now overwrites the fleet-server binary after extraction instead of during. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(e2e): remove implicit parent directory creation in extractTar/extractZip Remove MkdirAll(filepath.Dir(path)) calls for regular files and symlinks so that missing directory entries in archives surface as test failures rather than being silently papered over (ref: PR #4985). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(e2e): replace static instance UIDs with generated UUIDv7s Use uuid.Must(uuid.NewV7()) instead of hardcoded UUIDs for OpAMP test instance UIDs, as suggested in review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 5ece964) # Conflicts: # testing/e2e/stand_alone_test.go
ycombinator
added a commit
that referenced
this pull request
Mar 26, 2026
…st (#6664) * [OpAMP] Add `TestOpAMPWithEDOTCollector` E2E test (#6612) * test(e2e): add EDOT Collector OpAMP E2E test - Add TestEDOTOpAMP to verify that the EDOT Collector bundled inside the Elastic Agent package can connect to Fleet Server over OpAMP and enroll in .fleet-agents - Extract shared agent download/extract helpers (downloadElasticAgent, extractAgentArchive) into agent_download.go, refactoring the duplicated code from AgentInstallSuite - Fix TestOpAMP: pre-create the bin/ directory before running make otelcontribcol, which requires it to exist Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * e2e: add TestOpAMPWithEDOTCollector and refactor shared OpAMP setup - Extract shared download/extract helpers into agent_download.go with caching (sha512 comparison), FileReplacer, ExtractFilter, and correct chmod after extraction - Extract startFleetServerForOpAMP and writeOpAMPCollectorConfig helpers shared by both OpAMP tests - Rename TestOpAMP → TestOpAMPWithUpstreamCollector - Add TestOpAMPWithEDOTCollector: downloads elastic-agent package, runs elastic-agent otel subcommand, verifies EDOT Collector enrolls in Fleet Server over OpAMP Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(e2e): clean up OpAMP test comments and simplify writeOpAMPCollectorConfig Update inline comments, simplify writeOpAMPCollectorConfig to take a single configFilePath parameter, and add newlines after Require() statements for readability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(e2e): improve EDOT test readability Elaborate on the processExited comment and move the Cleanup block below the early-exit check so the flow reads top-to-bottom. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(e2e): fix stale comments in EDOT test Rename "immediate exit" to "early exit" for consistency and update the Cleanup comment now that it is registered after the early-exit check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(e2e): extract standalone extractTar/extractZip into agent_download.go Move archive extraction out of AgentInstallSuite into standalone functions so both AgentInstallSuite and StandAloneSuite can reuse them. AgentInstallSuite now overwrites the fleet-server binary after extraction instead of during. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(e2e): remove implicit parent directory creation in extractTar/extractZip Remove MkdirAll(filepath.Dir(path)) calls for regular files and symlinks so that missing directory entries in archives surface as test failures rather than being silently papered over (ref: PR #4985). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(e2e): replace static instance UIDs with generated UUIDv7s Use uuid.Must(uuid.NewV7()) instead of hardcoded UUIDs for OpAMP test instance UIDs, as suggested in review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 5ece964) # Conflicts: # testing/e2e/stand_alone_test.go * Fixing conflicts --------- Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
ycombinator
added a commit
that referenced
this pull request
Mar 26, 2026
…st (#6663) * [OpAMP] Add `TestOpAMPWithEDOTCollector` E2E test (#6612) * test(e2e): add EDOT Collector OpAMP E2E test - Add TestEDOTOpAMP to verify that the EDOT Collector bundled inside the Elastic Agent package can connect to Fleet Server over OpAMP and enroll in .fleet-agents - Extract shared agent download/extract helpers (downloadElasticAgent, extractAgentArchive) into agent_download.go, refactoring the duplicated code from AgentInstallSuite - Fix TestOpAMP: pre-create the bin/ directory before running make otelcontribcol, which requires it to exist Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * e2e: add TestOpAMPWithEDOTCollector and refactor shared OpAMP setup - Extract shared download/extract helpers into agent_download.go with caching (sha512 comparison), FileReplacer, ExtractFilter, and correct chmod after extraction - Extract startFleetServerForOpAMP and writeOpAMPCollectorConfig helpers shared by both OpAMP tests - Rename TestOpAMP → TestOpAMPWithUpstreamCollector - Add TestOpAMPWithEDOTCollector: downloads elastic-agent package, runs elastic-agent otel subcommand, verifies EDOT Collector enrolls in Fleet Server over OpAMP Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(e2e): clean up OpAMP test comments and simplify writeOpAMPCollectorConfig Update inline comments, simplify writeOpAMPCollectorConfig to take a single configFilePath parameter, and add newlines after Require() statements for readability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(e2e): improve EDOT test readability Elaborate on the processExited comment and move the Cleanup block below the early-exit check so the flow reads top-to-bottom. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(e2e): fix stale comments in EDOT test Rename "immediate exit" to "early exit" for consistency and update the Cleanup comment now that it is registered after the early-exit check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(e2e): extract standalone extractTar/extractZip into agent_download.go Move archive extraction out of AgentInstallSuite into standalone functions so both AgentInstallSuite and StandAloneSuite can reuse them. AgentInstallSuite now overwrites the fleet-server binary after extraction instead of during. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(e2e): remove implicit parent directory creation in extractTar/extractZip Remove MkdirAll(filepath.Dir(path)) calls for regular files and symlinks so that missing directory entries in archives surface as test failures rather than being silently papered over (ref: PR #4985). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(e2e): replace static instance UIDs with generated UUIDv7s Use uuid.Must(uuid.NewV7()) instead of hardcoded UUIDs for OpAMP test instance UIDs, as suggested in review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 5ece964) # Conflicts: # testing/e2e/stand_alone_test.go * Fixing conflicts --------- Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





What is the problem this PR solves?
.zip artifacts are incorrectly created so not all tools are able to extract them.
How does this PR solve the problem?
Ensure that the distribution folder is created within the artifact
How to test this PR locally