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

Fix that proofreading got stuck with expired token #7598

Merged
merged 3 commits into from
Jan 31, 2024

Conversation

fm3
Copy link
Member

@fm3 fm3 commented Jan 30, 2024

The bucketProvider was cached using only the layer name. For EditableMappingLayers, the token is stored in the layer. That meant that even when a new request uses a new token, the old token is still used by the cached bucketProvider. When that token expires, the BucketProvider fails permanently with the old token.

This PR includes the token in the bucketProviderCacheKey similar to the mechanism in https://github.com/scalableminds/webknossos/pull/7437/files#diff-0a1de65bd00003637bef68955997c0de7a92d0402bda79f32fda5dde4e5a5816

Steps to test:

  • I tested this by setting silhouettetokenAuthenticator.dataStoreExpiry = 10 seconds in application.conf. With this, the frontend will request a new token and use that after the old one is expired. It is then also passed to the bucketProvider. The bug occurred quickly with that config but the old code.

Issues:


  • Updated changelog
  • Needs datastore update after deployment

@fm3 fm3 self-assigned this Jan 30, 2024
@fm3 fm3 marked this pull request as ready for review January 30, 2024 14:44
@fm3 fm3 requested a review from frcroth January 30, 2024 14:44
@fm3 fm3 merged commit 43ecfb3 into master Jan 31, 2024
2 checks passed
@fm3 fm3 deleted the fix-proofreading-token-expiry branch January 31, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proofreading gets stuck with expired token
2 participants