If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

XML header not detected correctly in periodic file update script

RESOLVED FIXED

Status

Release Engineering
General
RESOLVED FIXED
a year ago
2 months ago

People

(Reporter: coop, Assigned: coop)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
philor noticed this was broken. At some point the header of the AMO version started including encoding information, and our script fails on that.

Patch incoming.
(Assignee)

Comment 1

a year ago
Created attachment 8804051 [details] [diff] [review]
[tools] Use xmllint to vlid downloaded xml artifacts

I checked, and we have xmllint available on the linux spot instances, so we might as well use it to give us more confidence about the state of the downloaded XML artifacts. Broke the check out into its own function should we need to change it in the future.

It's a shell patch, so tagging Hal for review.
Assignee: nobody → coop
Status: NEW → ASSIGNED
Attachment #8804051 - Flags: review?(hwine)
Comment on attachment 8804051 [details] [diff] [review]
[tools] Use xmllint to vlid downloaded xml artifacts

Review of attachment 8804051 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm functionally. One minor suggestion, but okay to land without taking.

::: scripts/periodic_file_updates/periodic_file_updates.sh
@@ +388,5 @@
> +   if [ ! -e ${XMLLINT} ]; then
> +       echo "ERROR: xmllint not found in PATH"
> +       exit 60
> +   fi
> +   ${XMLLINT} --format ${xmlfile} 1>/dev/null

No functional issue, but you might consider replacing '--format' with '--nonet --noout' - the first to preclude any entity-expansion-attack, the 2nd to save cpu cycles.
Attachment #8804051 - Flags: review?(hwine) → review+
(Assignee)

Comment 3

a year ago
https://hg.mozilla.org/build/tools/rev/92c3837580e05636185f7b7e7f104f8f57cf60f4
Bug 1312518 - Use xmllint to validate downloaded xml artifacts - r=hwine
(Assignee)

Comment 4

a year ago
(In reply to Hal Wine [:hwine] (use NI) from comment #2) 
> No functional issue, but you might consider replacing '--format' with
> '--nonet --noout' - the first to preclude any entity-expansion-attack, the
> 2nd to save cpu cycles.

Landed with the above suggestion, thanks!
"warning: failed to load external entity "blocklist_hg.xml""
(Assignee)

Comment 6

a year ago
https://hg.mozilla.org/build/tools/rev/91da3cc1621029fa08aca4da55c9e0f085804ed2
Bug 1312518 - fix variable substitution error - r=bustage
(Assignee)

Comment 7

a year ago
Success:

http://archive.mozilla.org/pub/firefox/tinderbox-builds/mozilla-central-linux64/mozilla-central-linux64-periodicupdate-bm70-build1-build1.txt.gz
https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&revision=ca5956d3e4de98ec9e1aff413c7a651757b3c300
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Component: Tools → General
Product: Release Engineering → Release Engineering

Updated

2 months ago
See Also: → bug 1389611
You need to log in before you can comment on or make changes to this bug.