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

restructure storage-users upload command #4403

Merged
merged 7 commits into from
Aug 18, 2022
Merged

restructure storage-users upload command #4403

merged 7 commits into from
Aug 18, 2022

Conversation

wkloucek
Copy link
Contributor

@wkloucek wkloucek commented Aug 17, 2022

Description

moves the "uploads" command of the storage-users service into a subsection "maintenance", rewords the descriptions and renames the ocis storage-users uploads purge command into clean (breaking change).

Before:

$ ocis storage-users help   
NAME:
   ocis storage-users - storage-users extension commands

USAGE:
   ocis storage-users [global options] command [command options] [arguments...]

COMMANDS:
   uploads  manage uploads
   help, h  Shows a list of commands or help for one command
   info:
     health   check health status
     version  print the version of this binary and the running extension instances
   server:
     server  start storage-users extension without runtime (unsupervised mode)

GLOBAL OPTIONS:
   --help, -h  show help (default: false)

After:

ocis storage-users        
NAME:
   ocis storage-users - storage-users extension commands

USAGE:
   ocis storage-users command [command options] [arguments...]

COMMANDS:
   help, h  Shows a list of commands or help for one command
   info:
     health   check health status
     version  print the version of this binary and the running extension instances
   maintenance:
     uploads  manage unfinished uploads
   server:
     server  start storage-users extension without runtime (unsupervised mode)

OPTIONS:
   --help, -h  show help (default: false)

Before:

ocis storage-users uploads
NAME:
   ocis storage-users uploads - manage uploads

USAGE:
   ocis storage-users uploads command [command options] [arguments...]

COMMANDS:
   help, h  Shows a list of commands or help for one command
   services:
     list   Print a list of all incomplete uploads
     purge  Let storage-users extension clean up leftovers from expired downloads

OPTIONS:
   --help, -h  show help (default: false)

After:

ocis storage-users uploads
NAME:
   ocis storage-users uploads - manage unfinished uploads

USAGE:
   ocis storage-users uploads command [command options] [arguments...]

COMMANDS:
   list     Print a list of all incomplete uploads
   clean    Clean up leftovers from expired uploads
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help (default: false)

Related Issue

Motivation and Context

have a category for a better overview

How Has This Been Tested?

  • print the help locally

Screenshots (if appropriate):

see description for output

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@update-docs
Copy link

update-docs bot commented Aug 17, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@mmattel
Copy link
Contributor

mmattel commented Aug 17, 2022

The full help text shows:

   maintenance:
     uploads  manage uploads

When reading this, I interpret that I can manage uploads in general but only if you go deeper you see that it is to fix upload issues. Maybe to write: uploads manage expired or aborted uploads ?

@wkloucek
Copy link
Contributor Author

The full help text shows:

   maintenance:
     uploads  manage uploads

When reading this, I interpret that I can manage uploads in general but only if you go deeper you see that it is to fix upload issues. Maybe to write: uploads manage expired or aborted uploads ?

we decided to use the texts from 7d76650

@wkloucek wkloucek changed the title move the uploads command into a category restructure storage-users upload comman Aug 17, 2022
@wkloucek wkloucek changed the title restructure storage-users upload comman restructure storage-users upload command Aug 17, 2022
@mmattel
Copy link
Contributor

mmattel commented Aug 18, 2022

I was not able to check this but want to highlight a possible thing to be fixed too:

From the old outputs:

$ ocis storage-users uploads list
Incomplete uploads:
 - 455bd640-cd08-46e8-a5a0-9304908bd40a (file_example_PPT_1MB.ppt, Size: 1028608, Expires: 2022-08-17T12:35:34+02:00)
$ ocis storage-users uploads clear
Purging 455bd640-cd08-46e8-a5a0-9304908bd40a (Filename: file_example_PPT_1MB.ppt, Size: 1028608, Expires: 2022-08-17T12:35:34+02:00)

Should'nt this be:
Incomplete uploads --> Unfinished uploads and
Purging --> Clearing ?

Note that Unfinished uploads has a new line starting with the list of items while Clearing does not and no list item (dash) at the beginning but imho should have...

It should look like:

$ ocis storage-users uploads list
Unfinished uploads:
 - 455bd640-cd08-46e8-a5a0-9304908bd40a (file_example_PPT_1MB.ppt, Size: 1028608, Expires: 2022-08-17T12:35:34+02:00)
$ ocis storage-users uploads clear
Clearing
- 455bd640-cd08-46e8-a5a0-9304908bd40a (Filename: file_example_PPT_1MB.ppt, Size: 1028608, Expires: 2022-08-17T12:35:34+02:00)

@wkloucek
Copy link
Contributor Author

Now it is:

ocis storage-users uploads     
NAME:
   ocis storage-users uploads - manage unfinished uploads

USAGE:
   ocis storage-users uploads command [command options] [arguments...]

COMMANDS:
   list     Print a list of all incomplete uploads
   clean    Clean up leftovers from expired uploads
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help (default: false)
   ocis storage-users uploads     
NAME:
   ocis storage-users uploads - manage unfinished uploads

USAGE:
   ocis storage-users uploads command [command options] [arguments...]

COMMANDS:
   list     Print a list of all incomplete uploads
   clean    Clean up leftovers from expired uploads
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help (default: false)
ocis storage-users uploads list        
Incomplete uploads:
 - add982e4-6d6d-4d31-8f48-84cda9bdcc4b (file_example_ODP_1MB.otp, Size: 932601, Expires: 2022-08-18T05:27:41+02:00)
ocis storage-users uploads clean
Cleaned uploads:
 - add982e4-6d6d-4d31-8f48-84cda9bdcc4b (file_example_ODP_1MB.otp, Size: 932601, Expires: 2022-08-18T05:27:41+02:00)

@ownclouders
Copy link
Contributor

💥 Acceptance test Core-API-Tests-ocis-storage-6 failed. Further test are cancelled...

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
44.4% 44.4% Duplication

@wkloucek wkloucek merged commit dbcd78e into owncloud:master Aug 18, 2022
@wkloucek wkloucek deleted the storage-users-uploads-category branch August 18, 2022 08:56
ownclouders pushed a commit that referenced this pull request Aug 18, 2022
Merge: a6c6629 08c7743
Author: Willy Kloucek <[email protected]>
Date:   Thu Aug 18 10:56:47 2022 +0200

    Merge pull request #4403 from wkloucek/storage-users-uploads-category

    restructure storage-users upload command
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.

3 participants