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

fix: refactor waitForPod and waitForPodConditions to stabilize code timeouts during e2e tests #317

Merged
merged 6 commits into from
May 21, 2024

Conversation

jeromy-cannon
Copy link
Contributor

Description

This pull request changes the following:

  • refactored K8 waitForPod
    • handle a predicate function
    • renamed to waitForPods
    • take an array of phases
  • refactored K8 waitForPodCondition
    • renamed to waitForPodConditions
    • removed promise/delay/retry loop and instead call waitForPods with predicate to check conditions
  • added test/unit/core/k8.test.mjs for some negative tests

Related Issues

@jeromy-cannon jeromy-cannon self-assigned this May 20, 2024
Copy link
Contributor

github-actions bot commented May 20, 2024

Unit Test Results - Linux

  1 files  ±0   19 suites  +1   1m 34s ⏱️ -2s
123 tests +5  123 ✅ +5  0 💤 ±0  0 ❌ ±0 
148 runs  +5  148 ✅ +5  0 💤 ±0  0 ❌ ±0 

Results for commit 52c2450. ± Comparison against base commit 2255374.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented May 20, 2024

Unit Test Results - Windows

  1 files  ±0   19 suites  +1   2m 12s ⏱️ +21s
123 tests +5  123 ✅ +5  0 💤 ±0  0 ❌ ±0 
148 runs  +5  148 ✅ +5  0 💤 ±0  0 ❌ ±0 

Results for commit 52c2450. ± Comparison against base commit 2255374.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented May 20, 2024

E2E Mirror Node Tests Coverage Report

7 tests  ±0   7 ✅ ±0   4m 4s ⏱️ - 1m 58s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 52c2450. ± Comparison against base commit 2255374.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented May 20, 2024

E2E Node PEM Stop Add Tests Coverage Report

 1 files  ±0   1 suites  ±0   7m 10s ⏱️ - 2m 4s
17 tests ±0  17 ✅ ±0  0 💤 ±0  0 ❌ ±0 
19 runs  ±0  19 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 52c2450. ± Comparison against base commit 2255374.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented May 20, 2024

E2E Node PFX Kill Add Tests Coverage Report

 1 files  ±0   1 suites  ±0   6m 49s ⏱️ - 3m 48s
17 tests ±0  17 ✅ ±0  0 💤 ±0  0 ❌ ±0 
19 runs  ±0  19 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 52c2450. ± Comparison against base commit 2255374.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented May 20, 2024

E2E Tests Coverage Report

55 tests  ±0   55 ✅ +1   4m 42s ⏱️ -35s
 9 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌  - 1 

Results for commit 52c2450. ± Comparison against base commit 2255374.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented May 20, 2024

E2E Relay Tests Coverage Report

1 files  ±0  1 suites  ±0   2m 38s ⏱️ -22s
5 tests ±0  5 ✅ ±0  0 💤 ±0  0 ❌ ±0 
6 runs  ±0  6 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 52c2450. ± Comparison against base commit 2255374.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented May 20, 2024

E2E Node Local Build Tests Coverage Report

8 tests  ±0   8 ✅ ±0   5m 28s ⏱️ + 2m 19s
2 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 52c2450. ± Comparison against base commit 2255374.

♻️ This comment has been updated with latest results.

Signed-off-by: Jeromy Cannon <[email protected]>
Signed-off-by: Jeromy Cannon <[email protected]>
Signed-off-by: Jeromy Cannon <[email protected]>
Copy link

codacy-production bot commented May 20, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.04% (target: -1.00%) 97.50%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (2255374) 3366 2737 81.31%
Head commit (52c2450) 3357 (-9) 2731 (-6) 81.35% (+0.04%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#317) 40 39 97.50%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more

Copy link

codecov bot commented May 20, 2024

Codecov Report

Attention: Patch coverage is 97.61905% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 82.02%. Comparing base (d168719) to head (52c2450).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #317      +/-   ##
==========================================
+ Coverage   82.01%   82.02%   +0.01%     
==========================================
  Files          34       34              
  Lines        3987     3973      -14     
  Branches      632      628       -4     
==========================================
- Hits         3270     3259      -11     
+ Misses        717      714       -3     
Files Coverage Δ
src/commands/node.mjs 81.00% <100.00%> (+0.55%) ⬆️
src/commands/relay.mjs 74.56% <100.00%> (ø)
src/core/constants.mjs 94.50% <100.00%> (ø)
src/core/k8.mjs 87.81% <100.00%> (-0.42%) ⬇️
src/commands/network.mjs 51.92% <50.00%> (ø)

... and 1 file with indirect coverage changes

Impacted file tree graph

@jeromy-cannon jeromy-cannon marked this pull request as ready for review May 20, 2024 19:22
@jeromy-cannon jeromy-cannon requested review from leninmehedy and a team as code owners May 20, 2024 19:22
@jeromy-cannon jeromy-cannon merged commit ca7b21b into main May 21, 2024
33 checks passed
@jeromy-cannon jeromy-cannon deleted the 00315-waitforpod-refactor branch May 21, 2024 08:29
swirlds-automation added a commit that referenced this pull request May 31, 2024
## [0.26.0](v0.25.0...v0.26.0) (2024-05-31)

### Features

* mount application.env as a configMap ([#310](#310)) ([3158436](3158436))

### Bug Fixes

* fix freeze timestamp for node add command ([#327](#327)) ([0aedeb1](0aedeb1))
* refactor waitForPod and waitForPodConditions to stabilize code timeouts during e2e tests ([#317](#317)) ([ca7b21b](ca7b21b))
* the wrong pod name  ([#322](#322)) ([5c50579](5c50579))
* updates to accommodate haproxy changes in FST charts ([#321](#321)) ([8997849](8997849))
@swirlds-automation
Copy link
Contributor

🎉 This PR is included in version 0.26.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

refactor waitForPodCondition and waitForPod
3 participants