@jaredpar FYI.
As noted in this Archive:
https://helixde107v0xdeko0k025g8.blob.core.windows.net/helix-job-f51b16ad-310a-4cbd-ba30-c77d80fb7f4d93c3c614d4d4ca28e/06fb262e-4139-42c6-b0eb-0d1ed972db97.zip
which was produced by Jared calling WithFiles with the same file name, this ends up producing a zip archive which has duplicate entries. There's no good way to unzip such an archive because you have no idea which of the (different) files you actually wanted, so we should error out before even producing the archive.
(For whoever takes this, the file you want is https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Helix/JobSender/Payloads/AdhocPayload.cs )
Should we be case sensitive when detecting duplicates?
Should we be case sensitive when detecting duplicates?
There is really no good answer here. File paths can be case sensitive, case insensitive or a mix of case sensitive / insensitive at various parts in the path. This is not specific to OS either but instead a mix of OS and file system implementations.
Here I would favor case insensitive. That will absolutely prevent this bug from happening again and the case for allowing it seems sketchy at best (just because it can be done is not a great reason). In the future if someone truly wants to use WithFiles where the names differ by case only then they can make a case for why this isn't a sketchy scenario and worth supporting.
+1 to case-insensitivity here... since the same code is used to make payloads from any OS to any OS, and since Windows is always insensitive, it makes the most sense to just require distinction outside of casing.
This has been rolled out for some time, closing.
Most helpful comment
There is really no good answer here. File paths can be case sensitive, case insensitive or a mix of case sensitive / insensitive at various parts in the path. This is not specific to OS either but instead a mix of OS and file system implementations.
Here I would favor case insensitive. That will absolutely prevent this bug from happening again and the case for allowing it seems sketchy at best (just because it can be done is not a great reason). In the future if someone truly wants to use
WithFileswhere the names differ by case only then they can make a case for why this isn't a sketchy scenario and worth supporting.