Bug 1121442 - zanata-client-3.3.2 tracking bugs
Summary: zanata-client-3.3.2 tracking bugs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-zanata-client
Version: client-3.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: client-3.4
Assignee: Patrick Huang
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
: 1152787 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-21 01:25 UTC by Ding-Yi Chen
Modified: 2015-04-20 01:16 UTC (History)
1 user (show)

Fixed In Version: Client 3.4.1-SNAPSHOT
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-04-20 01:16:40 UTC


Attachments (Terms of Use)

Description Ding-Yi Chen 2014-07-21 01:25:06 UTC
Description of problem:
This is the overall bugs found in zanata-client-3.3.2

Version-Release number of selected component (if applicable):
zanata-client-3.3.2-2.fc20

How reproducible:
Always

Bug1: 
  run "zanata-cli -v"
 
  Expected:
    Version number
 
  Actual:
    None


Bug2: 
  run "zanata-cli help" or "zanata-cli --help"
  
  Expected:
     List of commands

  Actual:
     No list of commands


Following tests are working with gcc-4.8.3, project-type: gettext
Assume gcc and version gcc-4.8.3 are created.

Bug3:
  It does not handle HTTP 302 properly.
  run "zanata-cli push -e  --src-dir . --trans-dir .

  Expected:
     Push successfully

  Actual:
[DEBUG] << HTTP/1.1 302 Moved Temporarily
[DEBUG] << Date: Mon, 21 Jul 2014 01:21:04 GMT
[DEBUG] << Server: Apache-Coyote/1.1
[DEBUG] << Location: https://translate-stg.zanata.org/rest/version
[DEBUG] << Content-Length: 0
[DEBUG] << Connection: close
[DEBUG] << Content-Type: text/plain; charset=UTF-8
[ERROR] Execution failed: 
org.jboss.resteasy.spi.ReaderException: javax.ws.rs.ProcessingException: Unable to find a MessageBodyReader of content-type text/plain;charset=UTF-8 and type class org.zanata.rest.dto.VersionInfo
        at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:469)
        at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:385)
        at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:346)
        at org.zanata.rest.client.ZanataProxyFactory.<init>(ZanataProxyFactory.java:109)
        at org.zanata.client.commands.OptionsUtil.createRequestFactory(OptionsUtil.java:155)
        at org.zanata.client.commands.PushPullCommand.<init>(PushPullCommand.java:96)
        at org.zanata.client.commands.pull.PullCommand.<init>(PullCommand.java:62)
        at org.zanata.client.commands.pull.PullOptionsImpl.initCommand(PullOptionsImpl.java:59)
        at org.zanata.client.commands.ArgsUtil.runCommand(ArgsUtil.java:47)
        at org.zanata.client.ZanataClient.processArgs(ZanataClient.java:168)
        at org.zanata.client.ZanataClient.main(ZanataClient.java:93)
Caused by: javax.ws.rs.ProcessingException: Unable to find a MessageBodyReader of content-type text/plain;charset=UTF-8 and type class org.zanata.rest.dto.VersionInfo
        at org.jboss.resteasy.core.interception.ClientReaderInterceptorContext.throwReaderNotFound(ClientReaderInterceptorContext.java:39)
        at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.getReader(AbstractReaderInterceptorContext.java:73)
        at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:50)
        at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59)
        at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53)
        at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:433)
        ... 10 more

Bug4:
  --log-http failed to show in options

  run "zanata-cli pull --help"

  Actual
    --log-http failed to show in options

  Expected:
     --log-http should show in options.

Comment 1 Patrick Huang 2014-07-21 01:27:27 UTC
Correction.
failed to recognize --logHttp option

Comment 2 Ding-Yi Chen 2014-07-21 02:36:56 UTC
(In reply to Patrick Huang from comment #1)
> Correction.
> failed to recognize --logHttp option

Is the option name convention in zanata-cli "--xxx-xxxx"

Comment 3 Patrick Huang 2014-07-21 02:43:34 UTC
The convention is --xx-xxxx. But our current code defines that option as --logHttp. I mention it just so we are clear that the bug is: this option for some reason isn't recognized. After we find out why it isn't recognized, we can/should rename it to follow convention.

(In reply to Ding-Yi Chen from comment #2)
> (In reply to Patrick Huang from comment #1)
> > Correction.
> > failed to recognize --logHttp option
> 
> Is the option name convention in zanata-cli "--xxx-xxxx"

Comment 4 Patrick Huang 2014-10-28 04:58:15 UTC
We can't handle http status 302 properly (current library don't support it). What we do now is to show a better error message and let user know they need to change their url to match the redirected location.

Comment 5 Patrick Huang 2014-10-28 04:58:26 UTC
https://github.com/zanata/zanata-client/pull/35

Comment 6 Ding-Yi Chen 2014-10-31 04:18:21 UTC
Tested with commit 02f67bf69f606ee50c5d438277a6ae4721c993e1
Running zanata-cli pull --help, the description of option --log-http is shown as:
[--log-http LOGHTTP], which should be [--log-http], as it does not accept value.

Comment 7 Patrick Huang 2014-10-31 05:19:31 UTC
Done.

Comment 8 Ding-Yi Chen 2014-10-31 08:32:32 UTC
VERIFIED with client 3.4.1-SNAPSHOT
commit 09d856c7cc1e2f720fb853eb87d68199c4d6eded

Comment 9 Patrick Huang 2014-12-17 01:30:28 UTC
*** Bug 1152787 has been marked as a duplicate of this bug. ***


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