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

[Feature Request] Return pin version instead of name when writing #833

Open
jeffkeller-einc opened this issue Jun 10, 2024 · 1 comment
Open

Comments

@jeffkeller-einc
Copy link

I often need to know the exact version of the pin that I just wrote so that I can pass that version explicitly to downstream operations.

I can run something like pins::pin_versions(...) |> tail(1) after writing the pin, but this runs the risk of returning the wrong version if another process has written another pin version in the meantime.

I think it would be useful if pin_write, pin_upload, pin_store.*, etc. would return the version that they wrote. They print the version to stdout, but I'd rather not parse that.

> pin_write(...)
Creating new version '20240610T134931Z-12956'
Writing to pin 'my_pin'

Instead, the write functions return (invisibly) the name of the pin. I'm not sure what utility this provides, since the name was provided to the write function already. Would it be possible to add the pin version to the output? This would allow users to read or query meta data explicitly.

@juliasilge
Copy link
Member

Related to #592

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

No branches or pull requests

2 participants