Closed Bug 1083208 Opened 10 years ago Closed 9 years ago

postrelease should fail if we didn't push to mirrors

Categories

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

All
Android
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: massimo, Unassigned)

References

Details

(Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1953] )

Attachments

(1 file)

postrelease should fail if the push to mirror did not happen/succeeded.
 
see: https://bugzilla.mozilla.org/show_bug.cgi?id=1083127#c2
It would be good to catch this. Might just need a simple test on .../<stage-product>/releases/<version>/ existing prior to modifying the symlink.
Hi Nick,

here's a fix (tested on dev-master) but I am not sure the push_to_mirrors_dir value is the right one for production.
Attachment #8510542 - Flags: review?(nthomas)
Comment on attachment 8510542 [details] [diff] [review]
[tools] Bug 1083208 - postrelease should fail if we didn't push to mirrors.patch

>diff --git a/scripts/release/stage-tasks.py b/scripts/release/stage-tasks.py
>index 53b4a72..2d5cb19 100755
>--- a/scripts/release/stage-tasks.py
>+++ b/scripts/release/stage-tasks.py
>@@ -193,6 +193,19 @@ def deleteIndexFiles(cleanup_dir, stageServer, stageUsername,
> 
> def updateSymlink(productName, version, stageServer, stageUsername,
>                   stageSshKey, target):
>+    # step 1 check if we have already push to mirrors (bug 1083208)

Nit, s/push/pushed/

>+    push_to_mirrors_dir = '/pub/mozilla.org/%s/releases/%s' % (productName, version)

You can use 
   release_dir = makeReleasesDir(productName, version)
for this.

>+    try:
>+        # check if the remote dir exists
>+        run_remote_cmd('test -d %s' % push_to_mirrors_dir,

We normally write this as ['test', '-d', release_dir]

>+                       server=stageServer, username=stageUsername,
>+                       sshKey=stageSshKey)
>+    except CalledProcessError:
>+            log.error('ERROR: push to mirrors directory, %s, does not exists on %s'
>+                      % (push_to_mirrors_dir, stageServer))

Nit, 'ERROR: release directory, %s, doesn't exist on %s'.

r+ with those fixed and retested.
Attachment #8510542 - Flags: review?(nthomas) → review+
Comment on attachment 8510542 [details] [diff] [review]
[tools] Bug 1083208 - postrelease should fail if we didn't push to mirrors.patch

Thanks Nick.

Updated, tested in staging and landed.
Attachment #8510542 - Flags: checked-in+
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1953]
Status: NEW → RESOLVED
Closed: 9 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: