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

Maintain deterministic order in withCopyFileToContainer #2897

Conversation

findepi
Copy link
Contributor

@findepi findepi commented Jun 20, 2020

withCopyFileToContainer can be invoked multiple times, including with
one containerPath being prefix of another containerPath.

This change makes the end result deterministic.

Extracted from #2861

@bsideup bsideup added this to the next milestone Jun 20, 2020
@findepi
Copy link
Contributor Author

findepi commented Jun 29, 2020

is the CI failure related? please help me understand.

@rnorth
Copy link
Member

rnorth commented Jun 30, 2020

Please could you merge from master? There were issues in the build related to not-well-pinned docker image dependencies, which we've since fixed.

Still, like #2861 I think japicmp will complain about a public API change on generated accessors, because of the field type change.

Is this PR necessary if we go for #2861?

`withCopyFileToContainer` can be invoked multiple times, including with
one `containerPath` being prefix of another `containerPath`.

This change makes the end result deterministic.
@findepi findepi force-pushed the findepi/master/maintain-deterministic-order-in-withcopyfiletocontainer-af9e8b branch from 9510117 to 62bcd0b Compare June 30, 2020 20:31
@findepi
Copy link
Contributor Author

findepi commented Jun 30, 2020

Please could you merge from master? There were issues in the build related to not-well-pinned docker image dependencies, which we've since fixed.

thanks for the tip, rebased

Still, like #2861 I think japicmp will complain about a public API change on generated accessors, because of the field type change.

The field is still declared as Map<MountableFile, String>, just initialized differently.

Is this PR necessary if we go for #2861?

This PR is simple improvement that should cause minimal concerns, yet fixes the indeterminism.
If you do not have strong preferences, I would prefer to work on this first.

@rnorth rnorth merged commit 3c391bf into testcontainers:master Jul 19, 2020
@findepi findepi deleted the findepi/master/maintain-deterministic-order-in-withcopyfiletocontainer-af9e8b branch July 19, 2020 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants