guardian / riff-raff

The Guardian's deployment platform
Apache License 2.0
265 stars 18 forks source link

Replace `akka-agent` package with a more minimalistic homebrew version #1294

Closed AshCorr closed 7 months ago

AshCorr commented 8 months ago

What does this change?

Replaces akka-agent with a more minimalistic implementation (only has the functions required for riff-raff) powered by Semaphore.

akka-agent was deprecated and removed in Akka 2.5, and definitely hasn't been re-added in Pekko so we need to replace this library before we can move to Play 3.

How to test

Deploy to CODE.

Have we considered potential risks?

Agents are used extensively in riff-raff for everything from scheduled builds to deployment history. Should this break it might cause a lot of issues in riff-raff.

Theres also a risk of deadlocks now (which may have existed in the previous implementation) if an Agent tries to modify itself during a send operation, eg

agent.send(() => {
   // Lock already acquired by the previous send and not released yet
   agent.send(...)
})

The alternative would be to re-implement a lot of riff-raffs functionality using Actors, which is similarly risky(and a lot of work)!

Things seem fine in CODE

image

Images

It runs! (atleast locally)

image
github-actions[bot] commented 8 months ago

Deploy build 3222 of tools::riffraff to CODE

All deployment options - [Deploy build 3222 of `tools::riffraff` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=tools%3A%3Ariffraff&build=3222&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 3222 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=tools%3A%3Ariffraff&build=3222&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=tools%3A%3Ariffraff&stage=CODE)

From guardian/actions-riff-raff.

github-actions[bot] commented 7 months ago

This PR is stale because it has been open 30 days with no activity. Unless a comment is added or the “stale” label removed, this will be closed in 3 days