Prevent String upload jobs from failing with "missing end-quote"

Bug #1674011 reported by Julie Pichon on 2017-03-18
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Medium
Unassigned

Bug Description

The CI post-merge job that pushes new strings over to Zanata has been failing for over a week with the following error:

2017-03-16 12:55:13.468428 | + zanata-cli -B -e push --copy-trans False
[...]
2017-03-16 12:55:15.391220 | [INFO] Found source documents:
2017-03-16 12:55:15.391405 | [INFO] i18n/messages
2017-03-16 12:55:15.531164 | [ERROR] Operation failed: missing end-quote

http://logs.openstack.org/20/20b7a28e46d9d69a5680e564f2937672c153a3aa/post/tripleo-ui-upstream-translation-update/cbe8882/console.html#_2017-03-16_12_55_15_531314

This means translators have not had the full set of strings to work from even for Ocata, and no new strings can be added to Zanata for either branch until this is fixed.

Julie Pichon (jpichon) wrote :

This seems to be due to a \n linebreak in one of the strings:

https://github.com/openstack/tripleo-ui/blob/eb64c4/src/js/components/deployment_plan/DeploymentPlan.js#L73

For now, to unblock the jobs I propose to simply remove it, since \n isn't recognised as a linebreak when the tooltip is displayed in the UI at the moment and simply adding <br/> has the tag itself appear in plain text.

The longer term solution would be to prevent such invalid strings from being created, either on our side or by fixing the json2pot tool upstream.

Fix proposed to branch: master
Review: https://review.openstack.org/447237

Changed in tripleo:
assignee: nobody → Julie Pichon (jpichon)
status: Triaged → In Progress

Hello Julie,

According to just the message from Zanata API: "[ERROR] Operation failed: missing end-quote",
the following part would be another possible candidate of the root cause:
"'role\'s selection dialog, you can tag available nodes into the role or untag nodes already '".

After the conversion to pot file, the single quote will remain without \ character, and Zanata might think that just one single quote is included in the string.

Julie Pichon (jpichon) wrote :

Hi Ian, thank you for sharing your thoughts! Running a couple of tests on a test Zanata project, removing the \n seems like enough to fix the upload, for now.

Reviewed: https://review.openstack.org/447237
Committed: https://git.openstack.org/cgit/openstack/tripleo-ui/commit/?id=21319952ddbe443d8f8018f54e5b93d5fc798ebd
Submitter: Jenkins
Branch: master

commit 21319952ddbe443d8f8018f54e5b93d5fc798ebd
Author: Julie Pichon <email address hidden>
Date: Sat Mar 18 18:53:22 2017 +0000

    Remove '\n' linebreak from localised string

    This is causing the string to be created without end quote in the pot
    file, making it invalid and impossible be upload to Zanata. No new
    strings can be added to Zanata until this is resolved.

    Note that this doesn't seem to change the tooltip as actually displayed,
    as \n doesn't appear to be interpreted as a line break at the moment.

    Change-Id: Ic4c07aade661226a6a9cf3106a0dfae0586433a8
    Partial-Bug: #1674011

Oh interesting '\n' character process in Zanata - Thanks! I have learned more on Zanata :)

Reviewed: https://review.openstack.org/447670
Committed: https://git.openstack.org/cgit/openstack/tripleo-ui/commit/?id=ef4b5efff58dca36616a984b5753fefdf6793353
Submitter: Jenkins
Branch: stable/ocata

commit ef4b5efff58dca36616a984b5753fefdf6793353
Author: Julie Pichon <email address hidden>
Date: Sat Mar 18 18:53:22 2017 +0000

    Remove '\n' linebreak from localised string

    This is causing the string to be created without end quote in the pot
    file, making it invalid and impossible be upload to Zanata. No new
    strings can be added to Zanata until this is resolved.

    Note that this doesn't seem to change the tooltip as actually displayed,
    as \n doesn't appear to be interpreted as a line break at the moment.

    Change-Id: Ic4c07aade661226a6a9cf3106a0dfae0586433a8
    Partial-Bug: #1674011
    (cherry picked from commit 21319952ddbe443d8f8018f54e5b93d5fc798ebd)

tags: added: in-stable-ocata

The band-aid has merged. We should find a way (in our repo or the upstream library or...) to catch this earlier than when the translation jobs are broken. I don't have time to look into it now so removing myself and resetting the status, also lowering the importance since things aren't broken anymore.

Changed in tripleo:
status: In Progress → Triaged
importance: High → Medium
assignee: Julie Pichon (jpichon) → nobody
Changed in tripleo:
milestone: pike-1 → pike-2
Julie Pichon (jpichon) on 2017-05-16
summary: - String upload job failing with "missing end-quote"
+ Prevent String upload jobs from failing with "missing end-quote"
Changed in tripleo:
milestone: pike-2 → pike-3
Julie Pichon (jpichon) wrote :

A thread on the i18n list [1] suggests using "msgfmt -c message.pot" before uploading the strings. I'm not sure if we can reasonably run such a test on the gate on our test jobs, so that broken strings can't merge?

Bindep [2] would let us add a build time-only test dependency on the gettext package that contains the command. But then we'd still need to fork a shell somewhere to run it, which I'm not sure is possible or recommended.

[1] http://lists.openstack.org/pipermail/openstack-i18n/2017-July/002960.html
[2] https://docs.openstack.org/infra/bindep/

Changed in tripleo:
milestone: pike-3 → pike-rc1
Changed in tripleo:
milestone: pike-rc1 → queens-1
Changed in tripleo:
milestone: queens-1 → queens-2
Changed in tripleo:
milestone: queens-2 → queens-3
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers