Skip to content

fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault #8374

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

Merged

Conversation

pkoutsovasilis
Copy link
Contributor

@pkoutsovasilis pkoutsovasilis commented Jun 6, 2025

What does this PR do?

This PR addresses increases the test context timeout from 5s to 20s of Test_checkForUnprivilegedVault to accommodate for slower machines, such as Mac CI runners, and to avoid intermittent failures due to timing out while trying to acquire a file lock.

Why is it important?

The test Test_checkForUnprivilegedVault/file_vault_exists_but_it's_unreadable_-_return_error was observed to fail intermittently on slower environments (e.g., Mac runners) due to context deadline exceeded errors when attempting to acquire a file lock. These failures were not related to the actual logic being tested, but rather to insufficient timeout settings. Increasing the timeout ensures test stability across environments. In addition, updating the deprecated logp.NewInMemory call eliminates static analysis warnings.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • 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

Disruptive User Impact

None. This change only affects a unit test and does not impact production behavior or configurations.

How to test this PR locally

mage unitTest

Related issues

@pkoutsovasilis pkoutsovasilis self-assigned this Jun 6, 2025
@pkoutsovasilis pkoutsovasilis added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog backport-active-all Automated backport with mergify to all the active branches labels Jun 6, 2025
Copy link

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @pkoutsovasilis

@pkoutsovasilis pkoutsovasilis marked this pull request as ready for review June 6, 2025 06:20
@pkoutsovasilis pkoutsovasilis requested a review from a team as a code owner June 6, 2025 06:20
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@pkoutsovasilis pkoutsovasilis merged commit 738cc40 into elastic:main Jun 9, 2025
11 checks passed
@pkoutsovasilis pkoutsovasilis deleted the flaky/check_for_unprivileged_vault branch June 9, 2025 05:23
Copy link
Contributor

github-actions bot commented Jun 9, 2025

@Mergifyio backport 8.17 8.18 8.19 9.0

mergify bot pushed a commit that referenced this pull request Jun 9, 2025
…est_checkForUnprivilegedVault (#8374)

* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault

* fix: SA1019 logp.NewInMemory is deprecated

(cherry picked from commit 738cc40)
mergify bot pushed a commit that referenced this pull request Jun 9, 2025
…est_checkForUnprivilegedVault (#8374)

* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault

* fix: SA1019 logp.NewInMemory is deprecated

(cherry picked from commit 738cc40)
mergify bot pushed a commit that referenced this pull request Jun 9, 2025
…est_checkForUnprivilegedVault (#8374)

* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault

* fix: SA1019 logp.NewInMemory is deprecated

(cherry picked from commit 738cc40)
mergify bot pushed a commit that referenced this pull request Jun 9, 2025
…est_checkForUnprivilegedVault (#8374)

* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault

* fix: SA1019 logp.NewInMemory is deprecated

(cherry picked from commit 738cc40)
pkoutsovasilis added a commit that referenced this pull request Jun 9, 2025
…est_checkForUnprivilegedVault (#8374) (#8392)

* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault

* fix: SA1019 logp.NewInMemory is deprecated

(cherry picked from commit 738cc40)

Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pkoutsovasilis added a commit that referenced this pull request Jun 9, 2025
…est_checkForUnprivilegedVault (#8374) (#8393)

* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault

* fix: SA1019 logp.NewInMemory is deprecated

(cherry picked from commit 738cc40)

Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pkoutsovasilis added a commit that referenced this pull request Jun 9, 2025
…est_checkForUnprivilegedVault (#8374) (#8394)

* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault

* fix: SA1019 logp.NewInMemory is deprecated

(cherry picked from commit 738cc40)

Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
michel-laterman pushed a commit to michel-laterman/elastic-agent that referenced this pull request Jun 9, 2025
…est_checkForUnprivilegedVault (elastic#8374)

* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault

* fix: SA1019 logp.NewInMemory is deprecated
pkoutsovasilis added a commit that referenced this pull request Jun 10, 2025
…est_checkForUnprivilegedVault (#8374) (#8395)

* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault

* fix: SA1019 logp.NewInMemory is deprecated

(cherry picked from commit 738cc40)

Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
v1v added a commit that referenced this pull request Jun 12, 2025
…ts-oblt-cli

* feature/serverless-its-oblt-cli: (51 commits)
  as agreed let's move the group to the kb.integration pipeline
  Update .github/workflows/serverless-project.yml
  ci: invoke serverless integration tests package from BK
  github-actions: create a serverless project daily
  [tests] split up serverless and resource leaks integration tests (#8396)
  chore: Update to elastic/beats@dfdc12e33de0 (#8446)
  Lock upgrade marker (#8254)
  build(deps): bump github.com/elastic/elastic-agent-system-metrics from 0.11.12 to 0.11.13 (#8420)
  Add docker image name template and renamed fips cloud specs (#8429)
  buildkite(scripts): refactor common scripts (#8365)
  Use require.Eventually to try and address flakiness (#8421)
  Fix pre-command to support extended testing (#8418)
  [Automation] Bump Golang version to 1.24.4 (#8384)
  chore: Update to elastic/beats@aed2a8b768bd (#8423)
  [main][Automation] Update versions (#8425)
  Add Pipeline to deploy custom agent image for FIPS testing (#8035)
  ci: automatically update OTel components (#8288)
  [Automation] Bump VM Image version to 1749258065 (#8390)
  fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault (#8374)
  otel: add cumulativetodeltaprocessor to EDOT collector (#8372)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-active-all Automated backport with mergify to all the active branches skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Flaky Test]: Test_checkForUnprivilegedVault – err: context deadline exceeded" does not contain "permission denied"
3 participants