Skip to content

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Feb 21, 2024

This fundamentally changes the way checksums work.

Historically, we would checksum everything when the pipe ran.
Later on, we added the ability to refresh the checksum at any given time, which worked fine for cases in which a file could be modified after it was first checksummed.

In #4618, @F21 requested an interesting (and IMHO valid) new feature: one checksum file per artifact, instead of a single checksums.txt.

That feature was simply not possible to implement with the old implementation of checksums.


This PR does a couple of things:

  • removes artifacts.Checksum
  • removes the artifacts refresh feature
  • adds an artifacts.Checksummer interface
  • adds an artifacts.ChecksummingArtifacts, with a new List method that will in fact eval the checksums every time it's called
  • pipe/checksum.Run now sets the checksummer impl into ctx.Artifacts
  • update docs
  • adds more tests
  • updates usage of artifacts.Checksum

I'm not sure yet if this is the best approach, but after some tries with different ideas, this is def the best one I got so far.

Happy to hear any feedback you might have 🙏


closes #4618

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 21, 2024
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Copy link

cloudflare-workers-and-pages bot commented Feb 21, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 68e0d11
Status: ✅  Deploy successful!
Preview URL: https://77d14efb.goreleaser.pages.dev
Branch Preview URL: https://checksums.goreleaser.pages.dev

View logs

@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 21, 2024
@caarlos0
Copy link
Member Author

refs #1805

@pull-request-size pull-request-size bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 24, 2024
@caarlos0
Copy link
Member Author

caarlos0 commented Mar 3, 2024

not really liking this implementation either 🤔

@caarlos0 caarlos0 mentioned this pull request Mar 17, 2024
@caarlos0 caarlos0 closed this in 54ee014 Mar 17, 2024
@caarlos0 caarlos0 deleted the checksums branch April 26, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate checksum file for each release artifact
1 participant