ansible-community/ansible-bender

Failed ansible tasks are written to cache

kpcyrd opened this issue · 8 comments

I ran a role that failed (user couldn't be created because a variable wasn't set), but when re-running ansible-bender build, the step after that failed because the user didn't exist.

It seems the layer of the failed task is still written to cache and ansible-bender picks up at the first missing layer and continues the build. I assume re-running the build command often enough is eventually going to result in ansible-bender build exiting successfully.

Well, caching is really just optimization, so the easiest thing to do is to just disable it and build fresh all the time.

It seems the layer of the failed task is still written to cache

This is really interesting, need to look into it and ideally reproduce locally.

Thanks for taking time to open this.

Sadly I can't reproduce, I tried three forms of invoking roles and when the role failed, nothing was written to the cache, see a PR referencing this.

mtvjr commented

Is there any update on this issue? I'm experiencing the same bug.

I'd appreciate a minimal reproducer since I wasn't able to reproduce myself.

oh, actually there is a PR already which should fix this - it just needs to be finished

mtvjr commented

I'll see what I can do. Do you have an ETA on when the PR might be pulled in?

@mtvjr hard to say, I no longer have time to be involved in this project in a timely manner, hence my sporadic replies for the past few months

If I have time, I'd love to finish it which can easily take me weeks. If someone from the community, or the author of the PR, would be interested in finishing the work, that would be a huge help.

mtvjr commented

I understand the difficulties of devoting time to a project.

Unfortunately, despite my best efforts, I can't come up with a repeatable minimum example.