Bug 1002396 - Some minor usability issues in zanata-cli pull
Some minor usability issues in zanata-cli pull
Status: CLOSED UPSTREAM
Product: Zanata
Classification: Community
Component: Component-zanata-client-ivy (Show other bugs)
3.0
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Sean Flanigan
Zanata-QA Mailling List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-29 02:13 EDT by Damian Jansen
Modified: 2015-07-30 21:21 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-30 21:21:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Damian Jansen 2013-08-29 02:13:23 EDT
1. zanata-cli --help pull doesn't indicate src-dir is required
2. it should - if possible - validate the required parameters before checking dependencies, to fail fast
3. Are you sure? (y/n) - the n should be N as it's the default
Comment 1 Sean Flanigan 2013-08-29 03:16:50 EDT
Regarding #1, with the latest version of client (3.1.1) there is actually a very subtle hint that --src-dir (-s) is required: unlike most of the other options, it is not surrounded by square brackets on the usage line at the top.  But I agree that it is not enough!

We could probably do something with reflection to enhance the option descriptions and make it clearer which options are required, but honestly we would probably be better off making all of our options actually optional.  After all, there is no reason to force the user to specify src-dir unless we are pulling source documents.

Also, getting useful help when a required option is missing is difficult with Args4j due to https://java.net/jira/browse/ARGS4J-14   We have a workaround, but there are some cases we don't handle.  If the options weren't required, we wouldn't need the workaround.

Damian, can you expand on #2?
Comment 2 Damian Jansen 2013-08-29 20:30:19 EDT
Re #2 - it takes a good few seconds to check the ivy dependencies before failing with "you forgot option x". It can be a tad annoying to do this a couple of times.

If the script can immediately recognise that the user has omitted an necessary switch then it can just bail out before the wait.
Comment 3 Sean Flanigan 2013-09-01 22:37:17 EDT
(In reply to Damian Jansen from comment #2)
> Re #2 - it takes a good few seconds to check the ivy dependencies before
> failing with "you forgot option x". It can be a tad annoying to do this a
> couple of times.

A good few seconds?  It runs faster than I expected, but perhaps that's just because I expected it to take a little while.  It's definitely slower than I would prefer.  (And the first invocation of the day isn't as fast as the subsequent runs.)
 
> If the script can immediately recognise that the user has omitted an
> necessary switch then it can just bail out before the wait.

It can't really do that, because those dependencies (some of them, and we can't be selective) are needed to execute the Java code which checks the options.

I have changed the shell script so that it lets Ivy cache the resolution results.   The first invocation should be a little faster, assuming the dependencies have been fetched before.  Try zanata-cli-3.1.1-ivy-2.
Comment 4 Zanata Migrator 2015-07-30 21:21:19 EDT
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-450

Note You need to log in before you can comment on or make changes to this bug.