Add "update bouncer aliases" builder

RESOLVED FIXED

Status

Release Engineering
Release Automation: Other
RESOLVED FIXED
2 years ago
5 months ago

People

(Reporter: rail, Assigned: mtabara)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(6 attachments, 3 obsolete attachments)

58 bytes, text/x-review-board-request
rail
: review+
Details | Review
58 bytes, text/x-review-board-request
rail
: review+
Details | Review
58 bytes, text/x-review-board-request
rail
: review+
Details | Review
58 bytes, text/x-review-board-request
rail
: review+
Details | Review
58 bytes, text/x-review-board-request
rail
: review+
Details | Review
58 bytes, text/x-review-board-request
rail
: review+
Details | Review
(Reporter)

Description

2 years ago
The old process handles this in http://hg.mozilla.org/build/tools/file/tip/scripts/release/post-release.py and the corresponding configs are in http://hg.mozilla.org/build/buildbot-configs/file/tip/mozilla/release-firefox-mozilla-beta.py.template#l165

Basically, we need to update the *-latest aliases and point them to $product-$version.
(Assignee)

Comment 1

2 years ago
Created attachment 8731819 [details] [diff] [review]
Move post-release.py script from tools to intree mozharness scripts

First step to move the logic from tools to mozharness scripts.
Following-up will be patches to add builder and schedule this via BBB.
Attachment #8731819 - Flags: review?(rail)
(Assignee)

Comment 2

2 years ago
Couldn't find mozharneess/configs/releases files equivalent for (fennec,thunderbird)-beta-latest. Should I add some?
Flags: needinfo?(rail)
(Reporter)

Comment 3

2 years ago
(In reply to Mihai Tabara [:mtabara] from comment #2)
> Couldn't find mozharneess/configs/releases files equivalent for
> (fennec,thunderbird)-beta-latest. Should I add some?

Let's address those when we actually need them.
Flags: needinfo?(rail)
(Reporter)

Comment 4

2 years ago
Comment on attachment 8731819 [details] [diff] [review]
Move post-release.py script from tools to intree mozharness scripts

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

In overall it looks good to me!

Just some nits:

::: testing/mozharness/scripts/release/postrelease_bouncer_aliases.py
@@ +26,5 @@
> +    config_options = [
> +        [["--version"], {
> +            "dest": "version",
> +            "help": "Version of release, eg: 39.0b5",
> +        }],

I don't see the integration part of this script yet, but I assume we are going to use buildbot for this, because we don't have a way to talk to bouncer outside of scl3.

In this case you need a way to pass the version and the url runtime (we don't have release configs where you can get your version from). https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/scripts/release/updates.py#90 may give you some ideas how to have args (so you can run it locally) and be able to override them using buildbot properties.

@@ +63,5 @@
> +                              related_product_template, alias):
> +        from redo import retry
> +
> +        url = "%s/create_update_alias" % tuxedoServerUrl
> +        related_product = related_product_template % {"version": version}

I'd probably move this interpolation logic to the caller.

@@ +72,5 @@
> +                                                              url))
> +
> +        # Wrap the real call to hide credentials from retry's logging
> +        def do_update_bouncer_alias():
> +            r = requests.post(url, data=data, auth=auth, verify=False)

can you add some timeout here? 60s?
Attachment #8731819 - Flags: review?(rail)
(Assignee)

Comment 5

2 years ago
Created attachment 8734210 [details] [diff] [review]
Move post-release.py script from tools to intree mozharness scripts

First of an upcoming series of patches - the mozharness script based upon rail's review.
Attachment #8731819 - Attachment is obsolete: true
Attachment #8734210 - Flags: review?(rail)
(Reporter)

Comment 6

2 years ago
Comment on attachment 8734210 [details] [diff] [review]
Move post-release.py script from tools to intree mozharness scripts

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

Almost! :)

::: testing/mozharness/scripts/release/postrelease_bouncer_aliases.py
@@ +12,5 @@
> +"""
> +
> +import os
> +import sys
> +import requests

I think you cannot import requests here. It should be imported after you run virtualenv setup, like you did for redo.

@@ +67,5 @@
> +            else:
> +                self.warning("%s could not be found within buildprops" % prop)
> +                return
> +
> +    def _update_bouncer_alias(self, tuxedoServerUrl, auth, version,

version is unused in this function, kill it with fire! :)

@@ +86,5 @@
> +
> +        retry(do_update_bouncer_alias)
> +
> +    def update_bouncer_aliases(self):
> +        tuxedoServerUrl = self.config['tuxedo_server_url']

A nit. Everywhere in the script you use variable names lowercase_separated_by_underscores, except tuxedoServerUrl. Can you use tuxedo_server_url instead?

@@ +89,5 @@
> +    def update_bouncer_aliases(self):
> +        tuxedoServerUrl = self.config['tuxedo_server_url']
> +        credentials_file = os.path.join(os.getcwd(),
> +                                        self.config['credentials_file'])
> +        # TODO anyway readConfig from release.info under tools?

Feel free to remove this TODO line, there is no need to depend on a external repo for a single simple function.
Attachment #8734210 - Flags: review?(rail)
(Assignee)

Comment 7

2 years ago
Created attachment 8734333 [details] [diff] [review]
Move post-release.py script from tools to intree mozharness scripts

Refactoring.
Attachment #8734210 - Attachment is obsolete: true
Attachment #8734333 - Flags: review?(rail)
(Reporter)

Comment 8

2 years ago
Comment on attachment 8734333 [details] [diff] [review]
Move post-release.py script from tools to intree mozharness scripts


       _~
    _~ )_)_~
    )_))_))_)
    _!__!__!_
    \______t/
  ~~~~~~~~~~~~~ it!
Attachment #8734333 - Flags: review?(rail) → review+
(Assignee)

Comment 9

2 years ago
Created attachment 8734362 [details]
MozReview Request: Bug 1256063 - Add bouncer aliases for dev branch too. r=rail a=release DONTBUILD

Review commit: https://reviewboard.mozilla.org/r/42183/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/42183/
Attachment #8734362 - Flags: review?(rail)
(Reporter)

Comment 10

2 years ago
Comment on attachment 8734362 [details]
MozReview Request: Bug 1256063 - Add bouncer aliases for dev branch too. r=rail a=release DONTBUILD

https://reviewboard.mozilla.org/r/42183/#review38749
Attachment #8734362 - Flags: review?(rail) → review+
(Assignee)

Updated

2 years ago
Attachment #8734333 - Attachment is obsolete: true
(Reporter)

Updated

2 years ago
Keywords: leave-open
(Assignee)

Comment 14

2 years ago
Created attachment 8735193 [details]
MozReview Request: Bug 1256063 - Add update bouncer aliases builder. r=rail

Review commit: https://reviewboard.mozilla.org/r/42645/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/42645/
Attachment #8735193 - Flags: review?(rail)
(Assignee)

Comment 15

2 years ago
Created attachment 8735194 [details]
MozReview Request: Bug 1256063 - Add update bouncer aliases builder. r=rail

Review commit: https://reviewboard.mozilla.org/r/42649/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/42649/
Attachment #8735194 - Flags: review?(rail)
(Assignee)

Comment 16

2 years ago
Note to self: to investigate how and if I can test my buildbotcustom and buildbot-configs changes
Flags: needinfo?(rail)
(Assignee)

Comment 17

2 years ago
Created attachment 8735198 [details]
MozReview Request: Bug 1256063 - Enrich release graph with bouncer aliases context. r=rail

Review commit: https://reviewboard.mozilla.org/r/42653/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/42653/
Attachment #8735198 - Flags: review?(rail)
(Assignee)

Comment 18

2 years ago
Created attachment 8735199 [details]
MozReview Request: Bug 1256063 - Enrich config with bouncer aliases flag. r=rail

Review commit: https://reviewboard.mozilla.org/r/42655/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/42655/
Attachment #8735199 - Flags: review?(rail)
(Reporter)

Comment 19

2 years ago
Comment on attachment 8735193 [details]
MozReview Request: Bug 1256063 - Add update bouncer aliases builder. r=rail

https://reviewboard.mozilla.org/r/42645/#review39145

::: process/release.py:1941
(Diff revision 1)
> +        "extra_args": [
> +             "-c",  branch_config['postrelease_bouncer_aliases_config'][product],
> +        ]
> +    }
> +    # TODO: should we use release-{branch}-{product}_postrelease to keep naming
> +    # convention with buildbot?

I think the current name is better than vague "postrelease". No need to cargo cult old stuff. :)

Feel free to remove the TODO.
Attachment #8735193 - Flags: review?(rail) → review+
(Reporter)

Comment 20

2 years ago
Comment on attachment 8735194 [details]
MozReview Request: Bug 1256063 - Add update bouncer aliases builder. r=rail

https://reviewboard.mozilla.org/r/42649/#review39147
Attachment #8735194 - Flags: review?(rail) → review+
(Reporter)

Comment 21

2 years ago
Comment on attachment 8735198 [details]
MozReview Request: Bug 1256063 - Enrich release graph with bouncer aliases context. r=rail

https://reviewboard.mozilla.org/r/42653/#review39149
Attachment #8735198 - Flags: review?(rail) → review+
(Reporter)

Comment 22

2 years ago
https://reviewboard.mozilla.org/r/42649/#review39151

::: mozilla/config.py:2713
(Diff revision 1)
>  }
> +BRANCHES['mozilla-beta']['postrelease_bouncer_aliases_config'] = {
> +    "firefox": 'releases/bouncer_firefox_beta.py',
> +    # TODO - fennec
> +    "fennec": "",
> +}

Can you add this config variable to "date" too http://hg.mozilla.org/build/buildbot-configs/file/tip/mozilla/project_branches.py#l114
(Reporter)

Comment 23

2 years ago
Comment on attachment 8735199 [details]
MozReview Request: Bug 1256063 - Enrich config with bouncer aliases flag. r=rail

https://reviewboard.mozilla.org/r/42655/#review39153

::: mozilla/config.py:2733
(Diff revision 1)
>  BRANCHES['mozilla-beta']['platforms']['win32']['dep_signing_servers'] = 'release-signing'
>  BRANCHES['mozilla-beta']['platforms']['win64']['dep_signing_servers'] = 'release-signing'
>  # used by releasetasks
>  BRANCHES['mozilla-beta']['bouncer_enabled'] = True
>  BRANCHES['mozilla-beta']['postrelease_version_bump_enabled'] = True
> +BRANCHES['mozilla-beta']['postrelease_bouncer_aliases_enabled'] = True

Can you add this variabel to "date" too http://hg.mozilla.org/build/buildbot-configs/file/tip/mozilla/project_branches.py#l114
Attachment #8735199 - Flags: review?(rail) → review+
(Reporter)

Comment 24

2 years ago
(In reply to Mihai Tabara [:mtabara] from comment #16)
> Note to self: to investigate how and if I can test my buildbotcustom and
> buildbot-configs changes

After you address the comments above and enable the missing variables on "date", you can run CI tests and see it they pass.

A short summary of other steps:

* Land the patches
* reconfig
* Fix the releasetasks PR (rebase + test fixes)
* checkout your branch of releasetasks on bm83
* start a release process on date
Flags: needinfo?(rail)
(Reporter)

Comment 25

2 years ago
BTW, bug 1259526 is going to split the graph and may exclude some postrelease steps from the first graph. JFYI.
See Also: → bug 1259526
(Assignee)

Comment 26

2 years ago
Comment on attachment 8734362 [details]
MozReview Request: Bug 1256063 - Add bouncer aliases for dev branch too. r=rail a=release DONTBUILD

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/42183/diff/1-2/
Attachment #8734362 - Attachment description: MozReview Request: Bug 1256063 - Add update bouncer aliases builder. r=rail a=release DONTBUILD → MozReview Request: Bug 1256063 - Add bouncer aliases for dev branch too. r=rail a=release DONTBUILD
(Assignee)

Comment 27

2 years ago
Created attachment 8735964 [details]
MozReview Request: Bug 1256063 - Add bouncer aliases params for date too. r=rail

Review commit: https://reviewboard.mozilla.org/r/43015/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/43015/
Attachment #8735964 - Flags: review?(rail)
(Reporter)

Comment 28

2 years ago
Comment on attachment 8735964 [details]
MozReview Request: Bug 1256063 - Add bouncer aliases params for date too. r=rail

https://reviewboard.mozilla.org/r/43015/#review39559
Attachment #8735964 - Flags: review?(rail) → review+
(Assignee)

Comment 34

2 years ago
FWIW https://github.com/mozilla/releasetasks/pull/155 is the PR tracking the changes in releasetasks for this bug.
(Assignee)

Comment 36

2 years ago
We have successfully started using this with 46.0b7 - https://wiki.mozilla.org/Releases/Firefox_46.0b7/BuildNotes.
I'm closing this bug, will reopen if any issues come by.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Removing leave-open keyword from resolved bugs, per :sylvestre.
Keywords: leave-open
You need to log in before you can comment on or make changes to this bug.