Skip to content

Commit 3bf3899

Browse files
authoredMar 2, 2025··
fix: log but don't return cleanup errors (#1620)
## Description _Please add a description of the changes that this PR introduces and the files that are the most critical to review._ If this PR is non-trivial/large/complex, please ensure that you have either created an issue that the team's had a chance to respond to, or had some discussion with the team prior to submitting substantial pull requests. The team can be reached via GitHub Discussions or the Cosmos Network Discord server in the #cometbft channel. GitHub Discussions is preferred over Discord as it allows us to keep track of conversations topically. https://github.com/cometbft/cometbft/discussions If the work in this PR is not aligned with the team's current priorities, please be advised that it may take some time before it is merged - especially if it has not yet been discussed with the team. See the project board for the team's current priorities: https://github.com/orgs/cometbft/projects/1 --> --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
1 parent d4660b3 commit 3bf3899

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎test/e2e/runner/cleanup.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,20 @@ func cleanupDir(dir string) error {
7272
if err != nil {
7373
return err
7474
}
75+
76+
// attempt to remove things as root inside the docker container. Depending on how
77+
// this is setup, it could fail (for example often in CI it will fail or be deleted
78+
// elsewhere). When it does fail, users will need to delete this data in a
79+
// different way or change their setup so this works.
7580
err = docker.Exec(context.Background(), "run", "--rm", "--entrypoint", "", "-v", fmt.Sprintf("%v:/network", absDir),
7681
"cometbft/e2e-node", "sh", "-c", "rm -rf /network/*/")
7782
if err != nil {
78-
return err
83+
logger.Error("could not remove data from inside the docker container", "err", err.Error())
7984
}
8085

8186
err = os.RemoveAll(dir)
8287
if err != nil {
83-
return err
88+
logger.Error("could not remove data", "err", err.Error())
8489
}
8590

8691
return nil

0 commit comments

Comments
 (0)
Please sign in to comment.