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

Bug #1674011 reported by Julie Pichon
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Expired
Undecided
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.

Revision history for this message
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.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ui (master)

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

Changed in tripleo:
assignee: nobody → Julie Pichon (jpichon)
status: Triaged → In Progress
Revision history for this message
Ian Y. Choi (ianychoi) wrote : Re: String upload job failing with "missing end-quote"

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.

Revision history for this message
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.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ui (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ui (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/447670

Revision history for this message
Ian Y. Choi (ianychoi) wrote : Re: String upload job failing with "missing end-quote"

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ui (stable/ocata)

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
Revision history for this message
Julie Pichon (jpichon) wrote : Re: String upload job failing with "missing end-quote"

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)
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
Revision history for this message
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
Changed in tripleo:
milestone: queens-3 → queens-rc1
Changed in tripleo:
milestone: queens-rc1 → rocky-1
Changed in tripleo:
milestone: rocky-1 → rocky-2
Changed in tripleo:
milestone: rocky-2 → rocky-3
Changed in tripleo:
milestone: rocky-3 → rocky-rc1
Changed in tripleo:
milestone: rocky-rc1 → stein-1
Changed in tripleo:
milestone: stein-1 → stein-2
Revision history for this message
Emilien Macchi (emilienm) wrote : Cleanup EOL bug report

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (FUTURE, PIKE, QUEENS, ROCKY, STEIN).
  Valid example: CONFIRMED FOR: FUTURE

Changed in tripleo:
importance: Medium → Undecided
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.