Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Added method to release catalog reservation by artifact tag
Browse files Browse the repository at this point in the history
Added method to delete catalog artifact by ID

Signed-off-by: Nick Müller <nmueller@blackshark.ai>
  • Loading branch information
Nick Müller committed Jan 4, 2023
1 parent 4593b01 commit bda210e
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
6 changes: 6 additions & 0 deletions go/tasks/pluginmachinery/catalog/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,17 @@ type Client interface {
Update(ctx context.Context, key Key, reader io.OutputReader, metadata Metadata) (Status, error)
// ReleaseReservation releases an acquired reservation for the given key and owner ID.
ReleaseReservation(ctx context.Context, key Key, ownerID string) error
// ReleaseReservationByArtifactTag releases an acquired reservation for the given dataset ID, artifact tag and
// owner ID.
ReleaseReservationByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string, ownerID string) error
// Delete removes the artifact associated with the given key and deletes its underlying data from blob storage.
Delete(ctx context.Context, key Key) error
// DeleteByArtifactTag removes the artifact associated with the given dataset ID and artifact tag and deletes its
// underlying data from blob storage.
DeleteByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string) error
// DeleteByArtifactID removes the artifact associated with the given dataset and artifact ID and deletes its
// underlying data from blob storage.
DeleteByArtifactID(ctx context.Context, datasetID *datacatalog.DatasetID, artifactID string) error
}

func IsNotFound(err error) bool {
Expand Down
64 changes: 64 additions & 0 deletions go/tasks/pluginmachinery/catalog/mocks/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bda210e

Please sign in to comment.