You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/06/01 16:57:23 UTC

[GitHub] [trafficcontrol] jhg03a opened a new issue #1615: Potentially inconsistent docker testing

jhg03a opened a new issue #1615:
URL: https://github.com/apache/trafficcontrol/issues/1615


   While I was looking through the testing logs on the apache jenkins instance, I saw that Docker is very aggressively caching layers of the docker files (default behavior).  You can see when this happens by searching the log for the phrase `---> Using cache`.  This means that the line of the dockerfile didn't change and it already had run so it just layers appends filesystem changes from a previous run to your image.  For many instructions this is ok, but in any case where your doing something like installing packages without a version explicitly or running any kind of scripts you may get unexpected results.  
   
   Docker best practices are to try and move these kinds of commands to later in the Dockerfile to prevent a cascade rebuild and to dynamically generate an ID as part of any script names to intentionally break the cache.  Alternatively, you can completely disable the layer caching of docker by splitting your `docker-compose up --build up` into two separate steps with the `--no-cache` argument on the build.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] rawlinp commented on issue #1615: Potentially inconsistent docker testing

Posted by GitBox <gi...@apache.org>.
rawlinp commented on issue #1615:
URL: https://github.com/apache/trafficcontrol/issues/1615#issuecomment-853189098


   That's a trade-off individual organizations would probably like to make on their own. I could see adding it as an argument to `pkg` for instance.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] jhg03a commented on issue #1615: Potentially inconsistent docker testing

Posted by GitBox <gi...@apache.org>.
jhg03a commented on issue #1615:
URL: https://github.com/apache/trafficcontrol/issues/1615#issuecomment-852327384


   Even if it's fixed by fiat of how GHA is implemented, this would still affect users of the pkg script I think.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman edited a comment on issue #1615: Potentially inconsistent docker testing

Posted by GitBox <gi...@apache.org>.
zrhoffman edited a comment on issue #1615:
URL: https://github.com/apache/trafficcontrol/issues/1615#issuecomment-853193722


   Rather than move the yum packages to a later Dockerfile layer or use `--no-cache`, I would prefer to explicitly version the yum packages in the Dockerfiles and have a GitHub Action PR an update for the package versions on maybe a monthly basis.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] jhg03a commented on issue #1615: Potentially inconsistent docker testing

Posted by GitBox <gi...@apache.org>.
jhg03a commented on issue #1615:
URL: https://github.com/apache/trafficcontrol/issues/1615#issuecomment-853178832


   Adding the above argument to the invokations of docker-compose would fix it at the cost of increased build times.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] jhg03a commented on issue #1615: Potentially inconsistent docker testing

Posted by GitBox <gi...@apache.org>.
jhg03a commented on issue #1615:
URL: https://github.com/apache/trafficcontrol/issues/1615#issuecomment-852285910


   Unless this has been fixed it's still applicable regardless of what build system is executing it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 closed issue #1615: Potentially inconsistent docker testing

Posted by GitBox <gi...@apache.org>.
ocket8888 closed issue #1615:
URL: https://github.com/apache/trafficcontrol/issues/1615


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman commented on issue #1615: Potentially inconsistent docker testing

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #1615:
URL: https://github.com/apache/trafficcontrol/issues/1615#issuecomment-852297547


   @jhg03a GitHub Actions does not cache Docker layers. It builds the images from the base images each time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 commented on issue #1615: Potentially inconsistent docker testing

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #1615:
URL: https://github.com/apache/trafficcontrol/issues/1615#issuecomment-852227807


   We no longer use Apache Jenkins for testing - if there is a concern about caching in the ATC build system, please feel free to edit and re-open (or just make a new issue if that's easier).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] rawlinp commented on issue #1615: Potentially inconsistent docker testing

Posted by GitBox <gi...@apache.org>.
rawlinp commented on issue #1615:
URL: https://github.com/apache/trafficcontrol/issues/1615#issuecomment-853164334


   @jhg03a IMO this description is too vague for anyone to actually take any meaningful action upon. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman commented on issue #1615: Potentially inconsistent docker testing

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #1615:
URL: https://github.com/apache/trafficcontrol/issues/1615#issuecomment-853193722


   Rather than move the yum packages to a later Docker layer or use `--no-cache`, I would prefer to explicitly version the yum packages in the Dockerfiles and have a GitHub Action PR an update for the package versions on maybe a monthly basis.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org