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

[Container Registry] Validate delete 404s #19077

Closed
seankane-msft opened this issue Jun 3, 2021 · 1 comment
Closed

[Container Registry] Validate delete 404s #19077

seankane-msft opened this issue Jun 3, 2021 · 1 comment
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Container Registry
Milestone

Comments

@seankane-msft
Copy link
Member

On delete operations that return a status code of 404, we should validate the body of the response contains the appropriate response of NAME_UNKNOWN for delete_repository, TAG_UNKNOWN for delete_tag, and MANIFEST_UNKNOWN for delete_manifest` operations

@seankane-msft seankane-msft added Container Registry Client This issue points to a problem in the data-plane of the library. labels Jun 3, 2021
@seankane-msft seankane-msft added this to the [2021] July milestone Jun 3, 2021
@seankane-msft seankane-msft self-assigned this Jun 3, 2021
@seankane-msft
Copy link
Member Author

for a callback, something like:

def handle_delete(expected_error, pipeline_response, deserialized, headers):
    if pipeline_response.http_response.status_code == 404:
        if expected_error in pipeline_response.http_response.text:
            return
        raise ResourceNotFoundError(...)

Then when you use it:

cls = functools.partial(handle_delete, MANIFEST_UNKNOWN)

@lmazuel lmazuel closed this as completed Jul 6, 2021
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-python that referenced this issue May 16, 2022
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-python that referenced this issue May 16, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Container Registry
Projects
None yet
Development

No branches or pull requests

2 participants