Gate What's New entries on release date in filename

What does this MR do and why?

Previously, What's New entries were displayed as soon as their YAML file was merged to the repository. This meant features could appear in the What's New drawer before their actual release date if the file was merged early.

This MR adds date-based gating to ReleaseHighlight.relative_file_paths. Each What's New filename encodes a release date as a YYYYMMDD prefix (e.g., 202604160001_18_11.yml = April 16, 2026). The new release_date_reached? method parses this date and excludes files whose date is still in the future.

The filtering happens inside the cached relative_file_paths method, so it runs at most once per hour (the existing CACHE_DURATION). This means there can be up to a 1-hour delay after midnight on release day before the file appears, which is acceptable.

Related to #597533 where we're planning to merge "what's new" prior to release date.

Graceful fallback

Files that don't match the expected naming pattern (e.g., templates/template.yml) or have an invalid date are always included, preserving backward compatibility.

Screenshots

Before After
image image

Validation

  1. Add a new or rename an old file in gitlab/data/whats_new/ such that the start of the file as a future date. For example, 202605210001_19_0.yml.
  2. Go to (left nav bottom) Help > What's New. The new features should not show up.

Alternatively, in Rails console:

  1. If you started your GDK before adding/renaming the file, run Rails.cache.clear as there is a 1 hour cache.
  2. Run ReleaseHighlight.relative_file_paths to ensure the YAML file is not being loaded.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Cynthia "Arty" Ng

Merge request reports

Loading