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
rucio get doesn't show summary anymore #5250
Comments
Adding some more info from DAST
|
@cserf Did you have a look on this yet in respect to the old ticket? |
Okay, I had a look. At which version did the rucio download command print a summary when the number of items in the input and output queue are different? History in the repository: The summary can't be printed if the return statement is not reached, which means that the summary was never printed. I also was not able to recreate the bug, which makes it harder to debug. |
The different download functions in the `DownloadClient` return lists containing the files and the states of the corresponding downloads. These states also include failed states. If an unknown exception is thrown in the `_download_item` method, the corresponding file, which should be downloaded, is not present in the output list. This leads to two problems; both can be solved by adding the file with the download status `FAILED` to the output list: - The number of files in the input queue and output queue is different, which throws an error. This is easily resolved by setting the file download status to `FAILED`. An error is later thrown. - The client does not print the summary in case there is no items in the output queue. By adding the file to the output queue this problem is resolved.
The different download functions in the `DownloadClient` return lists containing the files and the states of the corresponding downloads. These states also include failed states. If an unknown exception is thrown in the `_download_item` method, the corresponding file, which should be downloaded, is not present in the output list. This leads to two problems; both can be solved by adding the file with the download status `FAILED` to the output list: - The number of files in the input queue and output queue is different, which throws an error. This is easily resolved by setting the file download status to `FAILED`. An error is later thrown. - The client does not print the summary in case there is no items in the output queue. By adding the file to the output queue this problem is resolved.
The client state uses strings to store the state. This has the problem that the evalutation, if a client state is wrong, is done at runtime. Also, it uses the exception name as state. This is inconsistent, because all available states should be well defined. This commit uses an enum for the download client state. This enables checks at runtime, since all usable states are defined. The values of the enum ensure the serialization to strings. It also changes the usage from an exception name as state to the `FAILING` state. The exception itself is added in the body already.
…doesn_t_show_summary_anymore Clients: Return information on download exception #5250
The different download functions in the `DownloadClient` return lists containing the files and the states of the corresponding downloads. These states also include failed states. If an unknown exception is thrown in the `_download_item` method, the corresponding file, which should be downloaded, is not present in the output list. This leads to two problems; both can be solved by adding the file with the download status `FAILED` to the output list: - The number of files in the input queue and output queue is different, which throws an error. This is easily resolved by setting the file download status to `FAILED`. An error is later thrown. - The client does not print the summary in case there is no items in the output queue. By adding the file to the output queue this problem is resolved.
…doesn_t_show_summary_anymore Clients: Change the download client state to an enum #5250
The client state uses strings to store the state. This has the problem that the evalutation, if a client state is wrong, is done at runtime. Also, it uses the exception name as state. This is inconsistent, because all available states should be well defined. This commit uses an enum for the download client state. This enables checks at runtime, since all usable states are defined. The values of the enum ensure the serialization to strings. It also changes the usage from an exception name as state to the `FAILING` state. The exception itself is added in the body already.
Motivation
CLI : rucio get doesn't show summary anymore
The text was updated successfully, but these errors were encountered: