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

flaky TestStandaloneUpgradeUninstallKillWatcher #4146

Merged

Conversation

leehinman
Copy link
Contributor

@leehinman leehinman commented Jan 25, 2024

What does this PR do?

In TestStandaloneUpgradeUninstallKillWatcher, we need to wait for watcher process to start before starting the uninstall. If watcher hasn't started before the uninstall begins, the uninstall won't find it's pid, so won't kill it, but the watcher can start before the directory gets deleted.

Why is it important?

Fixes flaky test.

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

Author's Checklist

  • [ ]

How to test this PR locally

mage integration:single TestStandaloneUpgradeUninstallKillWatcher

Related issues

Use cases

Screenshots

Logs

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

on windows the watcher needs to start before uninstall due
to potential race condition.
@leehinman leehinman requested a review from a team as a code owner January 25, 2024 18:37
Copy link
Contributor

mergify bot commented Jan 25, 2024

This pull request does not have a backport label. Could you fix it @leehinman? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@cmacknz cmacknz added the Team:Elastic-Agent Label for the Agent team label Jan 25, 2024
@elasticmachine
Copy link
Contributor

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

@cmacknz cmacknz added backport-v8.12.0 Automated backport with mergify and removed backport-skip labels Jan 25, 2024
Copy link

Quality Gate passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No Coverage information No data about Coverage
0.0% 0.0% Duplication on New Code

See analysis details on SonarQube

@cmacknz
Copy link
Member

cmacknz commented Jan 25, 2024

We got #4143 and a new one in #4148 that I haven't observed before.

The only code change here is isolated to a specific test so these are unrelated. @leehinman want me to force merge this?

@leehinman
Copy link
Contributor Author

The only code change here is isolated to a specific test so these are unrelated. @leehinman want me to force merge this?

yeah, lets try to get at least one flaky test closed :-)

@cmacknz cmacknz merged commit 5f578c5 into elastic:main Jan 25, 2024
8 of 9 checks passed
mergify bot pushed a commit that referenced this pull request Jan 25, 2024
* flaky TestStandaloneUpgradeUninstallKillWatcher

on windows the watcher needs to start before uninstall due
to potential race condition.

* switch to all OSes

(cherry picked from commit 5f578c5)
leehinman added a commit that referenced this pull request Jan 25, 2024
* flaky TestStandaloneUpgradeUninstallKillWatcher

on windows the watcher needs to start before uninstall due
to potential race condition.

* switch to all OSes

(cherry picked from commit 5f578c5)

Co-authored-by: Lee E Hinman <57081003+leehinman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.12.0 Automated backport with mergify skip-changelog Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants