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

Resource images with timestamps in the name cause invalid file path errors #353

Closed
AttilaTheFun opened this issue Apr 24, 2023 · 12 comments · Fixed by #357
Closed

Resource images with timestamps in the name cause invalid file path errors #353

AttilaTheFun opened this issue Apr 24, 2023 · 12 comments · Fixed by #357

Comments

@AttilaTheFun
Copy link
Contributor

I was just trying to update my govips dependency and when pulling in the current master commit with go get I received all of these invalid file path errors:

resources/png-24bit+alpha.ModulateHSV_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.ModulateHSV_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.Modulate_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.Modulate_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.Modulate_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.Modulate_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.Sharpen_24bit_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.Sharpen_24bit_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.Sharpen_24bit_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.Sharpen_24bit_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.TestImageRef_Linear_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.TestImageRef_Linear_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.TestImageRef_Linear_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.TestImageRef_Linear_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.AutoRotate_0-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.AutoRotate_0-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.AutoRotate_0-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.AutoRotate_0-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointWhite-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointWhite-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointWhite-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointWhite-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointWhiteR-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointWhiteR-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointWhiteR-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointWhiteR-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointYellow-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointYellow-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointYellow-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointYellow-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.Rank-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.Rank-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.Rank-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.Rank-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.TestImageRef_Linear1-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.TestImageRef_Linear1-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.TestImageRef_Linear1-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.TestImageRef_Linear1-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.TestThumbnail_PNG_CropCentered-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.TestThumbnail_PNG_CropCentered-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.TestThumbnail_PNG_CropCentered-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.TestThumbnail_PNG_CropCentered-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.EmbedBackgroundRGBA_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.EmbedBackgroundRGBA_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.EmbedBackgroundRGBA_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.EmbedBackgroundRGBA_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.EmbedBackground_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.EmbedBackground_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.EmbedBackground_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.EmbedBackground_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Embed_ExtendWhite_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Embed_ExtendWhite_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Embed_ExtendWhite_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Embed_ExtendWhite_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Resize_Downscale_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Resize_Downscale_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Resize_Downscale_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Resize_Downscale_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Resize_Upscale_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Resize_Upscale_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Resize_Upscale_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Resize_Upscale_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Sharpen_8bit_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Sharpen_8bit_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Sharpen_8bit_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Sharpen_8bit_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit.Decode_PNG-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit.Decode_PNG-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit.Decode_PNG-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit.Decode_PNG-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-alpha-64bit.PNG_64bit_OptimizeICCProfile-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-alpha-64bit.PNG_64bit_OptimizeICCProfile-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-alpha-64bit.PNG_64bit_OptimizeICCProfile-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-alpha-64bit.PNG_64bit_OptimizeICCProfile-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/tif-16bit.TIF_16_Bit_To_AVIF_12_Bit-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.avif: malformed file path "resources/tif-16bit.TIF_16_Bit_To_AVIF_12_Bit-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.avif": invalid char ':'
resources/tif-16bit.TIF_16_Bit_To_AVIF_12_Bit-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.avif: malformed file path "resources/tif-16bit.TIF_16_Bit_To_AVIF_12_Bit-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.avif": invalid char ':'
resources/tif.Tiff-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.tiff: malformed file path "resources/tif.Tiff-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.tiff": invalid char ':'
resources/tif.Tiff-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.tiff: malformed file path "resources/tif.Tiff-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.tiff": invalid char ':'
resources/with_alpha.ExtractBand-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/with_alpha.ExtractBand-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.ExtractBand-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/with_alpha.ExtractBand-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.Flatten-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/with_alpha.Flatten-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.Flatten-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/with_alpha.Flatten-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.GetPoint_WithAlpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/with_alpha.GetPoint_WithAlpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.GetPoint_WithAlpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/with_alpha.GetPoint_WithAlpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.GetPoint_WithAlpha2-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/with_alpha.GetPoint_WithAlpha2-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.GetPoint_WithAlpha2-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/with_alpha.GetPoint_WithAlpha2-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'

I think someone changed the golden image name format to include a timestamp when it was generated but it's using a formatting with colons.
golang/go#28001

Can we use a formatting that works with go get?

@AttilaTheFun
Copy link
Contributor Author

AttilaTheFun commented Apr 24, 2023

@tonimelisma I think this was broken by your commit here:
820907b
The libvips version contains the date it was built.
We should sanitize this, replacing colons with hyphens or something like that.

@AttilaTheFun
Copy link
Contributor Author

@tonimelisma @davidbyttow I created a PR to sanitize them here:
#354

@AttilaTheFun
Copy link
Contributor Author

Hmm @davidbyttow I thought CI would regenerate the golden images. @tonimelisma what command did you run to regenerate them? The images in the repo still have colons in their names.

@tonimelisma
Copy link
Collaborator

The CI does not change the repository contents. go test runs the test suite and if the reference images are missing, generates them. You would need to create a PR after running go test with the new reference images (and deleting the old ones)

@sonu27
Copy link

sonu27 commented May 4, 2023

Will this be fixed soon? I prevents pulling down the latest version

@AttilaTheFun
Copy link
Contributor Author

@tonimelisma @davidbyttow I'm trying to regenerate the images but I can't build / test govips currently because it's trying to link the wrong libvips version 😢
#355
Have you seen this issue before / do you know how to resolve it?

@tonimelisma
Copy link
Collaborator

Hey @AttilaTheFun I haven't seen it. I don't think that's a govips issue, it's probably something with other tooling.

@AttilaTheFun
Copy link
Contributor Author

Hmm @tonimelisma do you know how govips / cgo locates the installed vips version? I have no idea how / why it's looking for this version that doesn't exist.

@AttilaTheFun
Copy link
Contributor Author

Oh! @tonimelisma I think it's an issue with the shell integrated with vscode. When I tried the same command from a regular terminal it found the correct libvips version. I'm not sure how it got messed up but I can use the regular terminal for now.

@AttilaTheFun
Copy link
Contributor Author

Hmm I'm getting some CGO crashes while running tests against libvips 8.14.2_1:
#356

@sonu27
Copy link

sonu27 commented May 5, 2023

Need a new tag. Pulling in the latest commit works now

@tonimelisma
Copy link
Collaborator

@sonu27 @AttilaTheFun apologies. I've released a new version, v2.13.0 with the latest commits.

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 a pull request may close this issue.

3 participants