Skip to content

Add dev container support - #4882

Merged
jonathonherbert merged 14 commits into
mainfrom
jsh/dev-containers
Aug 28, 2026
Merged

Add dev container support#4882
jonathonherbert merged 14 commits into
mainfrom
jsh/dev-containers

Conversation

@jonathonherbert

@jonathonherbert jonathonherbert commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What does this change?

A first pass for devcontainer support for this project, using devenv.

The devcontainer includes all of the dependencies necessary to run the Grid.

I've verified support for running the end-to-end tests in #4826.

Running the application with ./dev/script/start is untested at the moment, as I'd like to encapsulate a run command with our testcontainers setup for devcontainers, if possible, to ensure all runner options share the same approach.

How should a reviewer test this change?

  • In a supporting IDE, open this project in a devcontainer. (It takes a little while to start, as there's plenty to do: building the Grid container, installing mise and deps, etc.)
  • Run the end-to-end tests with cd ./e2e-tests && npm run test. You should see them pass.
  • Run the end-to-end tests with cd ./e2e-tests && npm run test:ui. If you're running in VS Code, the IDE should offer to open a web page which talks directly to the Playwright server running in the devcontainer.

All tested locally on d5700ff.

How can success be measured?

We have a secure way to run end-to-end tests in a fully sandboxed developer environment.

Who should look at this?

Tested? Documented?

  • locally by committer
  • locally by Guardian reviewer
  • on the Guardian's TEST environment N/A
  • relevant documentation added or amended (if needed)

@jonathonherbert jonathonherbert changed the title Jsh/dev containers Add dev container support Aug 19, 2026
@jonathonherbert jonathonherbert added the feature Departmental tracking: work on a new feature label Aug 19, 2026
@jonathonherbert
jonathonherbert marked this pull request as ready for review August 25, 2026 11:06
@jonathonherbert
jonathonherbert requested a review from a team as a code owner August 25, 2026 11:06
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

Comment thread e2e-tests/package.json
"test:headed": "bddgen && playwright test --headed",
"test:report": "playwright show-report",
"test:ui": "bddgen && playwright test --ui"
"test:ui": "bddgen && playwright test --ui-port 6080"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did you not need --ui-host in the end?

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.

No 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How strange, I'm now even more confused as to why I needed it

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.

It would make sense that you would need it if 0.0.0.0 was not the default 🤔 and it's certainly specified in the docs

Copilot AI 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.

Pull request overview

Adds a devenv-based dev container for running Grid and its end-to-end tests.

Changes:

  • Adds shared dev-container configuration and documentation.
  • Pins tooling and exposes Playwright UI on port 6080.
  • Broadens Playwright CI pull-request triggers.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.devcontainer/.gitignore Excludes personal configuration.
.devcontainer/README.md Documents dev-container usage.
.devcontainer/devenv.yaml Defines dependencies, ports, and setup.
.devcontainer/shared/devcontainer.json Provides generated shared configuration.
.github/workflows/playwright.yml Runs for pull requests to any branch.
.tool-versions Adds devenv and sbt tooling.
e2e-tests/package.json Assigns Playwright UI port 6080.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .devcontainer/devenv.yaml Outdated
Comment thread .devcontainer/shared/devcontainer.json
Comment thread .devcontainer/README.md
Comment thread .devcontainer/README.md
Base automatically changed from jsh/e2e-tests to main August 26, 2026 08:07
@jonathonherbert
jonathonherbert force-pushed the jsh/dev-containers branch 2 times, most recently from 92980cb to 0afe7ae Compare August 26, 2026 08:46

@davidfurey davidfurey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved with non-blocking feedback.

Apart from the missing npm ci that we discussed in person.

Comment thread .devcontainer/devenv.yaml
Comment thread .github/workflows/playwright.yml
Comment thread .tool-versions Outdated
@jonathonherbert

Copy link
Copy Markdown
Contributor Author

Approved with non-blocking feedback.

Apart from the missing npm ci that we discussed in person.

d899999 👍

@jonathonherbert
jonathonherbert force-pushed the jsh/dev-containers branch 2 times, most recently from bf31cde to 6fe7e33 Compare August 28, 2026 13:58
@gu-prout

gu-prout Bot commented Aug 28, 2026

Copy link
Copy Markdown

Seen on auth, usage, image-loader, metadata-editor, thrall, leases, cropper, collections, media-api, kahuna (merged by @jonathonherbert 10 minutes and 54 seconds ago) Please check your changes!

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.

3 participants