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

Log when cache cleared and why #50

Closed
schneems opened this issue Oct 7, 2024 · 0 comments · Fixed by #60
Closed

Log when cache cleared and why #50

schneems opened this issue Oct 7, 2024 · 0 comments · Fixed by #60

Comments

@schneems
Copy link

schneems commented Oct 7, 2024

In #47 I noticed that we're not logging when the cache is cleared or why. This is important for buildpack authors so we can visibly see unexpected behavior (in development and debugging for support tickets) as well as for customers so they can better understand what's going on.

Cache invalidation is a famously hard thing, we should set up our users and future buildpack maintainer for success.

I would like:

  • Logging when metadata is invalid that states why it's invalid: In the event that a buildpack author made a change that accidentally cleared the cache or if we're somehow writing data that cannot be read by accident then we would want to know and fix it.
  • When metadata changes, state which metadata changed and the values.

One option forward is for me to get approval on https://github.com/heroku/buildpacks-ruby/blob/3f3e21ae670d75b8cc0dd11fc58c95769828ed1c/buildpacks/ruby/src/layers/shared.rs and if you like that API, I could move it to the Ruby's "commons" where it can be re-used.

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.

1 participant