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

Remove s3 WSClient. Replace with S3 API #18359

Merged
merged 7 commits into from
Nov 30, 2017
Merged

Conversation

QuarpT
Copy link
Contributor

@QuarpT QuarpT commented Nov 28, 2017

What does this change?

Removes the custom S3 WSClient - it's only used in one place and seems unnecessary. The difference is that WSClient is non-blocking - so I've wrapped the amazon API in blocking operations thread pool.

If we want to avoid using the native Java Amazon API, then we should use https://developer.lightbend.com/docs/alpakka/current/s3.html rather than implement our own http client.

What is the value of this and can you measure success?

Simplifies retrieving facia fronts

Tested in CODE?

I will

import scala.concurrent.{ExecutionContext, Future}

trait FrontJsonFapi extends Logging {
lazy val stage: String = Configuration.facia.stage.toUpperCase
val bucketLocation: String
val parallelJsonPresses = 16
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Increasing to 16 after seeing sporadic exceptions in prod with a low threshold of 8.

@PRBuilds
Copy link

PRBuilds commented Nov 28, 2017

PRbuilds results:

Screenshots
desktop.pngtablet.pngmobile.pngwide.png

💚 Exceptions
thrown-exceptions.js

💚 A11y validation
a11y-report.txt

Apache Benchmark Load Testing
loadtesting.txt

💚 Microdata Validation
microdata.txt

--automated message

pressedPageFromS3(getAddressForPath(path, "json"))
}

private def pressedPageFromS3(path: String)(implicit executionContext: ExecutionContext): Future[Option[PressedPage]] = errorLoggingF(s"FrontJsonFapi.pressedPageFromS3 $path") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this private methode necessary? Can its content be moved into get above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can be

log.warn("Could not parse JSON in FrontJson")
None
}
FaciaPressMetrics.FrontDecodingLatency.recordDuration(stopWatch.elapsed)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we keep this metric recording?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will put it back

@prout-bot
Copy link
Collaborator

Seen on PROD (merged by @QuarpT 25 minutes and 7 seconds ago)

@QuarpT QuarpT deleted the pcolley/remove_s3_wsclient branch December 18, 2017 16:55
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