-
Notifications
You must be signed in to change notification settings - Fork 122
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
[Standalone Agent] Disallow upgrade if upgrade is already in progress #3473
[Standalone Agent] Disallow upgrade if upgrade is already in progress #3473
Conversation
🌐 Coverage report
|
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
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.
❤️
@@ -156,6 +156,7 @@ type DiagnosticComponentResult struct { | |||
} | |||
|
|||
// Client communicates to Elastic Agent through the control protocol. | |||
// go:generate mockery --name Client |
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.
👍
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.
Code looks good.
There is a clash between your changes for the upgrade integration test and the modifications proposed in #3477 so I guess we have to sync a bit to make sure we don't break/lose testcases (pinging @blakerouse so he can have a look at this)
For the code coverage, I guess we have to exclude mocks/*.go
from analysis since most of the uncovered lines are actually the generated code.
Done in 98764d8. |
85507df
to
2cffce6
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
2cffce6
to
150a52d
Compare
SonarQube Quality Gate |
…#3473) * [Standalone] Disallow upgrade if upgrade is already in progress * Adding CHANGELOG entry * Add TODOs * WIP: integration test * Check for Watcher; move function to upgrade package * Check Upgrade Watcher PIDs first * Fix syntax error * Adjust test to start from older version * Fixing more errors * Fix test * Mock client * Fix typo (cherry picked from commit bc1982a) # Conflicts: # sonar-project.properties # testing/integration/upgrade_test.go
…#3473) * [Standalone] Disallow upgrade if upgrade is already in progress * Adding CHANGELOG entry * Add TODOs * WIP: integration test * Check for Watcher; move function to upgrade package * Check Upgrade Watcher PIDs first * Fix syntax error * Adjust test to start from older version * Fixing more errors * Fix test * Mock client * Fix typo (cherry picked from commit bc1982a) # Conflicts: # sonar-project.properties # testing/integration/upgrade_test.go
What does this PR do?
This PR prevents users of standalone Agents from being able to upgrade the Agent if an upgrade is already in progress.
Why is it important?
Attempting to upgrade an Agent while an upgrade is already in progress could corrupt the Agent installation.
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration files./changelog/fragments
using the changelog toolRelated issues