Bug 812205 - Maven client gets 400 Bad Request using pushTrans option
Summary: Maven client gets 400 Bad Request using pushTrans option
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Maven
Version: 1.6-SNAPSHOT
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 1.6-alpha-1
Assignee: Carlos Munoz
QA Contact: Joyce Chang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-13 05:43 UTC by Ding-Yi Chen
Modified: 2013-03-04 03:19 UTC (History)
5 users (show)

Fixed In Version: maven client 1.6.0-alpha-3-SNAPSHOT
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-22 00:58:18 UTC


Attachments (Terms of Use)
Maven client log (3.67 KB, application/octet-stream)
2012-04-13 05:43 UTC, Ding-Yi Chen
no flags Details
Server log (646 bytes, application/octet-stream)
2012-04-13 06:36 UTC, Ding-Yi Chen
no flags Details
Source pot (600 bytes, application/vnd.ms-powerpoint)
2012-04-13 06:39 UTC, Ding-Yi Chen
no flags Details
Translation to be pushed with pushTrans (1.37 KB, application/octet-stream)
2012-04-13 06:40 UTC, Ding-Yi Chen
no flags Details

Description Ding-Yi Chen 2012-04-13 05:43:55 UTC
Created attachment 577226 [details]
Maven client log

Description of problem:
It looks like maven can no longer push with -Dzanata.pushTrans

Version-Release number of selected component (if applicable):
client API version: 1.6-SNAPSHOT, server API version: 1.6-SNAPSHOT
[WARNING] client API timestamp is 20120412-1426, but server API timestamp is 20120413-0001

How reproducible:
Quite a lot of time

Steps to Reproduce:
1. Server enable locale ja
2. Project/Version to be pushed "AboutFedora/f13"
3. edit zanata.xml as follows:
<config xmlns="http://zanata.org/namespace/config/">
  <url>SERVERURL</url>
  <project>AboutFedora</project>
  <project-version>f13</project-version>
  <project-type>podir</project-type>
  <locales>
    <locale map-from="ja-JP">ja</locale>
  </locales>
</config>

4. mvn -e zanata:push -B -Dzanata.pushTrans
  
Actual results:
[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:1.6-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception: operation returned 400 (Bad Request): empty TextFlowTarget 6bb2aaa48c3a478925800ff269953856 must have ContentState New, uri: http://zanata-empire.lab.eng.bne.redhat.com:8080/rest/projects/p/UserGuide/iterations/i/f14/r, annotations: [@javax.ws.rs.PUT(), @javax.ws.rs.Path(value={id}/translations/{locale})] -> [Help 1]

See attached client.log and server.log for details.

Expected results:
Translation pushed without error

Additional info:
Python client seems working fine.

Comment 1 Sean Flanigan 2012-04-13 05:57:47 UTC
Could you please attach the PO file you were using?

Comment 2 Ding-Yi Chen 2012-04-13 06:36:47 UTC
Created attachment 577237 [details]
Server log

Comment 3 Ding-Yi Chen 2012-04-13 06:39:04 UTC
Created attachment 577238 [details]
Source pot

Comment 4 Ding-Yi Chen 2012-04-13 06:40:16 UTC
Created attachment 577239 [details]
Translation to be pushed with pushTrans

Comment 5 Carlos Munoz 2012-04-18 03:41:03 UTC
Changed the way the PO file reader determines the state of a translation unit based on its content(s).

See:
https://github.com/zanata/zanata/commit/54df7f5c29b121cbb39ceb6c58ac2e6ba405080b

Comment 6 Sean Flanigan 2012-04-19 04:28:42 UTC
This should be fixed now, but note bug 814006 concerning plural forms and invalid PO files.

Comment 7 Joyce Chang 2012-05-02 05:17:01 UTC
verified with maven client 1.6.0-alpha-3-SNAPSHOT


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