Closed Bug 1036345 Opened 10 years ago Closed 10 years ago

Send ship-it email for Thunderbird on a different address

Categories

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

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Sylvestre, Assigned: Sylvestre)

Details

(Whiteboard: [shipit])

Attachments

(2 files, 3 obsolete files)

      No description provided.
Attached patch notif_tb.diff (obsolete) — Splinter Review
Update the puppet configuration to store the TB drivers ML
Update release-runner to manage the thunderbird case.
Attachment #8453100 - Flags: review?(rail)
Attachment #8453100 - Flags: review?(bhearsum)
Attachment #8453056 - Flags: review?(rail)
Attachment #8453056 - Flags: review?(bhearsum)
The email sent is:
----
Comment:
tb test comment

A new build has been submitted through ship-it:
Mozilla commit: https://hg.mozilla.org/mozilla-beta/rev/moz12323223
Comm commit: https://hg.mozilla.org/releases/comm-beta/rev/com12323223

The email address
----
Comment on attachment 8453100 [details] [diff] [review]
0002-Manage-the-thunberbird-case.patch

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

::: buildfarm/release/release-runner.py
@@ +211,5 @@
>  
> +    if r['product'] == "thunderbird":
> +        # Special case for thunderbird. It relies on two separate repositories
> +        # Provide both in the email
> +        contentMail += "Mozilla commit: https://hg.mozilla.org/mozilla-beta/rev/" + r["mozillaRevision"] + "\n"

This doesn't sound right. For release builds it's supposed to be mozilla-esrXX. I bet we can read these values from the release configs. Hmm, actually we can read a lot of variables from the release configs, even email addresses...

You can construct this part using releaseConfig['sourceRepositories'] dict from http://hg.mozilla.org/build/buildbot-configs/file/8ae8163fed6a/mozilla/release-thunderbird-comm-esr24.py#l42. It'd be the same for Firefox and Fennec, no need to match product name (and probably lower() it).

@@ +263,4 @@
>      notify_from = get_config(config, 'release-runner', 'notify_from', None)
>      notify_to = get_config(config, 'release-runner', 'notify_to', None)
>      notify_to_release = get_config(config, 'release-runner', 'notify_to_release', None)
> +    notify_to_release_tb = get_config(config, 'release-runner', 'notify_to_release_tb', None)

Can you refactor the code to read notify_to_release from the release configs? 

As an example you can see how we access "l10nRevisionFile" variable from http://hg.mozilla.org/build/buildbot-configs/file/8ae8163fed6a/mozilla/release-firefox-mozilla-release.py#l76 in http://hg.mozilla.org/build/tools/file/67cca6c691a6/buildfarm/release/release-runner.py#l134

@@ +270,5 @@
>          notify_to = [x.strip() for x in notify_to.split(',')]
>      if isinstance(notify_to_release, basestring):
>          notify_to_release = [x.strip() for x in notify_to_release.split(',')]
> +    if isinstance(notify_to_release_tb, basestring):
> +        notify_to_release_tb = [x.strip() for x in notify_to_release_tb.split(',')]

This can be read form release configs as well. We added notify_to because it's not there and we didn't want to spam r-d@ in case of failure.

@@ +305,5 @@
>                      log.info('Got a new release request: %s' % release)
>  
> +                    if release['product'] == "thunderbird":
> +                        # Dealing with Thundebird. Different email address
> +                        notify_to_release = notify_to_release_tb

And this block would go away! :)
Attachment #8453100 - Flags: review?(rail) → review-
Comment on attachment 8453056 [details] [diff] [review]
notif_tb.diff

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

We won't need this patch if you refactor the code as I suggested above. You can even delete some variables!
Attachment #8453056 - Flags: review?(rail)
(In reply to Rail Aliiev [:rail] from comment #4)
> Hmm,actually we can read a lot of variables from the release configs, even email
> addresses...
Yeh. That would be better. However, the release configs are created after various calls and I would like to send the email as soon as possible (and the release configs do not exist at this time). Please, correct me I am wrong or if you know a workaround :)
Flags: needinfo?(rail)
The release configs are available anytime we just update some values (see http://hg.mozilla.org/build/buildbot-configs/file/261a7b6d5af3/mozilla/release-firefox-mozilla-release.py.template Jinja2 template used to update them). The fields containing emails are static. Even though "sourceRepositories" looks dynamic it's quite static (we don't use different repos), so we can use the variables from the previously generated configs (http://hg.mozilla.org/build/buildbot-configs/file/261a7b6d5af3/mozilla/release-firefox-mozilla-release.py).
Flags: needinfo?(rail)
Comment on attachment 8453056 [details] [diff] [review]
notif_tb.diff

Rail is doing a good job reviewing this already, and I'm pretty busy. I'll defer to him.
Attachment #8453056 - Flags: review?(bhearsum) → review?(rail)
Attachment #8453100 - Flags: review?(bhearsum)
Comment on attachment 8453056 [details] [diff] [review]
notif_tb.diff

With Comment 7 we won't need this patch.
Attachment #8453056 - Flags: review?(rail)
Attachment #8453056 - Attachment is obsolete: true
Attachment #8453100 - Attachment is obsolete: true
Attachment #8456101 - Flags: review?(rail)
In this patch, I updated the puppet manifests to remove the notify_to_release address
Attachment #8456103 - Flags: review?(rail)
Comment on attachment 8456101 [details] [diff] [review]
0001-Bug-1036345-Manage-the-thunberbird-case-use-release-.patch

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

::: buildfarm/release/release-runner.py
@@ +203,5 @@
>      # Send an email to the mailing after the build
>      contentMail = ""
> +    sources = readReleaseConfig(cfgFile)['sourceRepositories']
> +    To = readReleaseConfig(cfgFile)['ImportantRecipients']
> +    productName = readReleaseConfig(cfgFile)['productName']

Feel free to change the code when you land to something like:

release_config = readReleaseConfig(cfgFile)
sources = release_config['sourceRepositories']
To = release_config['ImportantRecipients']
...

just to avoid extra IO
Attachment #8456101 - Flags: review?(rail) → review+
Attachment #8456103 - Flags: review?(rail) → review+
Comment on attachment 8456101 [details] [diff] [review]
0001-Bug-1036345-Manage-the-thunberbird-case-use-release-.patch

I implemented the change about the readReleaseConfig and pushed it:
https://hg.mozilla.org/build/tools/rev/82fb9d827b24

Thanks
Attachment #8456101 - Flags: checked-in+
Assignee: nobody → sledru
This is in production now.
Comment on attachment 8456101 [details] [diff] [review]
0001-Bug-1036345-Manage-the-thunberbird-case-use-release-.patch

Backed out https://hg.mozilla.org/build/tools/rev/75151f35fc2f

Traceback (most recent call last):
  File "release-runner.py", line 449, in <module>
    main(options)
  File "release-runner.py", line 315, in main
    sendMailRD(smtp_server, notify_from, cfgFile, release)
  File "release-runner.py", line 216, in sendMailRD
    contentMail += "Mozilla commit: https://hg.mozilla.org/" + sources['mozilla']['path']+"/rev/" + sources['mozilla']['revision'] + "\n"
KeyError: 'mozilla'
Attachment #8456101 - Flags: checked-in+ → checked-in-
Something is wrong, but I cannot see anything now. :(
The config file is likely to miss some information. Do you have it? Do you have the log? Thanks
The configs are under version control and this is what we had at that point: http://hg.mozilla.org/build/buildbot-configs/file/73a4e2affc70/mozilla/release-firefox-mozilla-release.py

In any case, we shouldn't use hardcoded "mozilla", see http://hg.mozilla.org/build/buildbot-configs/file/73a4e2affc70/mozilla/release-fennec-mozilla-release.py#l35. I'd just iterate the sourceRepositories dict and construct the urls. You wouldn't need a special case for Thunderbird in this case.

The log file is below:

2014-07-16 17:41:14,378 - INFO - Starting new HTTPS connection (1): ship-it.mozilla.org
2014-07-16 17:41:14,505 - DEBUG - "GET /releases/Fennec-31.0b11-build1 HTTP/1.1" 200 6727
2014-07-16 17:41:14,506 - DEBUG - Request to https://ship-it.mozilla.org/releases/Firefox-31.0-build2
2014-07-16 17:41:14,506 - DEBUG - Data sent: None
2014-07-16 17:41:14,537 - DEBUG - "GET /releases/Firefox-31.0-build2 HTTP/1.1" 200 2421
2014-07-16 17:41:14,538 - INFO - Got a new release request: {'status': 'Pending', 'product': 'fennec', 'submittedAt': '2014-07-17T00:31:58+00:00', 'name': 'Fennec-31.0b11-build1', 'dashboardCheck': False, 'ready': True, 'buildNumber': 1, 'mozillaRelbranch': None, 'l10nChangesets': '{\r\n  "ar": {\r\n    "revision": "9c4b301989ca",\r\n    "platforms": ["android"]\r\n  },\r\n  "as": {\r\n    "revision": "734774bdb032",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "be": {\r\n    "revision": "b4c9f7da6ac6",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "bn-IN": {\r\n    "revision": "8cda4a9e805a",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "ca": {\r\n    "revision": "f2df54a74d89",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "cs": {\r\n    "revision": "788b51b303fe",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "cy": {\r\n    "revision": "53f662270dc2",\r\n    "platforms": ["android"]\r\n  },\r\n  "da": {\r\n    "revision": "ed146c91b2ad",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "de": {\r\n    "revision": "4a4737f002f1",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "en-GB": {\r\n    "revision": "87bc5894cf37",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "es-AR": {\r\n    "revision": "3a78bfbce239",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "es-ES": {\r\n    "revision": "64787f2f6b84",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "es-MX": {\r\n    "revision": "94cf8101d558",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "et": {\r\n    "revision": "175c4dcc245b",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "fi": {\r\n    "revision": "3c4fe90f269b",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "fr": {\r\n    "revision": "a0754aca91d1",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "fy-NL": {\r\n    "revision": "0bb46089e086",\r\n    "platforms": ["android"]\r\n  },\r\n  "ga-IE": {\r\n    "revision": "809acd38d181",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "gl": {\r\n    "revision": "6a40cee822a6",\r\n    "platforms": ["android"]\r\n  },\r\n  "gu-IN": {\r\n    "revision": "5e24779c41ef",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "hi-IN": {\r\n    "revision": "804a00c3f6fd",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "hu": {\r\n    "revision": "f468e8ca41ce",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "id": {\r\n    "revision": "82f937547ad0",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "it": {\r\n    "revision": "7da3326e374e",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "ja": {\r\n    "revision": "2d0475fc8fcf",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "kn": {\r\n    "revision": "df78cf8dae85",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "ko": {\r\n    "revision": "5715dcdd338f",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "lt": {\r\n    "revision": "def7c3341f63",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "lv": {\r\n    "revision": "bf089243bb13",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "mai": {\r\n    "revision": "b2abd3161b6e",\r\n    "platforms": ["android"]\r\n  },\r\n  "ml": {\r\n    "revision": "e00e2c3298ea",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "mr": {\r\n    "revision": "a59a986d757b",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "ms": {\r\n    "revision": "86a29b699bf7",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "nb-NO": {\r\n    "revision": "b1d7ecff7e73",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "nl": {\r\n    "revision": "9876104288b9",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "or": {\r\n    "revision": "511fbcc33a3a",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "pa-IN": {\r\n    "revision": "9bf33c80fb2a",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "pl": {\r\n    "revision": "569e8aa3c5b3",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "pt-BR": {\r\n    "revision": "34f0368ec6ef",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "pt-PT": {\r\n    "revision": "04da0167acae",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "ro": {\r\n    "revision": "cdbf50ab417c",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "ru": {\r\n    "revision": "1d434e8e1bbb",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "sk": {\r\n    "revision": "fbe261b00c22",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "sl": {\r\n    "revision": "3c7c10222daf",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "sv-SE": {\r\n    "revision": "b0b7b9d7c6a6",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "ta": {\r\n    "revision": "cddf33279fd3",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "te": {\r\n    "revision": "0aed11b928e7",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "th": {\r\n    "revision": "b5a7ec14fabf",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "tr": {\r\n    "revision": "0bfda1bfcf56",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "uk": {\r\n    "revision": "2aa3900f5f2d",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "zh-CN": {\r\n    "revision": "d676d62579c5",\r\n    "platforms": ["android", "android-multilocale"]\r\n  },\r\n  "zh-TW": {\r\n    "revision": "5710f029fd6a",\r\n    "platforms": ["android", "android-multilocale"]\r\n  }\r\n}', 'version': '31.0b11', 'branch': 'releases/mozilla-beta', 'submitter': 'lsblakk@mozilla.com', 'mozillaRevision': '1772e55568e4', 'complete': False}
2014-07-16 17:41:14,538 - INFO - Got a new release request: {'status': 'Pending', 'product': 'firefox', 'submittedAt': '2014-07-17T00:36:21+00:00', 'submitter': 'lsblakk@mozilla.com', 'complete': False, 'promptWaitTime': None, 'dashboardCheck': False, 'partials': '30.0build2,28.0build2,29.0.1build2', 'buildNumber': 2, 'mozillaRelbranch': None, 'l10nChangesets': 'ach \t59950fdabc57\r\naf \t7195e324d286\r\nan \t6c7fc5b4acf7\r\nar \t54a30f23b034\r\nas \t734774bdb032\r\nast \t4c58edaa081d\r\nbe \tb4c9f7da6ac6\r\nbg \t48d242443ec5\r\nbn-BD \tab9122b22e7b\r\nbn-IN \t8cda4a9e805a\r\nbr \t425b02d77afe\r\nbs \t8fc6fcbbced3\r\nca \tf2df54a74d89\r\ncs \t788b51b303fe\r\ncsb \t1d7c7a2e3927\r\ncy \tf019096131a5\r\nda \ted146c91b2ad\r\nde \t4a4737f002f1\r\nel \t22b959c9a739\r\nen-GB \t87bc5894cf37\r\nen-ZA \t3946c7c61d44\r\neo \te9004f19fce8\r\nes-AR \t3a78bfbce239\r\nes-CL \t36829ba1e148\r\nes-ES \t64787f2f6b84\r\nes-MX \tdb9dd0b4ae99\r\net \t175c4dcc245b\r\neu \tdd7ad8e1782b\r\nfa \t189c4346605f\r\nff \t75cd2b3be6c6\r\nfi \t3c4fe90f269b\r\nfr \tba4bb5267a95\r\nfy-NL \tc5b6cfd41ddf\r\nga-IE \t809acd38d181\r\ngd \t473b6f54e2f4\r\ngl \t3676dfac7743\r\ngu-IN \t6cdd74be7b45\r\nhe \tfb6de4953a84\r\nhi-IN \t2cced88d2a9e\r\nhr \td80d3115aed0\r\nhsb \t7545c4196479\r\nhu \tf468e8ca41ce\r\nhy-AM \t8d716b3e3bf1\r\nid \t82f937547ad0\r\nis \te79f02c98d88\r\nit \t15a9a74adb37\r\nja \t3da0fa5d2cd7\r\nja-JP-mac \taea018b25b9d\r\nkk \tc4e812a34cf8\r\nkm \t157c962b6a57\r\nkn \te12cd39c590c\r\nko \t4cadbc5439fb\r\nku \ta1a811bf17f7\r\nlij \td6d009b4b3e3\r\nlt \tdef7c3341f63\r\nlv \tbf089243bb13\r\nmai \t2238b9975f69\r\nmk \tffdf2a789185\r\nml \t8ada92688746\r\nmr \t224401f646ed\r\nms \t7ae9bcd9c298\r\nnb-NO \t04872aa15b78\r\nnl \t9876104288b9\r\nnn-NO \ta69a9a650ebf\r\nor \t511fbcc33a3a\r\npa-IN \t33eb57382037\r\npl \t569e8aa3c5b3\r\npt-BR \t77c2c2041b01\r\npt-PT \t9c4213882f2d\r\nrm \t2ca6a4fb6fcf\r\nro \tcd2cad15a260\r\nru \t1d434e8e1bbb\r\nsi \t371c4bb15732\r\nsk \t5a11ca9b4d44\r\nsl \t3c7c10222daf\r\nson \t456ba51771d8\r\nsq \t74b41a47b3c4\r\nsr \t3edc27028a68\r\nsv-SE \tef325f403fe3\r\nta \tcddf33279fd3\r\nte \t4734e5e77d52\r\nth \t03c6f45c9979\r\ntr \t0bfda1bfcf56\r\nuk \t2aa3900f5f2d\r\nvi \te5e5cef6c0ee\r\nxh \t7d88d1363dab\r\nzh-CN \t6b540acea0b1\r\nzh-TW \t5710f029fd6a\r\nzu \tf3aac54b9951', 'version': '31.0', 'branch': 'releases/mozilla-release', 'ready': True, 'mozillaRevision': '2552ea57100d', 'name': 'Firefox-31.0-build2'}
2014-07-16 17:41:14,553 - DEBUG - Releasing lock: /builds/releaserunner/tools/buildfarm/release/.release-runner.lock
Traceback (most recent call last):
  File "release-runner.py", line 449, in <module>
    main(options)
  File "release-runner.py", line 315, in main
    sendMailRD(smtp_server, notify_from, cfgFile, release)
  File "release-runner.py", line 216, in sendMailRD
    contentMail += "Mozilla commit: https://hg.mozilla.org/" + sources['mozilla']['path']+"/rev/" + sources['mozilla']['revision'] + "\n"
KeyError: 'mozilla'
Actually, it is a good news that it failed. The new code is more flexible and will transparently handle new repo.
Attachment #8456101 - Attachment is obsolete: true
Attachment #8458713 - Flags: review?(rail)
I mixed two commits. My bad. Working on it.
(no, that is OK actually, sorry :(
Comment on attachment 8458713 [details] [diff] [review]
manage-tb-case-2.diff

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

Ship it!
Attachment #8458713 - Flags: review?(rail) → review+
Comment on attachment 8458713 [details] [diff] [review]
manage-tb-case-2.diff

Same player try again:
https://hg.mozilla.org/build/tools/rev/197de607c8ee
Attachment #8458713 - Flags: checked-in+
Deployed on bm81
Something went wrong with Firefox32.0b1-build2, the email said:

A new build has been submitted through ship-it:
mozilla commit: https://hg.mozilla.org/releases/mozilla-beta/rev/76dd853f227b

76dd853f227b was build1, should have been 6a87b4799b21.
Sorry, I'll open a different bug for that.
Comment on attachment 8456103 [details] [diff] [review]
remove_notify_to_release.diff

Landed on default and production.
Attachment #8456103 - Flags: checked-in+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: