Skip to content

Commit

Permalink
Do not delete resource in case of wait for readiness fail (#191)
Browse files Browse the repository at this point in the history
## Description
Do not delete resource in case wait fail, it can cause issues during
collecting of artifacts.


## Type of Change

Please delete options that are not relevant.

* Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] New and existing unit/integration tests pass locally with my
changes

Signed-off-by: David Kornel <[email protected]>
  • Loading branch information
kornys authored Oct 21, 2024
1 parent dfce8f0 commit 7ae6878
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,14 +476,6 @@ public final <T extends HasMetadata> boolean waitResourceCondition(T resource, R
T res = getKubeClient().getClient().resource(resource).get();
resourceReady[0] = condition.predicate().test(res);
return resourceReady[0];
},
() -> {
T res = getKubeClient().getClient().resource(resource).get();
if (type == null) {
client.getClient().resource(resource).delete();
} else {
type.delete(res);
}
});

return resourceReady[0];
Expand Down

0 comments on commit 7ae6878

Please sign in to comment.