Skip to content
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

Crossword picker and JSON route #26843

Merged
merged 3 commits into from
Jan 25, 2024
Merged

Crossword picker and JSON route #26843

merged 3 commits into from
Jan 25, 2024

Conversation

andrew-nowak
Copy link
Member

What does this change?

Adds in a new JSON route for crossword content to unblock potential local development in DCR, and a CrosswordPicker object to enable ?dcr flag and routing for crossword pages. Primarily following the approach of #26188

Suggest reviewing with ignore-whitespace enabled, to avoid majority of uninteresting changes.

Screenshots

n/a - just JSON

Checklist

@andrew-nowak andrew-nowak requested a review from a team as a code owner January 24, 2024 15:04
)(implicit request: RequestHeader): Future[Result] = {
val dataModel = DotcomRenderingDataModel.forCrossword(crosswordPage, request, pageType)
val json = DotcomRenderingDataModel.toJson(dataModel)
post(ws, json, Configuration.rendering.articleBaseURL + "/Article", CacheTime.Facia)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non blocking comment for this PR: When you pick up the work to implement crosswords in DCR we will need to re-think this endpoint and the base url.

The WebX team is currently under the process of spinning up multiple AWS stacks to split the traffic. Atm we have one stack for articles and one for the rest of the content rendered by DCR (fronts & interactives):

graph LR
    Request-->Fastly
    Fastly-->Router
    Router-->FEArticleLB
    Router-->FEFaciaLB
    Router-->FEApplicationsLB
    subgraph Frontend
        FEArticleLB-->FEArticleApp
        FEFaciaLB-->FEFaciaApp
        FEApplicationsLB-->FEApplicationsApp
    end
    FEArticleApp--/Article-->DcrArticleLB-->DcrArticleApp
    FEFaciaApp--/Front-->DcrRenderingLB-->DcrRenderingApp
    FEApplicationsApp--/Interactives-->DcrRenderingLB-->DcrRenderingApp
Loading

Which stack handles the traffic is decided by the base url, e.g.
Configuration.rendering.articleBaseURL --> Article app
Configuration.rendering.baseURL --> Rendering app

Crosswords are in applications app in frontend, so it looks like traffic for those will be sent to the same app as interactives.

So your endpoint will be sth like:

That's all for the future, just wanted to give a heads up - this PR looks good to me!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's incredibly helpful info, thank you!

@andrew-nowak andrew-nowak merged commit 7a52965 into main Jan 25, 2024
2 checks passed
@andrew-nowak andrew-nowak deleted the an/crossword-data branch January 25, 2024 12:21
@prout-bot
Copy link
Collaborator

Seen on ADMIN-PROD (merged by @andrew-nowak 10 minutes and 49 seconds ago)

@prout-bot
Copy link
Collaborator

Seen on FRONTS-PROD (merged by @andrew-nowak 12 minutes and 5 seconds ago)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants