Page MenuHomePhabricator

AQS 2.0: Remove indentation from the response body for all services
Closed, ResolvedPublic

Description

Goal

Remove indentation from response body for all services to decrease its size.

Background

At this moment we are using MarshalIndent function to map the response body. This function is beautifying the response including some characters (new line and spaces) to make that response "human-readable". That increases the output size a lot (around 66% for some cases in geo). Because we don't really need at all this indentation, we can replace that function to use Marshal that maps the response body in a minified way (no indentation). Same response and less size.

Tasks

Remove indentation from the response body (replacing the MarshalIndent function by Marshal in the handler layer and healthz endpoint) for the following services:

Event Timeline

Sfaci triaged this task as Medium priority.Sep 13 2023, 7:44 AM
Sfaci moved this task from Sprint Backlog to In Process on the Data Products (Sprint 01) board.

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

[generated-data-platform/aqs/media-analytics@main] Removed indention from response body

https://gerrit.wikimedia.org/r/957239

Sfaci updated the task description. (Show Details)
Sfaci updated the task description. (Show Details)

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

[generated-data-platform/aqs/page-analytics@main] Removed indention from response body

https://gerrit.wikimedia.org/r/957247

Sfaci renamed this task from AQS 2.0: Remove indention from the response body for all services to AQS 2.0: Remove indentation from the response body for all services.Sep 13 2023, 8:57 AM
Sfaci updated the task description. (Show Details)

Change 957247 merged by Santiago Faci:

[generated-data-platform/aqs/page-analytics@main] Removed indentation from response body

https://gerrit.wikimedia.org/r/957247

Change 957239 merged by Santiago Faci:

[generated-data-platform/aqs/media-analytics@main] Removed indentation from response body

https://gerrit.wikimedia.org/r/957239

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

[generated-data-platform/aqs/editor-analytics@main] Several post-implementation issues fixed

https://gerrit.wikimedia.org/r/960079

Sfaci updated the task description. (Show Details)

Last pushed editor-analytics change includes (besides other issues) the indentation removal.

Change 961842 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/deployment-charts@master] media-analytics: bump container image

https://gerrit.wikimedia.org/r/961842

Change 961842 merged by jenkins-bot:

[operations/deployment-charts@master] media-analytics: bump container image

https://gerrit.wikimedia.org/r/961842

Change 960079 merged by jenkins-bot:

[generated-data-platform/aqs/editor-analytics@main] Several post-implementation issues fixed

https://gerrit.wikimedia.org/r/960079

Test status: QA PASS

No functional changes here and endpoints work as expected