Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elastic Agent cannot be packaged without PACKAGES env var #6584

Open
pchila opened this issue Jan 23, 2025 · 3 comments
Open

Elastic Agent cannot be packaged without PACKAGES env var #6584

pchila opened this issue Jan 23, 2025 · 3 comments
Labels
bug Something isn't working Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@pchila
Copy link
Member

pchila commented Jan 23, 2025

Packaging agent using a command like

EXTERNAL=true SNAPSHOT=true mage package

returns an error

...
package ran for 283.017µs
Error: No packages were successfully downloaded. You may be building against an invalid or unreleased version. version=9.0.0-SNAPSHOT. If this is an unreleased version, try SNAPSHOT=true or EXTERNAL=false

It looks like the problem has been introduced by this change
https://github.com/elastic/elastic-agent/pull/6016/files#diff-520109d035a196d29d0a86e9c4e6c98e98abf056141b84df68c0d48167b87b25R1059

When no PACKAGES env var is speciified packageTypes is empty so the for loop terminates immediately.
In the rest of the packaging code and before such change an empty PACKAGES env var meant that ALL the packages should be produced.

@pchila pchila added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent Label for the Agent team labels Jan 23, 2025
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@mauri870
Copy link
Member

Aha, that's why the command I had lying around for packaging the agent suddenly stopped working. I thought something had changed in the meantime that required specifying the PACKAGES variable manually. Now I feel bad for not investigating further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

3 participants