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

Fixed ProxyObject.__del__ to use the new Disk IO API from #791 #802

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

madsbk
Copy link
Member

@madsbk madsbk commented Nov 22, 2021

Anyone that knows how to make a pytest that tests exceptions in class destructors?

@madsbk madsbk added 2 - In Progress Currently a work in progress improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Nov 22, 2021
@github-actions github-actions bot added the python python code needed label Nov 22, 2021
@pentschev
Copy link
Member

rerun tests

@pentschev
Copy link
Member

Anyone that knows how to make a pytest that tests exceptions in class destructors?

@madsbk what exactly do you want to test? You want to ensure no exceptions are raised in the destructor, or do you want to verify that the exception is indeed raised? If it's the latter, during __del__ no exceptions should be raised and thus there's a design issue.

@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2021

Codecov Report

❗ No coverage uploaded for pull request base (branch-22.02@6aa330f). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##             branch-22.02     #802   +/-   ##
===============================================
  Coverage                ?   89.83%           
===============================================
  Files                   ?       16           
  Lines                   ?     1997           
  Branches                ?        0           
===============================================
  Hits                    ?     1794           
  Misses                  ?      203           
  Partials                ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6aa330f...23b6b29. Read the comment docs.

@madsbk
Copy link
Member Author

madsbk commented Nov 22, 2021

This: You want to ensure no exceptions are raised in the destructor.
I have tried with the capsys and capfd fixtures but it doesn't work.

It is not blocking this PR but it would be nice to have a regression test

@madsbk madsbk added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Nov 22, 2021
@madsbk madsbk marked this pull request as ready for review November 22, 2021 12:31
@madsbk madsbk requested a review from a team as a code owner November 22, 2021 12:31
@pentschev
Copy link
Member

@madsbk we can add error::pytest.PytestUnraisableExceptionWarning to https://github.com/rapidsai/dask-cuda/blob/branch-21.12/pytest.ini , that will error on uncatched exceptions in __del__.

Copy link
Member

@pentschev pentschev left a comment

Choose a reason for hiding this comment

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

LGTM @madsbk . It's up to you whether you want to add error::pytest.PytestUnraisableExceptionWarning, or maybe even error::pytest.PytestWarning. I think it wouldn't hurt for us to be more strict on pytest warnings.

@madsbk
Copy link
Member Author

madsbk commented Nov 22, 2021

LGTM @madsbk . It's up to you whether you want to add error::pytest.PytestUnraisableExceptionWarning, or maybe even error::pytest.PytestWarning. I think it wouldn't hurt for us to be more strict on pytest warnings.

Thanks @pentschev, let's merge this PR and then try a more strict warning policy in another PR.

@madsbk
Copy link
Member Author

madsbk commented Nov 22, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit d4cb213 into rapidsai:branch-22.02 Nov 22, 2021
@madsbk madsbk deleted the disk_spill_cleanup branch November 22, 2021 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function non-breaking Non-breaking change python python code needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants