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

WIP: add ETags #128

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft

WIP: add ETags #128

wants to merge 29 commits into from

Conversation

leafty
Copy link
Member

@leafty leafty commented Feb 26, 2024

WIP/Experimental

/deploy #notest renku=release-0.49.0 renku-ui=leafty/use-etags

@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-ds-128.dev.renku.ch

@leafty leafty temporarily deployed to renku-ci-ds-128 February 26, 2024 13:06 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 February 26, 2024 13:19 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 February 26, 2024 13:33 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 February 26, 2024 16:24 — with GitHub Actions Inactive
@authenticate(self.authenticator)
@validate(json=apispec.UserPreferencesPatch)
async def _patch(request: Request, body: apispec.UserPreferencesPatch, user: base_models.APIUser):
etag = request.headers.get("If-None-Match")
Copy link
Member

@Panaetius Panaetius Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this isn't done, just as a reminder. we should raise 428 here if an etag is not supplied. maybe with a decorator?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good question, actually. The way this is written for now is that the use of entity tags on the client side is not mandatory (of course with the risk on mid-air collisions). Their use can be made mandatory if we think all clients can be made to support them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be mandatory. At least I think a client not using etags "winning" when it comes to mid air collisions is exactly the wrong way around for things to be.

@leafty leafty temporarily deployed to renku-ci-ds-128 February 26, 2024 16:38 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 February 26, 2024 16:45 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 February 28, 2024 14:24 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 February 28, 2024 14:38 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 March 1, 2024 13:18 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 March 1, 2024 13:27 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 March 1, 2024 13:38 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 March 1, 2024 13:48 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 March 1, 2024 14:06 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 March 1, 2024 14:32 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 March 4, 2024 13:54 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ds-128 March 5, 2024 12:06 — with GitHub Actions Inactive
@Panaetius
Copy link
Member

this can be closed, no?

@olevski
Copy link
Member

olevski commented Mar 26, 2024

@leafty this can be closed right?

@leafty
Copy link
Member Author

leafty commented Mar 26, 2024

this still contains a prototype to add ETags to the user preferences API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants