-
Notifications
You must be signed in to change notification settings - Fork 192
Allow overriding AGENT_PACKAGE_VERSION and MANIFEST_URL when USE_PACKAGE_VERSION=true #9864
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
Allow overriding AGENT_PACKAGE_VERSION and MANIFEST_URL when USE_PACKAGE_VERSION=true #9864
Conversation
This pull request does not have a backport label. Could you fix it @pchila? 🙏
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok although this opens up a lot of possibilities, in terms of packaging env vars, that I am not sure all of them will result in a happy path (😄) I understand that there is a need for flexibility, just keep in mind with great power comes great responsibility. So aside the lint error this LGTM, let's address it @pchila
|
💛 Build succeeded, but was flaky
Failed CI StepsHistory
cc @pchila |
* upstream: (26 commits) fix: ensure EDOT subprocess shuts down gracefully on agent termination (#9886) [main][Automation] Update versions (#9976) Add Collector reference docs and automation (#9953) [beatreceivers] Integrate beatsauthextension (#9257) [main][Automation] Update versions (#9941) Update OTel components to v0.132.0/v1.38.0 (#9954) Enhancement/5235 wrap errors when marking upgrade (#9366) Mount Go build cache into crossbuild container (#9094) Liveness agent state (#9673) [main][Automation] Bump VM Image version to 1757725254 (#9942) Enhancement/5235 correctly wrap errors from copyActionDir and copyRunDirectory (#9349) [main][Automation] Update elastic/beats to afc53c0479ac (#9874) Add -coverpkg option when running unit test to calculate coverage across packages (#9913) Cache binaries downloaded for packaging locally (#9133) [main][Automation] Update versions (#9897) Disable flaky test TestBeatsReceiverLogs (#9891) Allow overriding AGENT_PACKAGE_VERSION and MANIFEST_URL when USE_PACKAGE_VERSION=true (#9864) add ingest-docs team as CODEOWNERS for release notes and docset.yml (#9865) fix: correct spelling of 'output' in various templates and monitoring code (#9827) k8s: Add comment around hostUsers for Universal Profiling deployments (#9847) ...
…AGE_VERSION=true (elastic#9864) * Allow overriding AGENT_PACKAGE_VERSION and MANIFEST_URL when USE_PACKAGE_VERSION=true * Update dev-tools/mage/settings.go * fix lint errors
What does this PR do?
This PR allows overriding
AGENT_PACKAGE_VERSION
andMANIFEST_URL
when packaging using the information inpackage.version
file. This is achieved by loading the package.version data before looking up the relevant env vars and using the values assigned from package version as fallbacks if the env vars are not defined.Why is it important?
This allows for easy repackaging elastic-agent from a working directory, in order to have 2 "different" versions for the elastic-agent package: this is useful mostly when testing some upgrade scenarios.
Most of the time
USER_PACKAGE_VERSION=true
by itself will do a fine job for packaging so the usage of this change should be limited to some very specific testing.Checklist
[ ] 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 testDisruptive User Impact
None. This PR only adds the possibility to override some strings coming from package.version
How to test this PR locally
Related issues
Questions to ask yourself