Skip to content

ETag/304 conditional requests are redundant on immutable, content-addressed bundle/deployment endpoint #186

Description

@sulksamino

Bug description

The APIs for requesting a bundle (/api/v1/clients/{clientId}/bundles/{digest}) or single deployment (/api/v1/clients/{clientId}/deployments/{deploymentId}/{digest}) call for the If-None-Match header to allow caching. While I understand the principal mechanism behind the If-None-Match header and 304 response it feels unnecessary and confusing for these two cases.
A context aware client knows that these resources are addressed by their digest which means they can not change. So I see no reason why a client would send the request if it already has the response cached.

The response on /api/v1/clients/{clientId}/deployments/{deploymentId}/{digest} also has no 304 response defined.

Proposed fix

Drop the If-None-Headers for both paths and the 304 response for /api/v1/clients/{clientId}/bundles/{digest}

Anything else (optional)

https://github.com/margo/specification/blob/pre-draft/system-design/specification/margo-management-interface/workload-management-api-1.0.0.yaml

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions