Skip to content

registries repository delete-tag returns success for images that don't exist #1790

@juyoungkim-lisa

Description

@juyoungkim-lisa

Describe the Issue:

Hi there, I'm seeing that doctl registries repository delete-tag always returns Successfully deleted 1 tag(s), so long as the requested registry exists.

I have made the following requests, all with the same output:

Request delete on repository that doesn't exist:

> doctl registries repository delete-tag my-registry not-a-repository my-tag
Successfully deleted 1 tag(s)

Request delete on tag that doesn't exist:

> doctl registries repository delete-tag my-registry my-repository not-a-tag
Successfully deleted 1 tag(s)

The CLI does error when I request delete on a registry that doesn't exist:

> doctl registries repository delete-tag not-a-registry my-repository my-tag
{"errors":[{"detail":"DELETE https://api.digitalocean.com/v2/registries/not-a-registry/repositories/my-repository/tags/my-tag: 404 (request \"requestId\") registry does not exist"}]}

Could the CLI be modified to more closely resemble the API definition? For example, it would be great if when delete is requested on a tag that doesn't exist, the CLI returned 404.

As an aside, I notice there are doctl registry and doctl registries commands. Is there one that I should prefer over the other? For example, for delete-tag, I see these two versions:

Of note, the doctl registry versions of the same commands simply return nothing in all of the following cases:

  • requesting delete on a tag that doesn't exist
  • requesting delete on a repository that doesn't exist
  • requesting delete on a tag that does exist
    • In this case, the tag is correctly deleted. But I don't get any feedback in the CLI that deletion was successful.

Environment:

  • doctl version: 1.147.0-release
  • OS: macOS Sequoia
  • Installation method: installed with brew

Additional Details:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions