Skip to content

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

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

swiedenfeld wants to merge 2 commits into
docker-java:masterfrom
swiedenfeld:1409-large-subdirectory-test

Conversation

@swiedenfeld

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

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.

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

Successfully merging this pull request may close these issues.

1 participant