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 get_dataset_size for datasets with null file_size column #116

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Oct 15, 2023

Fixes:

Oct 13 14:29:40 galaxy-vgp galaxyctl[2536822]:   File "/cvmfs/main.galaxyproject.org/venv/lib/python3.8/site-packages/tpv/core/helpers.py", line 16, in get_dataset_size
Oct 13 14:29:40 galaxy-vgp galaxyctl[2536822]:     return float(dataset.file_size)
Oct 13 14:29:40 galaxy-vgp galaxyctl[2536822]: TypeError: float() argument must be a string or a number, not 'NoneType'

There's an underlying bug as well where the job state is final but the file size is unset, but I would always consider it better to use one abstraction level above the database column.

mvdbeek and others added 2 commits October 15, 2023 12:26
Fixes:

```
Oct 13 14:29:40 galaxy-vgp galaxyctl[2536822]:   File "/cvmfs/main.galaxyproject.org/venv/lib/python3.8/site-packages/tpv/core/helpers.py", line 16, in get_dataset_size
Oct 13 14:29:40 galaxy-vgp galaxyctl[2536822]:     return float(dataset.file_size)
Oct 13 14:29:40 galaxy-vgp galaxyctl[2536822]: TypeError: float() argument must be a string or a number, not 'NoneType'
```

There's an underlying bug as well where the job state is final but the
file size is unset, but I would always consider it better
to use one abstraction level above the database column.
Copy link
Member

@nuwang nuwang left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @mvdbeek. We still have to wait for a point release before we can do a full integration test: https://github.com/galaxyproject/total-perspective-vortex/actions/runs/6864537601/job/18934017692?pr=66#step:8:167 but the mock tests should do for now.

@nuwang nuwang merged commit 9218266 into galaxyproject:main Nov 22, 2023
2 checks passed
@mvdbeek
Copy link
Member Author

mvdbeek commented Nov 22, 2023

There's no hurry, we've also fixed the underlying bug on the galaxy side in galaxyproject/galaxy#16855

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.

2 participants