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

[9.0](backport #7057) [flakiness] kubernetes_secrets provider unit tests #7158

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 4, 2025

What does this PR do?

This PR introduces the following fixes and improvements:

  • Loosens Time Constraints in Unit Tests (needed for certain type of CI runners):

    • The TTLDelete value in test configurations was increased from 2s to 10s, ensuring tests have more leeway in processing cache expiration.
    • The waitForSignal value was adjusted from 1s to 2s to reduce test flakiness.
  • Adds Debug Logging for Fetch When Cache is Disabled: relevant comment

    • When the cache is disabled, fetching secrets from the API now logs the retrieved secret’s resource version for better visibility into API interactions.
  • Fixes a Typo in a Unit Test Name: relevant comment

    • The test case "key in secret not found" was incorrectly named and is now corrected to "key in secret found".

Why is it important?

Fixes a test failure (Test_Run/secret_no-update_and_no-signal) that caused CI flakiness

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 changes 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

No expected impact on users. These changes are limited to debugging logs and test improvements.

How to test this PR locally

mage test:unit

Related issues


This is an automatic backport of pull request #7057 done by [Mergify](https://mergify.com).

* fix: loosen up redundant time constraints in unit-test

* fix: correct unit-test name

* fix: add debug logs for Fetch when cache is disabled

(cherry picked from commit 02fae02)
@mergify mergify bot requested a review from a team as a code owner March 4, 2025 09:07
@mergify mergify bot added the backport label Mar 4, 2025
@mergify mergify bot requested review from michel-laterman and swiatekm and removed request for a team March 4, 2025 09:07
@github-actions github-actions bot added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team flaky-test Unstable or unreliable test cases. skip-changelog labels Mar 4, 2025
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 4, 2025

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @pkoutsovasilis

@pkoutsovasilis pkoutsovasilis merged commit bc5f6e1 into 9.0 Mar 4, 2025
16 checks passed
@pkoutsovasilis pkoutsovasilis deleted the mergify/bp/9.0/pr-7057 branch March 4, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport flaky-test Unstable or unreliable test cases. 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.

3 participants