-
Notifications
You must be signed in to change notification settings - Fork 62
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
Should pin_hash
be used to track changes in the metadata as well as pin contents?
#739
Comments
Hi @juliasilge, just adding some user feedback on this question. We use pins frequently for production purposes (which has been a game-changer for us!). Having flexibility to not include the metadata as part of the hashing strategy would be preferred. It's acceptable if the default option includes metadata as part of the hash checking, however. We add our own metadata to determine if the version of the pin content is used for testing/development purposes or production purposes. We also use the hash of the content to verify if the pin content is the same or not. For example, we may set the metadata for a version of a specific pin, which in the background is defined by R_CONFIG_ACTIVE:
R_CONFIG_ACTIVE is defined differently in our Workbench environment and production environment. This avoids having multiple pin content on Connect with similar names like "MyGLMModelSummary-prod" and "MyGLMModelSummary-test" and having to switch back and forth in Workbench on which pin to read in when running the script. Or switching between our staging server or production server for which board to register. Hope this perspective is useful! |
Thanks for this perspective @dareneiri! 🙌 |
Given that we have only heard a vote in favor of not checking the pin metadata (the current behavior) let's say we will keep the behavior as it exists today. We can re-evaluate if this turns out to be problematic in the future! |
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
In both #727 and #735 we noticed that
pin_hash
only tracks pin contents, not pin metadata. If we ever use that hash to compare, we don't pick up on changes to metadata. Some elements of the metadata that folks may want to update and would not changepin_hash
include title, description, tags, and user metadata.🎯 Should we change something about the hashing strategy to also check for changes in a subset of the metadata?
Some ideas:
metadata_hash
to the metadata to check separatelyhash(hashes)
of pin contents hash plus metadata hash, the way we do for pinning multiple files:pins-r/R/pin-read-write.R
Lines 261 to 262 in cc3c160
The text was updated successfully, but these errors were encountered: