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

move: Immediately authenticate client after creation #1480

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Aug 9, 2024

In order to deal with embargoed Dandisets

Closes #1478.

In order to deal with embargoed Dandisets
@jwodder jwodder added patch Increment the patch version when merged cmd-move embargo labels Aug 9, 2024
Copy link

codecov bot commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.60%. Comparing base (9ae6128) to head (9af7226).
Report is 42 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1480      +/-   ##
==========================================
+ Coverage   88.52%   88.60%   +0.08%     
==========================================
  Files          77       77              
  Lines       10560    10561       +1     
==========================================
+ Hits         9348     9358      +10     
+ Misses       1212     1203       -9     
Flag Coverage Δ
unittests 88.60% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jwodder
Copy link
Member Author

jwodder commented Aug 12, 2024

@yarikoptic Ready for review.

@jwodder jwodder requested a review from yarikoptic August 12, 2024 12:24
@@ -812,6 +812,7 @@ def move(
raise TypeError("`dandiset` must be a Path when work_on='both'")
local_ds, subpath = find_dandiset_and_subpath(dandiset)
client = DandiAPIClient.for_dandi_instance(dandi_instance)
client.dandi_authenticate()
Copy link
Member

Choose a reason for hiding this comment

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

in principle we do not need to authenticate if doing dry_run do we?

Would it be feasible in general to provide logic to authenticate when receiving 401 and haven't been authenticated before?

Copy link
Member Author

Choose a reason for hiding this comment

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

Authentication is still needed for dry runs so that the list of assets can be fetched for an embargoed Dandiset.

@yarikoptic
Copy link
Member

Thank you, let's proceed!

@yarikoptic yarikoptic merged commit 5faa18a into master Aug 12, 2024
28 checks passed
@yarikoptic yarikoptic deleted the move-auth branch August 12, 2024 15:17
Copy link

github-actions bot commented Sep 9, 2024

🚀 PR was released in 0.63.1 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd-move embargo patch Increment the patch version when merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants