[tcmigration] version bump script should handle Fennec releases as well

RESOLVED FIXED

Status

enhancement
P1
normal
RESOLVED FIXED
2 years ago
Last year

People

(Reporter: mtabara, Assigned: mtabara)

Tracking

unspecified
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(3 attachments)

Fennec and Firefox use the same files for versions. There are possibility for race conditions here...

https://hg.mozilla.org/mozilla-central/file/tip/testing/mozharness/scripts/release/postrelease_version_bump.py#l163 takes the existing version and replaces it with the desired one. It should work if Firefox and Fennec try to set the same version, but it may not work in this scenario:

1) Firefox 100.0.1 build starts, next_version = 100.0.2
2) Fennec 100.0.2 build starts (for some reason), next_version = 100.0.3
3) Fennec bumps the version to 100.0.3
4) Firefox "bumps" the version to 100.0.2 (booom)

We should a guard to prevent version downgrades here.
Blocks: 1344248
Attachment #8846145 - Flags: review?(rail) → review+
Comment on attachment 8846146 [details]
Bug 1344229 - add bb configs for bump versioning and marking release as shipped.

https://reviewboard.mozilla.org/r/119234/#review121184
Attachment #8846146 - Flags: review?(rail) → review+
Priority: P3 → P1
Comment on attachment 8846145 [details] [review]
Bugs 1344229, 1344248, 1344225 - enable version bump and mark release as shipped. r=rail

https://github.com/mozilla/releasetasks/commit/d477f2ce4d53c3524c8fdcbb62373e43e1c540b7
Attachment #8846145 - Flags: checked-in+
Comment on attachment 8846177 [details]
Bug 1344229 - alter version bumping to prevent race conditions.  a=release DONTBUILD

https://reviewboard.mozilla.org/r/119270/#review121212

::: testing/mozharness/scripts/release/postrelease_version_bump.py:165
(Diff revision 1)
>          for f in self.config["version_files"]:
>              curr_version = ".".join(
>                  self.get_version(dirs['abs_gecko_dir'], f["file"]))
> +
> +            curr_major, curr_minor = curr_version.split('.', 1)
> +            next_major, next_minor = self.config['next_version'].split('.', 1)

I wouldn't assume any versioning schema here. Splitting by "." and comparing the lists should be sufficient in this case. something like:
```python
curr_version = self.get_version(dirs['abs_gecko_dir'], f["file"])
next_version = self.config['next_version'].split('.')

if next_version <= curr_version:
    self.warning(msg)
    continue
else:
    curr_version = ".".join(curr_version)
    next_version = ".".join(next_version)
    self.replace(os.path.join(dirs['abs_gecko_dir'], f["file"]),
    curr_version, next_version)
```
Attachment #8846177 - Flags: review?(rail) → review-
Comment on attachment 8846177 [details]
Bug 1344229 - alter version bumping to prevent race conditions.  a=release DONTBUILD

https://reviewboard.mozilla.org/r/119270/#review121214
Attachment #8846177 - Flags: review?(rail) → review+
Pushed by mtabara@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/598fdacca0f5
alter version bumping to prevent race conditions. r=rail a=release DONTBUILD
Comment on attachment 8846177 [details]
Bug 1344229 - alter version bumping to prevent race conditions.  a=release DONTBUILD

https://hg.mozilla.org/integration/mozilla-inbound/rev/598fdacca0f5
https://hg.mozilla.org/releases/mozilla-beta/rev/c32166f8c0c4
https://hg.mozilla.org/projects/jamun/rev/2fd55904ea05
reminder for myself to uplift to aurora as well once it lands to central.
Flags: needinfo?(mtabara)
Attachment #8846177 - Flags: checked-in+
See Also: → 1346465
https://hg.mozilla.org/mozilla-central/rev/598fdacca0f5
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
(In reply to Mihai Tabara [:mtabara]⌚️GMT from comment #12)
> Comment on attachment 8846177 [details]
> Bug 1344229 - alter version bumping to prevent race conditions.  a=release
> DONTBUILD
> 
> https://hg.mozilla.org/integration/mozilla-inbound/rev/598fdacca0f5
> https://hg.mozilla.org/releases/mozilla-beta/rev/c32166f8c0c4
> https://hg.mozilla.org/projects/jamun/rev/2fd55904ea05
> reminder for myself to uplift to aurora as well once it lands to central.

https://hg.mozilla.org/releases/mozilla-aurora/rev/b2d5406972e6
Flags: needinfo?(mtabara)
Keywords: leave-open
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Blocks: 1346892
Depends on: 1346899
A successful job for version bumping ran last week - https://tools.taskcluster.net/task-group-inspector/#/37sdAbs6TDW0vM6voulIMA/CBOdUjbIRIi2guTYIsrpVQ?_k=3tsu81 

I think we can close this.
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
See Also: → 1354496
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.