Skip to content

Local stack shares coursier/ivy cache with devcontainers - #617

Open
waisingyiu wants to merge 3 commits into
mainfrom
ws/share-coursier-cache-with-devcontainers
Open

waisingyiu wants to merge 3 commits into
mainfrom
ws/share-coursier-cache-with-devcontainers

Conversation

@waisingyiu

@waisingyiu waisingyiu commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

I used AI to make most of the changes, but this PR description was written by me.

What does this change?

Currently a dev container (with Scala module] mounts persistent devenv-coursier-cCache-volume and devenv-ivy-cache-volume volumes to store a cache of downloaded bundles from Maven and other repositories.

This pull request changes the Datastore and Workflow-frontend container in the end-to-end testing stack to share this persistent coursier / ivy cache with devcontainers so that we don't download artefacts from Maven repository every time we spin up the stack.

In addition, it makes the mise cache persistent across container build.

It should be particularly useful when working with AI agents, which often runs tests frequently to verify changes it is making.

How has this change been tested?

The e2e test can pass locally and in CI.

Without the shared cache, you may see the following log every time you start the Datastore or Workflow-frontend containers:

[datastore] [warn]   +- /workflow-backend/build.sbt:16
[datastore] [warn]  
[datastore] [warn] note: a setting might still be used by a command; to exclude a key from this `lintUnused` check
[datastore] [warn] either append it to `Global / excludeLintKeys` or call .withRank(KeyRanks.Invisible) on the key
[datastore] [warn] scala-library-2.13.18.jar no longer exists at /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.18/scala-library-2.13.18.jar
[workflow-frontend] [warn] jdeb-1.8-sources.jar no longer exists at /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/vafer/jdeb/1.8/jdeb-1.8-sources.jar

You will not see those messages with the shared ivy cache.

How can we measure success?

It speeds up running end-to-end tests during development and avoids hitting too many requests error from Maven repository.

Have we considered potential risks?

It affects the way we run the Datastore and Workflow-frontend containers in end-to-end test. No impact on the actual service.

@waisingyiu waisingyiu added the feature Departmental tracking: work on a new feature label Sep 14, 2026
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

@waisingyiu
waisingyiu marked this pull request as ready for review September 15, 2026 09:20
@waisingyiu
waisingyiu requested a review from a team as a code owner September 15, 2026 09:20
@waisingyiu waisingyiu self-assigned this Sep 15, 2026
# Install JVM tooling (java, sbt) via mise using the e2e environment. This is the
# only thing baked into the image; all backend sources are bind-mounted at runtime.
COPY .tool-versions ./
RUN mise trust -a && mise install java sbt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we add a quick comment saying that we are using the mise cache here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

A great idea, added in a new commit.

@dominickendrick dominickendrick left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great improvement!

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

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants