-
Notifications
You must be signed in to change notification settings - Fork 148
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
Implement basic version negotiation with Fleet Server #3383
Conversation
This pull request does not have a backport label. Could you fix it @pchila? 🙏
NOTE: |
🌐 Coverage report
|
2a5a605
to
2f06a5c
Compare
5655e06
to
fb2d157
Compare
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
SonarQube Quality Gate |
@pchila Ideally we could backport this to the next 8.10.x patch. Any concerns with that? |
@joshdover It shouldn't be too much of a risk since we only add a header, a couple of logs and an additional state to the fleet status in case of warning: nothing that should impact the core functionality of elastic-agent. |
See my comment here: #3362 (comment) I actually think we might want to revert this as this scenario is not supported (users deploying their own Fleet Server against Serverless projects) |
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.
LGTM.
* Initial implementation of elastic api version in roundtrip and fleet client * signal Fleet warning on elastic-agent status (cherry picked from commit fe0d427)
* Initial implementation of elastic api version in roundtrip and fleet client * signal Fleet warning on elastic-agent status (cherry picked from commit fe0d427)
* Initial implementation of elastic api version in roundtrip and fleet client * signal Fleet warning on elastic-agent status (cherry picked from commit fe0d427) Co-authored-by: Paolo Chilà <[email protected]>
What does this PR do?
We add an
Elastic-Api-Version
header to all requests to Fleet.We already have support for detecting and logging warnings and downgrade requests (those are not yet implemented though)
The
Warning
header coming from Fleet is logged at fleet client level and propagated to coordinator via the specific error typeWarningError
. When the coordinator receives aWarningError
will set fleet status toDegraded
(as opposed toFailed
that was used for any error up to this point) and set fleet status message to the warning it received.Why is it important?
We aim for Elastic Agent to support connecting to multiple versions of Fleet server supporting multiple api versions.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added an entry in./changelog/fragments
using the changelog tool[ ] I have added an integration test or an E2E testAuthor's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
Questions to ask yourself