ssl-hep / ServiceX_frontend

Client access library for ServiceX
https://servicex-frontend.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
5 stars 11 forks source link

Delete Dataset From CLI #519

Closed BenGalewsky closed 1 week ago

BenGalewsky commented 1 week ago

Problem

User's can't delete a dataset from the cache. They also can't see the details of a DID to debug

Approach

Add some new commands to the CLI

servicex datasets get -b testing2 15

This gets back the details of Dataset ID 15...


                                                                        Dataset ID 15                                                                        
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Paths                                                                                                                                                     ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓         │
│ ┃ File ID: 968                                                                                                                                  ┃         │
│ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩         │
│ │ https://xenia.nevis.columbia.edu:1094/atlas/dq2/rucio/user/mtost/06/a1/user.mtost.40294033._000002.less_jet_and_new_GN.root                   │         │
│ │ root://xrootd.data.net2.mghpcc.org:1094//USATLAS/atlasscratchdisk/rucio/user/mtost/06/a1/user.mtost.40294033._000002.less_jet_and_new_GN.root │         │
│ └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘         │
│ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓         │
│ ┃ File ID: 969                                                                                                                                  ┃         │
│ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩         │
│ │ https://xenia.nevis.columbia.edu:1094/atlas/dq2/rucio/user/mtost/23/8b/user.mtost.40294033._000001.less_jet_and_new_GN.root                   │         │
│ │ root://xrootd.data.net2.mghpcc.org:1094//USATLAS/atlasscratchdisk/rucio/user/mtost/23/8b/user.mtost.40294033._000001.less_jet_and_new_GN.root │         │
│ └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘         │

You can delete a dataset with the new command

servicex datasets delete -b testing2 1  

Do this and the server will refreash the dataset when you submit a new request.

Finally, there is a command line option to see deleted datasets (by default they are omited from the dataset report)

 servicex datasets list -b localhost --show-deleted 

The ServiceX deployed on testing2 has been updated to have the endpoints needed for testing this

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 68.29268% with 26 lines in your changes missing coverage. Please review.

Project coverage is 83.05%. Comparing base (c58c5aa) to head (2e9ebb5). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
servicex/app/datasets.py 0.00% 24 Missing :warning:
servicex/servicex_adapter.py 95.45% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #519 +/- ## ========================================== - Coverage 83.86% 83.05% -0.82% ========================================== Files 27 27 Lines 1599 1670 +71 ========================================== + Hits 1341 1387 +46 - Misses 258 283 +25 ``` | [Flag](https://app.codecov.io/gh/ssl-hep/ServiceX_frontend/pull/519/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ssl-hep) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ssl-hep/ServiceX_frontend/pull/519/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ssl-hep) | `83.05% <68.29%> (-0.82%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ssl-hep#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.