exasol / integration-test-docker-environment

A docker-based environment for integration tests with the EXASOL DB.
https://exasol.github.io/integration-test-docker-environment/
MIT License
6 stars 2 forks source link

Hash value of docker images change when using volatile absolute paths #249

Closed tomuben closed 1 year ago

tomuben commented 1 year ago

RCA

The BuildContextHasher forwards the list of mapping values to the FileDirectoryListHasher which then uses the file paths as input for calculating the Hash value. If the files of the mapping are stored in volatile directories (for example temporary directories), the hash value will change for each execution of the (respective) docker build task. This is a problem when the build content needs to be copied to a temporary directory, or if the user uses absolute paths as arguments (in case of the flavor path of exaslct for example).

Solution

In order to fix this the FileDirectoryListHasher needs to get the list of mappings as input. It will then use the relative paths, stored as keys in the mappings, as input for the hasher; and use the real file system paths (values) only to read the file content, as input for the hasher.