Skip to content

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Apr 6, 2024

What does this PR do?

The upgrade CLI command creates a client, connects to the Elastic Agent server and triggers the upgrade process which is supposed to shut down the agent and start the upgrade. Sometimes, this happens before the client gets a successful response and the upgrade command returns an error code although the upgrade succeeded.

This change checks if the connection was interrupted and treats it as a successful result instead of error.

Why is it important?

This race condition occasionally fails our integration tests.

Checklist

  • 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

Related issues

…4519)

The upgrade CLI command creates a client, connects to the Elastic Agent
server and triggers the upgrade process which is supposed to shut down
the agent and start the upgrade. Sometimes, this happens before
the client gets a successful response and the upgrade command returns
an error code although the upgrade succeeded.

This change checks if the connection was interrupted and treats it as
a successful result instead of error.

(cherry picked from commit 4ad7824)
@mergify mergify bot requested a review from a team as a code owner April 6, 2024 15:31
@mergify mergify bot added the backport label Apr 6, 2024
@mergify mergify bot requested review from blakerouse and michalpristas and removed request for a team April 6, 2024 15:31
@mergify mergify bot assigned rdner Apr 6, 2024
@rdner rdner enabled auto-merge (squash) April 6, 2024 15:33
@rdner rdner requested review from rdner and removed request for blakerouse and michalpristas April 6, 2024 15:34
Copy link

Quality Gate passed Quality Gate passed

The SonarQube Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
75.0% 75.0% Coverage on New Code
0.0% 0.0% Duplication on New Code

See analysis details on SonarQube

@rdner rdner merged commit c15551b into 8.13 Apr 6, 2024
@rdner rdner deleted the mergify/bp/8.13/pr-4519 branch April 6, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant