buf icon indicating copy to clipboard operation
buf copied to clipboard

Allow mutable tags

Open julienrbrt opened this issue 3 years ago • 4 comments

We are using buf for the cosmos/cosmos-sdk, and lately, we are encountering missing commits. This breaks our need of proto versioning and our upgrade documentation (e.g., https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#protobuf-1)

Failure: buf.build/cosmos/cosmos-sdk:106f3380b73b4157a9e0149cbd30bf9f: does not exist Failure: buf.build/cosmos/cosmos-sdk:af8d763f189a4482b59f9f283b446293: does not exist.

AFAIK, commits are immutable, and we can find it in the commit history: https://buf.build/cosmos/cosmos-sdk/commits/af8d763f189a4482b59f9f283b446293 but without content. Only the recent commits are available.

julienrbrt avatar Sep 19 '22 09:09 julienrbrt

While commits are indeed immutable on the BSR, the repository in which they exist can be deleted. It looks like cosmos-sdk has a dependency on buf.build/googleapis/googleapis, which was recently deleted and re-created (please see https://github.com/bufbuild/buf/issues/1380 for more context on that).

Unfortunately, the error message that is propagated to the cli and website aren't clear about this and make it seem like it is a problem with the cosmos module rather than one of its dependencies. We're currently working on getting more descriptive errors into the cli and the website. I'll leave this open till we improve that, but for the root cause or any other comments on how the googleapis recreation has impacted I'll ask that we centralize that discussion in https://github.com/bufbuild/buf/issues/1380.

robbertvanginkel avatar Sep 19 '22 20:09 robbertvanginkel

That's unfortunate… Say I need a buf commit linked to a tag, but because the commit content is deleted, I cannot access it. Am I able to push another commit with the same tag (I don't think so, but maybe I am missing something)?

julienrbrt avatar Sep 20 '22 14:09 julienrbrt

Tags cannot be deleted today, https://github.com/bufbuild/buf/issues/765 tracks some work related to changing that but I have nothing concrete to share there yet.

robbertvanginkel avatar Sep 20 '22 20:09 robbertvanginkel

We're going to potentially be making changes to tags to allow this in the near future. Will keep this issue open as we update you on that.

bufdev avatar Jan 14 '23 19:01 bufdev

Tags are now labels, and labels are mutable: https://buf.build/docs/concepts/commits-labels#labels Going to close this for now, feel free to re-open if there are any questions or concerns.

doriable avatar May 30 '24 18:05 doriable

This is perfect, thank you!

julienrbrt avatar May 30 '24 19:05 julienrbrt