Skip to content

[8.x](backport #7602) Make components in packages configurable#7688

Closed
mergify[bot] wants to merge 1 commit into8.xfrom
mergify/bp/8.x/pr-7602
Closed

[8.x](backport #7602) Make components in packages configurable#7688
mergify[bot] wants to merge 1 commit into8.xfrom
mergify/bp/8.x/pr-7602

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Apr 3, 2025

What does this PR do?

This PR allows declarative definitions of elastic-agent components in dev-tools/packaging/packages.yml.
In the declaration of such components it's now possible to specify a packageName template that will be rendered using platform and version during packaging.

Why is it important?

This is a prerequisite for selecting different component packages for specific packaging specs.

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

Disruptive User Impact

No disruptive user impact as neither the mage build targets nor the final packages changed

How to test this PR locally

Package using a manifest

MANIFEST_URL="https://snapshots.elastic.co/9.1.0-15b6399f/agent-package/agent-artifacts-9.1.0-SNAPSHOT.json" AGENT_DROP_PATH=build/elastic-agent-drop  PLATFORMS="linux/amd64 windows/amd64 darwin/amd64" mage clean downloadManifest package

Package without using a manifest

EXTERNAL=true PLATFORMS="linux/amd64" mage clean package

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

This is an automatic backport of pull request #7602 done by [Mergify](https://mergify.com).

* Redefine ExpectedBinaries as YAML config

* Move ExpectedBinaries closer to package spec file

* Fix error formatting in downloadDRAArtifacts

* add packageName template to ExpectedPackages

* use a relaxed dependencies version for IAR releases

* Remove FIPS hack introduced in PR #7486

* Allow for a looser match on relaxing dependencies versions

* Add debug logging when packaging with EXTERNAL=true

* move package tests to dedicated package

(cherry picked from commit 894ef93)

# Conflicts:
#	dev-tools/mage/checksums.go
#	dev-tools/mage/manifest/manifest.go
@mergify mergify bot requested a review from a team as a code owner April 3, 2025 13:12
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Apr 3, 2025
@mergify mergify bot requested review from blakerouse and pkoutsovasilis and removed request for a team April 3, 2025 13:12
@mergify mergify bot assigned pchila Apr 3, 2025
@mergify
Copy link
Contributor Author

mergify bot commented Apr 3, 2025

Cherry-pick of 894ef93 has failed:

On branch mergify/bp/8.x/pr-7602
Your branch is up to date with 'origin/8.x'.

You are currently cherry-picking commit 894ef9385.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   dev-tools/mage/manifest/manifest_test.go
	modified:   dev-tools/mage/pkg.go
	modified:   dev-tools/packaging/packages.yml
	new file:   dev-tools/packaging/settings.go
	renamed:    dev-tools/packaging/package_test.go -> dev-tools/packaging/testing/package_test.go
	modified:   magefile.go
	modified:   pkg/version/version_parser.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   dev-tools/mage/checksums.go
	both modified:   dev-tools/mage/manifest/manifest.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions bot added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent Label for the Agent team skip-changelog labels Apr 3, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@elasticmachine
Copy link
Contributor

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

@pchila
Copy link
Member

pchila commented Apr 3, 2025

Closing this as for backport on 8.x we need also the changes introduced with #7690

Will backport both commit at once in #7690 backport

@pchila pchila closed this Apr 3, 2025
@mergify mergify bot deleted the mergify/bp/8.x/pr-7602 branch April 3, 2025 14:44
@pchila pchila requested review from pchila and removed request for blakerouse and pkoutsovasilis April 9, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport conflicts There is a conflict in the backported pull request skip-changelog Team:Elastic-Agent Label for the Agent team 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.

2 participants