Bug 1098829 - [mvn] The description size should be consistent with the size in database.
Summary: [mvn] The description size should be consistent with the size in database.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Maven
Version: 3.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Damian Jansen
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-19 00:20 UTC by Ding-Yi Chen
Modified: 2015-07-29 03:34 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-29 03:34:47 UTC
Embargoed:


Attachments (Terms of Use)

Description Ding-Yi Chen 2014-05-19 00:20:00 UTC
Description of problem:
When putting a long description, mvn client reported that the size must be between 0 and 80, which is different from the limit specified in database, which is 100.

Version-Release number of selected component (if applicable):
Zanata 3.4.0-SNAPSHOT (git-server-3.3.2-343-g610c120)
zanata-maven-plugin:3.3.0
[WARNING] client API version is 3.2.0, but server API version is 3.3.1-SNAPSHOT


How reproducible:
easy always

Steps to Reproduce:
0. Assume zanata.ini is correctly set up.
1.  mvn -e zanata:put-project -Dzanata.projectSlug=tar "-Dzanata.projectName=GNU Tar" "-Dzanata.projectDesc= GNU Tar provides the ability to create tar archives, as well as various other kinds of manipulation. For example, you can use Tar on previously created archives to extract files, to store additional files, or to update or list files which were already stored" -Dzanata.url=$ZANATA_URL


Actual results:
Error message:


Expected results:
Request body contains invalid values:
description: size must be between 0 and 80


Error message:
Request body contains invalid values:
description: size must be between 0 and 100

Additional info:
No server log.

Client log:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.704s
[INFO] Finished at: Mon May 19 10:13:41 EST 2014
[INFO] Final Memory: 20M/173M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:3.3.0:put-project (default-cli) on project standalone-pom: Zanata mojo exception: operation returned 400 (Bad Request): Request body contains invalid values:
[ERROR] description: size must be between 0 and 80
[ERROR] , uri: http://zanata-release-openid.lab.eng.bne.redhat.com:8080/rest/projects/p/tar, annotations: [@javax.ws.rs.PUT(), @javax.ws.rs.Consumes(value=[application/vnd.zanata.project+xml, application/vnd.zanata.project+json, application/xml, application/json])]
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:3.3.0:put-project (default-cli) on project standalone-pom: Zanata mojo exception
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Zanata mojo exception
        at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:141)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: java.lang.RuntimeException: operation returned 400 (Bad Request): Request body contains invalid values:
description: size must be between 0 and 80
, uri: http://zanata-release-openid.lab.eng.bne.redhat.com:8080/rest/projects/p/tar, annotations:
[@javax.ws.rs.PUT(), @javax.ws.rs.Consumes(value=[application/vnd.zanata.project+xml, application/vnd.zanata.project+json, application/xml, application/json])]
        at org.zanata.rest.client.ClientUtility.checkResult(ClientUtility.java:43)
        at org.zanata.client.commands.PutProjectCommand.run(PutProjectCommand.java:53)
        at org.zanata.client.commands.ConfigurableCommand.runWithActions(ConfigurableCommand.java:94)
        at org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:160)
        at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:139)
        ... 21 more

Comment 1 Ding-Yi Chen 2015-03-23 03:01:30 UTC
The command can still reproduce error with zanata-maven-plugin-3.4.2
and Zanata 3.7.0-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-3039)

mvn -e zanata:put-project -Dzanata.projectSlug=tar "-Dzanata.projectName=GNU Tar" -Dzanata.defaultProjectType=gettext "-Dzanata.projectDesc= GNU Tar provides the ability to create tar archives, as well as various other kinds of manipulation. For example, you can use Tar on previously created archives to extract files, to store additional files, or to update or list files which were already stored" -Dzanata.url=$ZANATA_URL

Comment 2 Zanata Migrator 2015-07-29 03:34:47 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-330


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