-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(artifact): add tag create / list endpoints (#286)
Because - We want to list the versions of a model. - Registry has a [tags](https://distribution.github.io/distribution/#listing-image-tags) endpoint but it doesn't expose any timestamp. ![CleanShot 2024-03-19 at 20 24 14](https://github.com/instill-ai/protobufs/assets/3977183/38f408d1-0096-4f39-b3fe-92991104fa66) This commit - Adds and documents a private API for the repository tags in artifact. - Only `api-gateway` (when it detects the end of the image push operation) should communicate the creation of a tag. - The tags won't be exposed directly to the client. `model-backend` will request this information to expose the model versions in the same family as the rest of the model endpoints. ## 🗒️ Notes As an initial addition to the Artifact domain, I made some naming choices. Please review and provide feedback about them. ## ⏭️ Next steps - `artifact-backend` will implement a first version of this endpoint that will fetch the tag list from the `registry` instance. This endpoint only returns the tag list so the digest and update time will be empty. - In order to record the update time, `api-gateway` will call the creation endpoint when we intercept a `PUT manifest` request. We'll store the digest and update time in the `artifact` database and we'll aggregate that info to the `registry` tag list (the registry should remain the source of truth). --------- Co-authored-by: droplet-bot <[email protected]>
- Loading branch information
1 parent
c369167
commit 6678571
Showing
6 changed files
with
188 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
syntax = "proto3"; | ||
|
||
package artifact.artifact.v1alpha; | ||
|
||
import "google/api/visibility.proto"; | ||
import "artifact/artifact/v1alpha/artifact.proto"; | ||
|
||
// ArtifactPrivateService exposes the private endpoints that allow clients to | ||
// manage artifacts. | ||
service ArtifactPrivateService { | ||
// List the tags in a repository. | ||
// | ||
// Returns a portion of the versions that the specified repository holds. | ||
rpc ListRepositoryTags(ListRepositoryTagsRequest) returns (ListRepositoryTagsResponse); | ||
|
||
// Create a new repository tag. | ||
// | ||
// Adds a tag to a given repository. Note that this operation is only | ||
// intended to register the information of an *already created* tag. This | ||
// method should be called as part of the content push operation, right after | ||
// the [PUT Manifest](https://distribution.github.io/distribution/#put-manifest) has | ||
// succeeded. The distribution registry won't hold data such as the push time | ||
// or the tag digest, so `artifact-backend` will hold this information locally. | ||
rpc CreateRepositoryTag(CreateRepositoryTagRequest) returns (CreateRepositoryTagResponse); | ||
|
||
option (google.api.api_visibility).restriction = "INTERNAL"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters