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

ENH: log dandischema version and ensure we log (consistently) path for log messages in download #1499

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

yarikoptic
Copy link
Member

hopefully would be in assist to troubleshoot issues with downloads, like the one now reported by @Kevancic on slack

@yarikoptic yarikoptic added DX Developer eXperience patch Increment the patch version when merged labels Sep 12, 2024
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.65%. Comparing base (fdd65d0) to head (c784048).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
dandi/download.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1499      +/-   ##
==========================================
+ Coverage   88.56%   88.65%   +0.08%     
==========================================
  Files          78       78              
  Lines       10585    10585              
==========================================
+ Hits         9375     9384       +9     
+ Misses       1210     1201       -9     
Flag Coverage Δ
unittests 88.65% <25.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.

dandi/tests/test_download.py Fixed Show resolved Hide resolved
else:
lgr.debug(
"Download directory found, but digests do not match; starting new download"
"%s - download directory found, but digests do not match;"
" starting new download",
Copy link
Member

Choose a reason for hiding this comment

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

Would digests.keys() and self. digests.keys() be useful to know here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I felt like I wondered the same and then dismissed as it would be "too much noise". but now not sure -- it might be... yet to decide

dandi/download.py Outdated Show resolved Hide resolved
dandi/tests/test_download.py Outdated Show resolved Hide resolved
dandi/download.py Outdated Show resolved Hide resolved
@@ -853,12 +869,35 @@ def __exit__(
exc_tb: TracebackType | None,
) -> None:
assert self.fp is not None
if exc_type is not None or exc_val is not None or exc_tb is not None:
Copy link
Member

Choose a reason for hiding this comment

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

exc_tb is not used in the log here.

Copy link
Member Author

Choose a reason for hiding this comment

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

first I had it but then kicked out from actual log -- the point is that if any of them provided, exception happened.

@yarikoptic
Copy link
Member Author

This grew too big and unwildly. I will separate latter commits into a separate PR or PRs.

yarikoptic added a commit that referenced this pull request Sep 27, 2024
Current desire/need is to troubleshoot
   #1499
but moreover -- Windows.  Not yet even sure if would work
for windows but still -- would be good to have generally

May be later we should parametrize more, not for every debug run
@yarikoptic
Copy link
Member Author

I shrunk to 1 commit, if passes, would merge

@yarikoptic
Copy link
Member Author

3.8 windows:

________________________ test_IteratorWithAggregation _________________________
dandi\support\tests\test_iterators.py:72: in test_IteratorWithAggregation
    assert got in ([], [0])
E   assert [0, 1] in ([], [0])

anyways -- did not spot related fails, let's proceed

@yarikoptic yarikoptic merged commit 1c89d42 into master Sep 27, 2024
22 of 28 checks passed
@yarikoptic yarikoptic deleted the enh-log branch September 27, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Developer eXperience patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants