rubygems.org icon indicating copy to clipboard operation
rubygems.org copied to clipboard

Fetch oldest authored_at correctly instead of oldest authored_at per page

Open albertchae opened this issue 1 year ago • 2 comments

Fixes https://github.com/rubygems/rubygems.org/issues/4448

Previously, the "since date" was using oldest version.authored_at for a given page. This change fixes it to get the oldest version.authored_at in the database. Because authored_at depends on either built_at or created_at, I added a scope to replicate this behavior via SQL and get the minimum. This should only be 1 additional query for one column.

I modified existing tests to check for the "versions since" text and also have 2 pages of actual content.

albertchae avatar Feb 17 '24 06:02 albertchae

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (1d33ca5) 97.15% compared to head (c26f464) 97.15%. Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4460   +/-   ##
=======================================
  Coverage   97.15%   97.15%           
=======================================
  Files         391      391           
  Lines        8259     8264    +5     
=======================================
+ Hits         8024     8029    +5     
  Misses        235      235           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 18 '24 03:02 codecov[bot]

@simi thanks for all the reviews and comments so far. Was there anything else you wanted me to address for this PR?

albertchae avatar Mar 07 '24 21:03 albertchae