Skip to content

Commit

Permalink
134 cleaner schedule fix
Browse files Browse the repository at this point in the history
- Fix schedule in the public API
- Fix milestones view with less hacky solution
- Fix last beta logs calculation in the Beta page
- Fix ICS broken for 134
  • Loading branch information
pascalchevrel committed Dec 12, 2024
1 parent 3f1c067 commit 6b458f9
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 16 deletions.
12 changes: 9 additions & 3 deletions app/classes/ReleaseInsights/Beta.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function getLogEndpoints(): array
continue;
}

if ($this->release ==134 && $beta_number == 6) {
if ($this->release == 134 && $beta_number == 6) {
// TODO: remove this condition after 134 is shipped
// We went straight from beta 5 to beta 7
$beta_start = 'FIREFOX_134_0b5_RELEASE';
Expand All @@ -92,6 +92,13 @@ public function getLogEndpoints(): array
? (string) BETA . '.0rc0' // @codeCoverageIgnore
: (string) BETA . '.0b' . (string) ($beta_number + 1);

if ($this->release == 134) {
// This is what landed on mozilla-beta after the last beta but before the merge and RC1
$beta_version = ($beta_number == $this->number_betas + 1)
? (string) BETA . '.0rc0' // @codeCoverageIgnore
: (string) BETA . '.0b' . (string) ($beta_number + 1);
}

$hg_end_points[$beta_version] =
'releases/mozilla-beta/json-pushes?fromchange='
. $beta_start
Expand Down Expand Up @@ -315,5 +322,4 @@ public function RCStatus() : array

return [false, 0];// @codeCoverageIgnore
}
}

}
10 changes: 10 additions & 0 deletions app/classes/ReleaseInsights/Release.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ public function getFutureSchedule(): array
];
}

if ($this->version->int == 134) {
#️⃣ TODO: remove this conditional once 134.0 has shipped
$schedule['beta_10'] = $schedule['beta_9'];
$schedule['beta_9'] = $schedule['beta_8'];
$schedule['beta_8'] = $schedule['beta_7'];
$schedule['beta_7'] = $schedule['beta_6'];
unset($schedule['beta_6']);
// $schedule += ['beta_10' => '2024-12-13 13:00:00+00:00'];
}

if (! in_array($this->version->int, $this->no_planned_dot_releases)) {
if ($this->version->normalized === '146.0') {
$schedule += ['planned_dot_release' => $date($release->modify('December 18 00:00'))];
Expand Down
7 changes: 6 additions & 1 deletion app/models/ics_release_schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@
];

// Add end of early betas to the schedule
$releases['early_beta_end'] = $releases['beta_6'];
if ((int) $requested_version == 134) {
$releases['early_beta_end'] = $releases['beta_7'];
} else {
$releases['early_beta_end'] = $releases['beta_6'];
}

$release_schedule_labels['early_beta_end'] = 'End of EARLY_BETA_OR_EARLIER (post beta 6)';

// Add draft release notes to the schedule
Expand Down
24 changes: 12 additions & 12 deletions app/views/templates/future_release.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,16 @@
{% set extra = ' <small class="badge bg-warning text-dark fw-semibold">Last early beta</small>' %}
{% endif %}

{% if key == 'beta_9' %}
{% if release == '134' and key == 'beta_7' %}
{% set extra = ' <small class="badge bg-warning text-dark fw-semibold">Last early beta</small>' %}
{% endif %}

{% if release == '134' and key == 'beta_10'%}
{% set cycle_descriptions = cycle_descriptions|merge({'beta_10': 'On a regular 4 weeks beta cycle, this is the last beta and thus the end of beta uplifts, including <a href="https://firefox-source-docs.mozilla.org/bug-mgmt/processes/security-approval.html">security bugs</a> for this release (<code>sec-approval+</code> on Bugzilla). Build starts at 13:00 UTC.'}) %}
{% set extra = ' <small class="badge bg-warning text-dark fw-semibold">Last beta uplifts <span class="fw-light">(sec-approval request deadline)</span></small>' %}
{% endif %}

{% if key == 'beta_9' and release != '134' %}
{% set extra = ' <small class="badge bg-warning text-dark fw-semibold">Last beta uplifts <span class="fw-light">(sec-approval request deadline)</span></small>' %}
{% endif %}

Expand All @@ -291,7 +300,7 @@
{% elseif key starts with 'beta' and key != 'beta_1' %}
<th class="text-muted fw-light">
<details>
{% if release == '134' and key == 'beta_6' %}
{% if release == '134' and key == 'beta_7' %}
<summary><a href="https://hg.mozilla.org/releases/mozilla-beta/pushloghtml?fromchange=FIREFOX_{{constant('FIREFOX_BETA')|number_format}}_0b{{ key|replace({'beta_':''}) -1 }}_RELEASE&amp;tochange=FIREFOX_{{constant('FIREFOX_BETA')|number_format}}_0b{{ key|replace({'beta_':''}) }}_RELEASE" class="link-secondary">
<strike>Beta 6</strike>
<b class="fw-semibold">Beta 7</b>
Expand All @@ -303,9 +312,6 @@
</span>
Go to build{{ extra|raw }}
</a></summary>
{% elseif release == '134' and cycle_labels[key]|raw starts with 'Beta' %}
{% set temp_beta_number = 'beta_' ~ (key|trim('beta_', 'left') + 1) %}
<summary>{{ cycle_labels[temp_beta_number]|raw }}{{ extra|raw }}</summary>
{% else %}
<summary><a href="https://hg.mozilla.org/releases/mozilla-beta/pushloghtml?fromchange=FIREFOX_{{constant('FIREFOX_BETA')|number_format}}_0b{{ key|replace({'beta_':''}) -1 }}_RELEASE&amp;tochange=FIREFOX_{{constant('FIREFOX_BETA')|number_format}}_0b{{ key|replace({'beta_':''}) }}_RELEASE" class="link-secondary" title="Mercurial changelog">{{ cycle_labels[key]|raw }}{{ extra|raw }}</a></summary>
{% endif %}
Expand All @@ -324,14 +330,8 @@
{% else %}
<th class="{{ table_header }}">
<details{{ next_milestone and channel in ['nightly', 'beta'] ? ' open' }}>

{% if release == '134' and cycle_labels[key]|raw starts with 'Beta' %}
{% set temp_beta_number = 'beta_' ~ (key|trim('beta_', 'left') + 1) %}
<summary>{{ cycle_labels[temp_beta_number]|raw }}{{ extra|raw }}</summary>
{% else %}
<summary>{{ cycle_labels[key]|raw }}{{ extra|raw }}</summary>
{% endif %}
<p>{{ cycle_descriptions[key]|raw }}</p>
<p>{{ cycle_descriptions[key]|raw }}</p>
</details>
</th>
{% set next_milestone = false %}
Expand Down

0 comments on commit 6b458f9

Please sign in to comment.