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

Resolved images are cached even if <image> configuration changes between executions #495

Closed
twz123 opened this issue Jun 24, 2016 · 9 comments

Comments

@twz123
Copy link
Contributor

twz123 commented Jun 24, 2016

When executing more than one goal with different values for the <image> configuration, the first <image> configuration is used to resolve images. The result is stored inside the plugin context. The next execution may potentially have a different configuration for <image>, but won't re-resolve images, but reuse the resolved images that have been stored in the plugin context. Hence it will operate on the wrong set of resolved images.

@rhuss
Copy link
Collaborator

rhuss commented Jun 24, 2016

I'm just about to remove the caching for the next release. It wasn't such a good idea (also because of classloader issues I had lately).

That will be in the next release, which will probably released today.

@twz123
Copy link
Contributor Author

twz123 commented Jun 24, 2016

👏 👌

@rhuss
Copy link
Collaborator

rhuss commented Jun 28, 2016

Fixed in 0.15.8

@rhuss rhuss closed this as completed Jun 28, 2016
@zbelzer
Copy link

zbelzer commented Jul 12, 2016

Thanks for fixing this!

@zbelzer
Copy link

zbelzer commented Jul 12, 2016

Actually, it only passed because I had commented out the build in my second module. 😢

I have a parent project with two modules, let's call them A and B.
A builds image a
B builds image b, but b runs some integration tests with a container from image a

However, when B is telling me it's building an image, it's telling me it's building a but shoves b's content in there.

This sounds like the bug you fixed, but seems to be happening with 0.15.9. Is there something I'm missing?

@jgangemi
Copy link
Collaborator

can you post your poms?

@zbelzer
Copy link

zbelzer commented Jul 13, 2016

I don't know if I'm legally able to do that as it's for my company. Is there anything in particular that I should look for in the configuration arrangement of my docker plugin sections?

@zbelzer
Copy link

zbelzer commented Jul 13, 2016

For demonstration, this is the build portion of the first module and the build portion of the second module. It's pretty clear from the target paths and image names that the wires are crossed.

[INFO] Copying files to /home/zbelzer/clearstory/catalog-service/catalog-service-db/target/docker/dkr.ecr.us-west-2.amazonaws.com/catalog-service-db/38.0.2-SNAPSHOT/build/maven
[INFO] Building tar: /home/zbelzer/clearstory/catalog-service/catalog-service-db/target/docker/dkr.ecr.us-west-2.amazonaws.com/catalog-service-db/38.0.2-SNAPSHOT/tmp/docker-build.tar
[INFO] DOCKER> docker-build.tar: Created [dkr.ecr.us-west-2.amazonaws.com/catalog-service-db:38.0.2-SNAPSHOT] "catalog-service-db" in 202 milliseconds
[INFO] DOCKER> [dkr.ecr.us-west-2.amazonaws.com/catalog-service-db:38.0.2-SNAPSHOT] "catalog-service-db": Built image sha256:12f59

... bunch of other stuff ...

[INFO] Copying files to /home/zbelzer/clearstory/catalog-service/catalog-service/target/docker/dkr.ecr.us-west-2.amazonaws.com/catalog-service-db/38.0.2-SNAPSHOT/build/maven
[INFO] Building tar: /home/zbelzer/clearstory/catalog-service/catalog-service/target/docker/dkr.ecr.us-west-2.amazonaws.com/catalog-service-db/38.0.2-SNAPSHOT/tmp/docker-build.tar
[INFO] DOCKER> docker-build.tar: Created [dkr.ecr.us-west-2.amazonaws.com/catalog-service-db:38.0.2-SNAPSHOT] "catalog-service-db" in 132 milliseconds
[INFO] DOCKER> [dkr.ecr.us-west-2.amazonaws.com/catalog-service-db:38.0.2-SNAPSHOT] "catalog-service-db": Built image sha256:84887
[INFO] DOCKER> [dkr.ecr.us-west-2.amazonaws.com/catalog-service-db:38.0.2-SNAPSHOT] "catalog-service-db": Removed image 

@jgangemi
Copy link
Collaborator

yeah - there is something off but w/o being able to see the relevant potions of the poms...

i think you'd be ok if you just substituted any company specific information w/ something generic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants