Page MenuHomePhabricator

AQS 2.0: Page Analytics - Date formats management (YYYMMDD and YYYYMMDDHH)
Closed, ResolvedPublic


We usually accept YYYYMMDD and YYMMDDHH indistinctly for any AQS 2.0 endpoint in any service, but we have realized that page-analytics is a bit different according to that criteria. Because it's the only service that accepts 'hourly' granularity, some endpoints only accept YYYYMMDDHH date format and we should throw the right error when this requirerement is not meet.

According to the documentation and AQS 1.0, the following is the behaviour for the endpoints that accept full dates as a request parameter:

  • per-article accepts both date formats DD and HH
  • aggregate only accepts HH date format for 'hourly' granularity. Both formats, DD and HH, are accepted for other granularity values
  • legacy only accepts HH date format, regardless of the requested granularity, and a 400 error is thrown when this requirement is not met

Event Timeline

Sfaci triaged this task as Medium priority.

Change 955607 had a related patch set uploaded (by Santiago Faci; author: Santiago Faci):

[generated-data-platform/aqs/page-analytics@main] Some issues about how valid date formats are managed (YYYYMMDD and YYYYMMDDHH)

Change 955607 merged by Santiago Faci:

[generated-data-platform/aqs/page-analytics@main] Some issues about how valid date formats are managed (YYYYMMDD and YYYYMMDDHH)

VirginiaPoundstone raised the priority of this task from Medium to High.Sep 20 2023, 12:39 PM

Test status: QA PASS

This date format, YYYMMDD and YYYYMMDDHH, has been fixed and endpoints in page analytics that uses it as well as the legacy endpoint that requires it.