Closed Bug 974057 Opened 8 years ago Closed 8 years ago

Support modifying update-settings.ini when doing update verify

Categories

(Release Engineering :: Release Automation: Other, defect, P2)

x86
Windows XP
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nthomas, Assigned: nthomas)

References

Details

Attachments

(1 file)

Bug 908134 yielded 27.0 in the patcher config for beta, which means it's in the update verify configs too. We have to modify update-settings.ini before applying the update, otherwise the updater will expect a release tagged mar and barf on the beta tagged one it's given.

SOURCE DIRECTORY ../../update
DESTINATION DIRECTORY .
failed: 22
calling QuitProgressUI
FAIL: update status was not succeeded: failed: 22
FAIL: check_updates returned failure for WINNT_x86-msvc downloads/Firefox Setup 27.0.exe vs. downloads/Firefox Setup 28.0b2.exe: 1

This only affects windows, since we don't check mar signing on other platforms (yet!). Attachment 8371290 [details] [diff] has support in the update verify harness, need to add support to the config bumper.
* adds mar-channel-ids to release blocks in patcher config (not used for snippets)
* pass that through into update verify configs as mar_channel_IDs
* make sure chunking passes it through too
* teach the update-verify harness to modify update-settings.ini if mar_channel_IDs is set
* update tests (yay!)

The net effect of this in the landed config files is changes like
  https://diff.pastebin.mozilla.org/4352224
ie appending
  mar_channel_IDs="firefox-mozilla-beta,firefox-mozilla-release"
to the 27.0 line.
Attachment #8379580 - Flags: review?(bhearsum)
Comment on attachment 8379580 [details] [diff] [review]
[tools] Allow modifying update-settings.ini from patcher config

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

This patch looks scary than it is, I think. Mostly you're just passing things down to update verify AFAICT. It all looks fine to me, but I wouldn't mind seeing a buildbot run if you have one.

::: release/common/unpack.sh
@@ +96,5 @@
>  
> +    if [ ! -z $update_settings_string ]; then
> +       echo "Modifying update-settings.ini"
> +       cat  $update_settings_file | sed -e "s/^ACCEPTED_MAR_CHANNEL_IDS.*/ACCEPTED_MAR_CHANNEL_IDS=${update_settings_string}/" > ${update_settings_file}.new
> +       diff -u $update_settings_file{,.new}

This diff is here so we'll know what the original file looked like, I guess? Is this additional diff output going to cause any confusion when there are failures? If this ends up above the updater.exe invocation it should be well out of the way.

::: release/patcher-configs/mozBeta-branch-patcher2.cfg
@@ +2596,5 @@
>                      ja-JP-mac   mac
>                  </exceptions>
>                  extension-version   27.0
>                  locales   ach af an ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de el en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa ff fi fr fy-NL ga-IE gd gl gu-IN he hi-IN hr hu hy-AM id is it ja ja-JP-mac kk km kn ko ku lij lt lv mai mk ml mr nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta te th tr uk vi xh zh-CN zh-TW zu
> +                mar-channel-ids   firefox-mozilla-beta,firefox-mozilla-release

Are we going to have to add this by hand once per cycle?
Attachment #8379580 - Flags: review?(bhearsum) → review+
(In reply to Ben Hearsum [:bhearsum] from comment #2)
> This patch looks scary than it is, I think. Mostly you're just passing
> things down to update verify AFAICT. It all looks fine to me, but I wouldn't
> mind seeing a buildbot run if you have one.

http://dev-master1.build.mozilla.org:8710/builders/release-mozilla-beta-win32_update_verify_3%2F6/builds/2
http://dev-master1.build.mozilla.org:8710/builders/release-mozilla-beta-linux_update_verify_3%2F6/builds/0
http://dev-master1.build.mozilla.org:8710/builders/release-mozilla-beta-linux64_update_verify_3%2F6/builds/0
http://dev-master1.build.mozilla.org:8710/builders/release-mozilla-beta-macosx64_update_verify_3%2F6/builds/0
 
> This diff is here so we'll know what the original file looked like, I guess?

I wanted to explicitly log the modification of the source archive. If it's too noisy we can take it out.

> Is this additional diff output going to cause any confusion when there are
> failures? If this ends up above the updater.exe invocation it should be well
> out of the way.

Should be OK I think. Sample output:

[ last wget ]

Modifying update-settings.ini
--- bin/update-settings.ini	2014-01-27 20:05:47 -0800
+++ bin/update-settings.ini.new	2014-02-23 18:20:52 -0800
@@ -2,4 +2,4 @@
 ; Do not modify this file.
 
 [Settings]
-ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-release
+ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-beta,firefox-mozilla-release
 
SOURCE DIRECTORY ../../update
DESTINATION DIRECTORY .
...

> ::: release/patcher-configs/mozBeta-branch-patcher2.cfg
> > +                mar-channel-ids   firefox-mozilla-beta,firefox-mozilla-release
> 
> Are we going to have to add this by hand once per cycle?

Should be able to automate it, this one is a catch up.
Comment on attachment 8379580 [details] [diff] [review]
[tools] Allow modifying update-settings.ini from patcher config

https://hg.mozilla.org/build/tools/rev/85fece495d37
Attachment #8379580 - Flags: checked-in+
This will be used in Firefox 28.0b5 today.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.