Include python wheel packages when moving downloaded dependencies archives#5647
Include python wheel packages when moving downloaded dependencies archives#5647pchila merged 1 commit intoelastic:mainfrom
Conversation
…hives This commit modifies movePackagesToArchive() function to include python wheel packages introduced with commit 701f8b9 . This solves an issue when packaging docker images using a DROP_PATH env var: prior to this change, the python wheel archives present in DROP_PATH were not moved to `<DROP PATH>/archive/<platform>` failing to create an image for which the Dockerfile expects to install the python wheel package
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
This pull request does not have a backport label. Could you fix it @pchila? 🙏
|
|
|
|
blakerouse
left a comment
There was a problem hiding this comment.
Thanks for fixing this. Packaging process is complicated.
blakerouse
left a comment
There was a problem hiding this comment.
Actually, I have an open question. Does this mean that the .zip is being included into all docker images? I wanted it to only add that zip in the -service variant. It should not increase the size of all docker containers.
Just tested generating all docker image variants with this fix: only For example, launching AGENT_DROP_PATH=./build/agentdrop MANIFEST_URL=https://snapshots.elastic.co/9.0.0-3ca48ed8/agent-package/agent-artifacts-9.0.0-SNAPSHOT.json SNAPSHOT=true PLATFORMS="linux/amd64" PACKAGES="docker" mage -v downloadManifest packageUsingDRAresults in these packaging directories (one per docker image variant) ➜ elastic-agent git:(fix-unified-release) ✗ tree -L 1 build/package/
build/package/
├── elastic-agent
├── elastic-agent-cloud
├── elastic-agent-complete
├── elastic-agent-complete-wolfi
├── elastic-agent-service
├── elastic-agent-ubi
└── elastic-agent-wolfi
7 directories, 0 filesIf we search for connectors we find them only in the ➜ elastic-agent git:(fix-unified-release) ✗ find build/package/ -name 'connectors*'
build/package/elastic-agent-service/elastic-agent-linux-amd64.docker/docker-build/beat/data/service/connectors-9.0.0-SNAPSHOT.zip
build/package/elastic-agent-service/elastic-agent-linux-amd64.docker/docker-build/beat/data/elastic-agent-0ebada/components/connectors
build/package/elastic-agent-service/elastic-agent-linux-amd64.docker/docker-build/beat/data/elastic-agent-0ebada/components/connectors.spec.ymlas specified by the # service build is based on previous cloud variant
- &agent_docker_service_spec
docker_variant: 'service'
files:
'data/service/connectors-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}.zip':
source: '{{.AgentDropPath}}/archives/{{.GOOS}}-{{.AgentArchName}}.tar.gz/connectors-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}.zip'
mode: 0755
'data/{{.BeatName}}-{{ commit_short }}/components/connectors':
source: '{{ elastic_beats_dir }}/dev-tools/packaging/files/linux/connectors.sh'
mode: 0755
'data/{{.BeatName}}-{{ commit_short }}/components/connectors.spec.yml':
source: '{{ elastic_beats_dir }}/specs/connectors.spec.yml'
mode: 0644 |
Indeed. 😃 |
…hives (#5647) This commit modifies movePackagesToArchive() function to include python wheel packages introduced with commit 701f8b9 . This solves an issue when packaging docker images using a DROP_PATH env var: prior to this change, the python wheel archives present in DROP_PATH were not moved to `<DROP PATH>/archive/<platform>` failing to create an image for which the Dockerfile expects to install the python wheel package (cherry picked from commit 23621df) # Conflicts: # magefile.go
…hives (#5647) This commit modifies movePackagesToArchive() function to include python wheel packages introduced with commit 701f8b9 . This solves an issue when packaging docker images using a DROP_PATH env var: prior to this change, the python wheel archives present in DROP_PATH were not moved to `<DROP PATH>/archive/<platform>` failing to create an image for which the Dockerfile expects to install the python wheel package
#5634) * Add elastic-agent-service container to packaging (#5349) Adds the elastic-agent-service container with the py-connectors component enabled. (cherry picked from commit 701f8b9) # Conflicts: # dev-tools/mage/manifest/manifest.go * Update manifest.go Fix conflicts caused by mergify * Include python wheel packages when moving downloaded dependencies archives (#5647) This commit modifies movePackagesToArchive() function to include python wheel packages introduced with commit 701f8b9 . This solves an issue when packaging docker images using a DROP_PATH env var: prior to this change, the python wheel archives present in DROP_PATH were not moved to `<DROP PATH>/archive/<platform>` failing to create an image for which the Dockerfile expects to install the python wheel package * Fix docker image build when multiple platforms are specified (#5658) Force merging to unblock the unified release process --------- Co-authored-by: Blake Rouse <blake.rouse@elastic.co> Co-authored-by: Julien Lind <julien.lind@elastic.co> Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>





What does this PR do?
This commit modifies movePackagesToArchive() function to include python wheel packages introduced with commit 701f8b9 .
This solves an issue when packaging docker images using a DROP_PATH env var: prior to this change, the python wheel archives present in DROP_PATH were not moved to
<DROP PATH>/archive/<platform>failing to create an image for which the Dockerfile expects to install the python wheel packageWhy is it important?
To have a successful docker image creation during unified build processes.
Checklist
./changelog/fragmentsusing the changelog toolDisruptive User Impact
How to test this PR locally
Package the docker image "service" for elastic agent using a DROP_PATH (and optionally a manifest), for example:
Related issues
Questions to ask yourself