update_maintenance_wiki.sh is truncating text content

RESOLVED FIXED

Status

Release Engineering
General
RESOLVED FIXED
3 years ago
21 days ago

People

(Reporter: pmoore, Assigned: pmoore)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
When we run end_to_end_reconfig.sh in the tools repo, the wiki page https://wiki.mozilla.org/ReleaseEngineering/Maintenance gets updated by script update_maintenance_wiki.sh.

Unfortunately, if the text on the page contains an '&', this ampersand and anything afterwards gets removed from the page.

For example, see: https://wiki.mozilla.org/index.php?title=ReleaseEngineering%2FMaintenance&diff=984831&oldid=984787

This page shows the diff between before and after update_maintenance_wiki.sh has posted to the Maintenance wiki page.

Here you see on the left side (prior to update):
	
* {{Bug|989533}} - Enable e10s on m-c, m-i & try. r=aki <- bbot-cfgs

But on the right side it stops at (after update has been performed):
	
* {{Bug|989533}} - Enable e10s on m-c, m-i 

As you see, it has stopped at the ampersand, and additionally, *all lines* after this line have disappeared on the right side (the updated post).

This is because we are not url-escaping the text, and in the http post, the & is used to separate variables, e.g. text=123&apply=now would post two variables, "text" and "apply" (as an example). When we url-escape the text content, it should treat the full text as content for the page.
(Assignee)

Comment 1

3 years ago
Created attachment 8433138 [details] [diff] [review]
Patch for update_maintenance_wiki.sh in tools repo

I've tested this patch, and successfully posted without losing content after the '&'. See: https://wiki.mozilla.org/index.php?title=ReleaseEngineering%2FMaintenance&diff=985208&oldid=984854

As you can see, it has added the new lines, and this time, not truncated the former content.
Attachment #8433138 - Flags: review?(coop)

Updated

3 years ago
Attachment #8433138 - Flags: review?(coop) → review+
(Assignee)

Comment 2

3 years ago
Comment on attachment 8433138 [details] [diff] [review]
Patch for update_maintenance_wiki.sh in tools repo

https://hg.mozilla.org/build/tools/rev/8845ef59ee82
Attachment #8433138 - Flags: checked-in+
(Assignee)

Comment 3

3 years ago
This has been working fine since landing the patch, so I'm closing the bug now.
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Component: Tools → General
Product: Release Engineering → Release Engineering
You need to log in before you can comment on or make changes to this bug.