Skip to content

Conversation

@fm3
Copy link
Member

@fm3 fm3 commented Nov 25, 2025

Description:

  • While dataset sharing_tokens may occasionally be used as context tokens to access shared datasets, never should normal user tokens be passed as sharing_tokens. One problem this may cause is the token showing up in logging.
  • This PR makes the use of sharing_tokens more explicit.
  • In the methods Dataset.trigger_dataset_import, Dataset.trigger_reload_in_datastore and RemoteDataset.trigger_reload_in_datastore the parameter token was deprecated (use an authenticated webknossos context instead). In RemoteDataset.download_mesh and RemoteSegmentationLayer.download_mesh the parameter token was renamed to sharing_token to clarify that it is meant for a dataset sharing token. Otherwise, use an authenticated webknossos context instead.

Issues:

Todos:

  • Updated Changelog

@fm3 fm3 self-assigned this Nov 25, 2025

assert remote_ds.name == "test_remote_metadata"

# allow 10s for wk to scan the used storage bytes
Copy link
Member Author

Choose a reason for hiding this comment

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

the server’s finishUpload call now blocks until the storage is measured.

Copy link
Member

Choose a reason for hiding this comment

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

Sweet

@github-actions
Copy link

github-actions bot commented Nov 26, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
10146 8524 84% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
webknossos/webknossos/client/_download_dataset.py 95% 🟢
webknossos/webknossos/client/api_client/datastore_api_client.py 90% 🟢
webknossos/webknossos/dataset/dataset.py 76% 🟢
webknossos/webknossos/dataset/layer/segmentation_layer/remote_segmentation_layer.py 46% 🟢
webknossos/webknossos/dataset/remote_dataset.py 85% 🟢
TOTAL 78% 🟢

updated for commit: 251f99c by action🐍

@fm3 fm3 marked this pull request as ready for review November 26, 2025 14:20
@fm3 fm3 requested a review from normanrz November 26, 2025 14:25

assert remote_ds.name == "test_remote_metadata"

# allow 10s for wk to scan the used storage bytes
Copy link
Member

Choose a reason for hiding this comment

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

Sweet

@normanrz
Copy link
Member

Not sure it is necessary to update all the snapshots. I usually only remove the ones that are affected and then run ./test.sh --add-snapshots ...

@fm3 fm3 merged commit 911d995 into master Nov 26, 2025
23 checks passed
@fm3 fm3 deleted the sharingtoken branch November 26, 2025 14:46
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.

Remove user token from logs, should not be passed as sharingToken

3 participants