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

Add buf.registry.legacy.federation.v1beta1 package #65

Merged
merged 4 commits into from
Feb 5, 2024
Merged

Conversation

bufdev
Copy link
Member

@bufdev bufdev commented Feb 5, 2024

This adds the buf.registry.legacy.federation.v1beta1 package.

We need to support legacy federation for a few of our early customers, and this is the easiest way for us to do so. It effectively means supporting federation on two endpoints: GetGraph and Upload. The edits to these endpoints and their associated types will mean an API that is sufficiently different and unclean that we instead are splitting these out into their own package (and associated endpoints).

Copy link
Contributor

@saquibmian saquibmian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you also need a GraphService in the legacy package?

(buf.validate.field).string.hostname = true
];
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: superflous newline here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

message Edge {
// The Node of the start of the edge.
Node from_node = 1 [(buf.validate.field).required = true];
// The Commit of the end of the edge.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// The Commit of the end of the edge.
// The Node of the end of the edge.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

];
}
// Content to upload for a given reference.
message Content {
Copy link
Contributor

@saquibmian saquibmian Feb 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be clear, we will not support a workspace with modules with different registries, is that right? I'm not sure if there's someone out there who is combining federation with workspaces (e.g., a private repo that both publishes a module to buf.build for public consumption and also publishes a module to a private BSR, federating the latter dependency).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't upload content for other registries correct, only depend on them.

// An edge in the dependency graph.
message Edge {
// The Node of the start of the edge.
Node from_node = 1 [(buf.validate.field).required = true];
// The Commit of the end of the edge.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// The Commit of the end of the edge.
// The Node of the end of the edge.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@bufdev bufdev merged commit 1157558 into main Feb 5, 2024
6 checks passed
@bufdev bufdev deleted the legacy-federation branch February 5, 2024 21:18
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 this pull request may close these issues.

2 participants