Skip to content

[QA][CLI] Add cli tests coverage for post processing service #11273

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

Open
5 tasks
amrita-shrestha opened this issue Apr 28, 2025 · 0 comments
Open
5 tasks

[QA][CLI] Add cli tests coverage for post processing service #11273

amrita-shrestha opened this issue Apr 28, 2025 · 0 comments
Labels

Comments

@amrita-shrestha
Copy link
Contributor

Description

Add tests coverage for managing unfinished uploads using postprocessing service

Using postprocessing service

# list upload sessions
> ./ocis/bin/ocis storage-users uploads sessions                               
Sessions:
+--------------------------------------+--------------------------------------+--------------------------------+--------+--------+--------------------------------------+--------------------------------------+---------------------------+------------+----------------------+-------------+
|                Space                 |              Upload Id               |              Name              | Offset |  Size  |              Executant               |                Owner                 |          Expires          | Processing |      Scan Date       | Scan Result |
+--------------------------------------+--------------------------------------+--------------------------------+--------+--------+--------------------------------------+--------------------------------------+---------------------------+------------+----------------------+-------------+
| 7f2afb67-021a-4553-b711-7c91d294bcac | 42287076-699c-4857-8466-d6ee2b4cf531 | Screenshot from 2025-01-29     | 133251 | 133251 | 7f2afb67-021a-4553-b711-7c91d294bcac | 7f2afb67-021a-4553-b711-7c91d294bcac | 2025-04-29T12:23:11+05:45 | true       | 0001-01-01T00:00:00Z |             |
|                                      |                                      | 16-32-54.png                   |        |        |                                      |                                      |                           |            |                      |             |
| 7f2afb67-021a-4553-b711-7c91d294bcac | 804767f0-3a24-4c23-8e76-922aa731978e | Screenshot from 2025-02-05     |  38000 |  38000 | 7f2afb67-021a-4553-b711-7c91d294bcac | 7f2afb67-021a-4553-b711-7c91d294bcac | 2025-04-29T12:23:11+05:45 | true       | 0001-01-01T00:00:00Z |             |
|                                      |                                      | 13-01-43.png                   |        |        |                                      |                                      |                           |            |                      |             |
| 7f2afb67-021a-4553-b711-7c91d294bcac | b25c1983-cc0b-4281-93bb-b8ccc772a478 | Screenshot from 2025-01-17     | 226645 | 226645 | 7f2afb67-021a-4553-b711-7c91d294bcac | 7f2afb67-021a-4553-b711-7c91d294bcac | 2025-04-29T12:23:11+05:45 | true       | 0001-01-01T00:00:00Z |             |
|                                      |                                      | 11-42-49.png                   |        |        |                                      |                                      |                           |            |                      |             |
+--------------------------------------+--------------------------------------+--------------------------------+--------+--------+--------------------------------------+--------------------------------------+---------------------------+------------+----------------------+-------------+
 
# resume specific 
> ./ocis/bin/ocis postprocessing resume -u 1b403b5c-73b5-479d-a4f3-ba57d7e96a9c 

# restart postprocessing for the given uploadI
> ./ocis/bin/ocis postprocessing resume -r -u 5032795f-86a9-44ca-9a88-7b0f288ed7fc
 
# resume all uploads in the given postprocessing step 
POSTPROCESSING_STEPS = virusscan  (if you find other steps eligible then please add)
> ./ocis/bin/ocis postprocessing resume                # Resumes all uploads where postprocessing is finished, but upload is not finished
> ./ocis/bin/ocis postprocessing resume -s "finished"  # Equivalent to the above
> ./ocis/bin/ocis postprocessing resume -s "virusscan" # Resume all uploads currently in virusscan step

How to obtain failed upload

  • set POSTPROCESSING_DELAY env and upload resources, and while uploading, restart ocis service using ocis-wrapper. This way you get an unfinished upload
  • If you have alternative, then you can use that also

Test coverage

  • resume-specific failed upload
  • Restart postprocessing for a specific upload
  • Resume all failed uploads
  • Resume all failed uploads which is at postprocessing step finish
  • Resume all failed uploads which is at the postprocessing step virusscan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant