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

buildDockerImageTask runs in every invocation of :distribution:docker:integTest #49359

Closed
jkakavas opened this issue Nov 20, 2019 · 16 comments · Fixed by #49613
Closed

buildDockerImageTask runs in every invocation of :distribution:docker:integTest #49359

jkakavas opened this issue Nov 20, 2019 · 16 comments · Fixed by #49613
Assignees
Labels
>bug :Delivery/Build Build or test infrastructure stalled Team:Delivery Meta label for Delivery team

Comments

@jkakavas
Copy link
Member

This happens even though nothing has changed in between, which I would assume make gradle reuse existing images.

Reproduces for instance, by running:

./gradlew ':distribution:docker:integTest' --tests "org.elasticsearch.docker.test.DockerYmlTestSuiteIT.test {p0=/11_nodes/Additional disk information}"

consecutively

@jkakavas jkakavas added >bug :Delivery/Build Build or test infrastructure labels Nov 20, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Build)

@pugnascotia
Copy link
Contributor

Also very irritating when iterating on Docker packaging tests and running them locally.

@mark-vieira
Copy link
Contributor

Indeed, we should make these tasks support incremental build.

@pugnascotia pugnascotia self-assigned this Nov 21, 2019
@pugnascotia pugnascotia added the help wanted adoptme label Nov 21, 2019
rjernst added a commit to rjernst/elasticsearch that referenced this issue Nov 27, 2019
This commits sets an output marker file for the docker build tasks so
that it can be tracked as up to date. It also fixes the docker build
context task to omit the build date as in input property which always
left the task as out of date.

relates elastic#49359
rjernst added a commit that referenced this issue Nov 27, 2019
This commits sets an output marker file for the docker build tasks so
that it can be tracked as up to date. It also fixes the docker build
context task to omit the build date as in input property which always
left the task as out of date.

relates #49359
rjernst added a commit that referenced this issue Nov 28, 2019
This commits sets an output marker file for the docker build tasks so
that it can be tracked as up to date. It also fixes the docker build
context task to omit the build date as in input property which always
left the task as out of date.

relates #49359
@pugnascotia
Copy link
Contributor

@jkakavas this should be fixed in master. Would you mind verifying?

@pugnascotia
Copy link
Contributor

@mark-vieira
Copy link
Contributor

This was fixed with #49613.

Here's an example build with all the build tasks UP-TO-DATE: https://gradle-enterprise.elastic.co/s/fb36ht6rfwtty

@pugnascotia
Copy link
Contributor

@mark-vieira there seems to be a regression here - https://gradle-enterprise.elastic.co/s/y447z33bdzgrg

What happened was:

  1. I make a change to the Docker-related files
  2. Ran the DockerTests, which rebuilt the image and ran the test
  3. I then immediately re-ran one of the tests, which rebuilt the image

@pugnascotia pugnascotia reopened this Jan 22, 2020
@rjernst
Copy link
Member

rjernst commented Jan 22, 2020

@rjernst
Copy link
Member

rjernst commented Jan 22, 2020

@pugnascotia Do you have the build scan from the build just before the one you linked?

@mark-vieira mark-vieira assigned rjernst and unassigned pugnascotia Jan 22, 2020
@pugnascotia
Copy link
Contributor

@mark-vieira I did two test runs back-to-back in my IDE:

First: https://gradle-enterprise.elastic.co/s/4ddr4hi2dlpa2
Second: https://gradle-enterprise.elastic.co/s/ovtybfoiywgjo

You can see in the second that it rebuilt the linux tar and docker image, when I had changed nothing.

@pugnascotia
Copy link
Contributor

Another run from the command line, instead of IntelliJ, and just building the Docker image. Again, back-to-back runs, on master this time.

  1. https://gradle-enterprise.elastic.co/s/j2elqcpc7rm6s
  2. https://gradle-enterprise.elastic.co/s/2woutebnogeay

@rjernst
Copy link
Member

rjernst commented Jan 23, 2020

@pugnascotia Can you please add -Dscan.capture-task-input-files to your command line and run the two again?

@mark-vieira mark-vieira self-assigned this Feb 27, 2020
@mark-vieira
Copy link
Contributor

@pugnascotia I am unable to reproduce this locally for the life of me. Is this continuing to happen for you? @rjernst were you able to reproduce this locally?

If this is still happening do you mind sharing the contents of x-pack/plugin/ml/build/tmp/jar/MANIFEST.MF before each build run?

@mark-vieira mark-vieira added stalled and removed help wanted adoptme labels Mar 2, 2020
@pugnascotia
Copy link
Contributor

Something's changed on master, because I just did two back-to-back builds and the second run was fine. I even ran the tests and saw that the first time it exported the Docker image as expected, and the second time it didn't.

So we're all good here as far as I can tell.

@mark-vieira
Copy link
Contributor

Thanks, Rory.

@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Delivery/Build Build or test infrastructure stalled Team:Delivery Meta label for Delivery team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants