Skip to content

Commit

Permalink
Assume the next Firefox release will be the day after the last merge …
Browse files Browse the repository at this point in the history
…date unless the data says otherwise (#1498)
  • Loading branch information
gabrielBusta authored Jun 10, 2024
1 parent f0a0f16 commit 6e42022
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/src/shipit_api/admin/product_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,12 @@ async def fetch_firefox_release_schedule_data(releases: typing.List[shipit_api.c
key=lambda release: FirefoxVersion.parse(release.version),
)
if not releases_after_last_merge_date:
raise ValueError(f"No Firefox releases shipped after the last merge date ({last_merge_date})")
first_release_after_last_merge_date = releases_after_last_merge_date[0]
last_release_date = dt_to_ymd(first_release_after_last_merge_date.completed)
logger.info(f"No Firefox releases shipped after the last merge date ({last_merge_date})")
last_release_date = dt_to_ymd(from_ymd_format(last_merge_date) + timedelta(days=1))
logger.info(f"Assuming a Firefox release will be shipped on {last_release_date} (the day after the last merge date)")
else:
first_release_after_last_merge_date = releases_after_last_merge_date[0]
last_release_date = dt_to_ymd(first_release_after_last_merge_date.completed)
next_softfreeze_date = iso_to_ymd(current_nightly_version_schedule["soft_code_freeze"])
next_merge_date = iso_to_ymd(current_nightly_version_schedule["merge_day"])
next_release_date = dt_to_ymd(from_isoformat(current_nightly_version_schedule["merge_day"]) + timedelta(days=1))
Expand Down

0 comments on commit 6e42022

Please sign in to comment.