← Winnitude! Search  ·  Reader Mode (1318 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 27 LINKS

Add test case for build with a large subdirectory by swiedenfeld · Pull Request #1441 · docker-java/docker-java

Repository navigation

Add test case for build with a large subdirectory - #1441


Closed
swiedenfeld wants to merge 2 commits into docker-java:master from swiedenfeld:1409-large-subdirectory-test
Closed

Add test case for build with a large subdirectory #1441 swiedenfeld wants to merge 2 commits into docker-java:master from swiedenfeld:1409-large-subdirectory-test

Conversation

swiedenfeld commented Jul 24, 2020



Copy link Copy Markdown
Contributor

This PR adds a test case for a build Dockerfile scan, when the context root contains a large directory tree.
The context root directory contains one subdirectory with 140 subdirectories and 70 files each (9,800 files in total).

The .dockerignore file ignores the subdirectory with except of one file.

The test assertions require the build scan to finish in under 3 seconds and add 3 files (Dockerfile, .dockerignore and the excepted file).

This test currently fails. The test fixture should approximate the situation described in #1409 . I restricted the test fixture to 9,800 files, because 70,000 files have a very negative impact on project build and test executions.

Please give some feedback on the given test assertions. I chose 3 seconds to finish randomly. The build scan of my local Docker CLI finishes in under 1 second. I added 2 seconds because I assume there is some overhead?

swiedenfeld added 2 commits July 24, 2020 22:23 Add test case for build with a large subdirectory 40310b0 Change test fixture and assertion 5efdcc5
#1441

swiedenfeld commented Jul 25, 2020



Copy link Copy Markdown
Contributor

Author

I found the lines in .dockerignore were wrong. The largesubdir has not been excluded, I fixed that.
On top, I added 7 exceptions to the exclusions, so we expect 9 files to be added.

Scan finishes in just something under 3 seconds repeatedly.

I am a bit disappointed, because this does not match my observation in #1409 . I am going to revisit the original case.

swiedenfeld closed this Jul 26, 2020 swiedenfeld deleted the 1409-large-subdirectory-test branch July 26, 2020 10:54 hidingmyname mentioned this pull request Oct 30, 2026 Empty directories inside a .dockerignore-excluded directory are still added to the build context #2701 Open Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

1 participant