-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create 0% test to use non-lite versions of fronts #27389
Conversation
@@ -135,11 +136,13 @@ trait FaciaController | |||
FrontHeadline.headlineNotFound | |||
} | |||
|
|||
val requestType = if (ActiveExperiments.isParticipating(RemoveLiteFronts)) liteRequestType else fullRequestType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we extract this to avoid repetition ?
@@ -180,7 +183,9 @@ trait FaciaController | |||
Cached(CacheTime.Facia)(JsonComponent.fromWritable(JsObject(Nil))), | |||
) | |||
} else { | |||
frontJsonFapi.get(path, liteRequestType).map { resp => | |||
val requestType = if (ActiveExperiments.isParticipating(RemoveLiteFronts)) liteRequestType else fullRequestType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I'm completely misreading this but shouldn't this be the other way around? If it participates in the test we request the full front otherwise we keep on requesting the lite version.
val requestType = if (ActiveExperiments.isParticipating(RemoveLiteFronts)) liteRequestType else fullRequestType | |
val requestType = if (ActiveExperiments.isParticipating(RemoveLiteFronts)) fullRequestType else liteRequestType |
Same question for the other places where we make this check and +1 to @DanielCliftonGuardian's proposal to extract this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I have it the wrong way around!
@@ -220,7 +225,10 @@ trait FaciaController | |||
|
|||
import PressedPage.pressedPageFormat | |||
private[controllers] def renderFrontPressResult(path: String)(implicit request: RequestHeader): Future[Result] = { | |||
val futureFaciaPage: Future[Option[(PressedPage, Boolean)]] = frontJsonFapi.get(path, liteRequestType).flatMap { | |||
val requestType = if (ActiveExperiments.isParticipating(RemoveLiteFronts)) liteRequestType else fullRequestType | |||
val NonAdFreeType = if (ActiveExperiments.isParticipating(RemoveLiteFronts)) LiteType else FullType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val NonAdFreeType = if (ActiveExperiments.isParticipating(RemoveLiteFronts)) LiteType else FullType | |
val NonAdFreeType = if (ActiveExperiments.isParticipating(RemoveLiteFronts)) FullType else LiteType |
?
@@ -527,6 +530,8 @@ trait FaciaController | |||
if (request.isAdFree) FullAdFreeType else FullType | |||
def liteRequestType(implicit request: RequestHeader): PressedPageType = | |||
if (request.isAdFree) LiteAdFreeType else LiteType | |||
def requestType(implicit request: RequestHeader): PressedPageType = | |||
if (ActiveExperiments.isParticipating(RemoveLiteFronts)) fullRequestType else fullRequestType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (ActiveExperiments.isParticipating(RemoveLiteFronts)) fullRequestType else fullRequestType | |
if (ActiveExperiments.isParticipating(RemoveLiteFronts)) fullRequestType else liteRequestType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Tested locally and on CODE |
Seen on FRONTS-PROD, ADMIN-PROD (merged by @domlander 11 minutes and 30 seconds ago)
|
What is the value of this and can you measure success?
The first step towards removing the lite versions of pressed fronts, to free up memory
What does this change?
Introduces an experiment that will use the regular version of the pressed front as opposed to the lite version.