Skip to content

chore: add Workshop definitions for dev, noble, and jammy - #1812

Open
LoweRAM wants to merge 20 commits into
canonical:mainfrom
LoweRAM:work/workshops
Open

LoweRAM wants to merge 20 commits into
canonical:mainfrom
LoweRAM:work/workshops

Conversation

@LoweRAM

@LoweRAM LoweRAM commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Adds Workshop definitions under .workshop/ for container-based development environments on this repository:

  • dev (Ubuntu 26.04): full development environment — setup, fast/slow/all tests, requires-root tests, lint, and format actions.
  • noble (Ubuntu 24.04) and jammy (Ubuntu 22.04): test-only environments for running the test suites on those Ubuntu versions.

All three share one in-project SDK (.workshop/craft-parts/) that:

  • setup-base (root, snapshot-cached): installs build/test system packages from the Makefile's dependency list, tombi (classic snap), shellcheck/shfmt via apt, and actionlint built with go install (GOBIN=/usr/local/bin) for architecture independence.
  • setup-project (workshop user, in /project): installs ruff, ty, codespell, and pre-commit as uv tools and runs the project's own make setup, which uv-syncs all dependency groups including the distro-specific python-apt group.

Also adds .workshop.lock to .gitignore (Workshop's internal project tracking file).

Rationale for tool sources

Non-classic snaps cannot see the /project mount (snap confinement), so tools that need project access (ruff, ty, codespell, pre-commit) are uv tools. Only the classic tombi snap is used. shellcheck/shfmt come from apt and actionlint is built from source with go install so the hooks work on any architecture, including riscv64 which has no actionlint release tarball.

Verification

  • make test-fast passes on all three workshops (5433 tests: noble/py3.12, jammy/py3.10, dev/26.04).
  • lint and format actions pass in dev.
  • actionlint v1.7.12 present in all three workshops.
  • Launch/refresh exercised repeatedly, including error-pause/continue/abort flows.

CRAFT-5379

@LoweRAM

LoweRAM commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Added a workshop-tests job to qa.yaml (928259f): a matrix over [ubuntu-26.04, ubuntu-26.04-arm] × [dev, noble, jammy] that launches the workshop with canonical/[email protected] (SHA-pinned), runs lint on dev only, and test-fast everywhere. The uv:cache and go:mod-cache mount plugs are cached across runs via the action's cache input.

Comment thread .workshop/craft-parts/hooks/setup-base Resolved
# apt-get install shellcheck and shfmt while the tombi snap downloads; the
# versions are older than the snaps but the Makefile accepts them.
sudo apt-get update
sudo apt-get install --yes --no-install-recommends \

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.

This is not necessarily a full set of what we need, but we run make setup in the project to get the rest. This will, however, ensure that we have most of the requirements, which makes a project refresh quicker.

@lengau
lengau marked this pull request as ready for review November 12, 2026 17:34
@lengau
lengau requested a review from cmatsuoka as a code owner November 12, 2026 17:34
Copilot AI lite review requested due to automatic review settings November 12, 2026 17:34

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.

🟡 Changes recommended

The shared setup hook may fail on Jammy by installing the unsupported 7zip package, while the development setup can run root tests against an unsynchronized virtual environment because UV_PROJECT_ENVIRONMENT is not preserved.

2 open issues
What changed in this PR

Adds Workshop-based development and test environments for Ubuntu 26.04, 24.04, and 22.04, integrating repository setup, tooling, testing, and QA workflows.

Changes:

  • Adds dev, Noble, and Jammy Workshop definitions with shared SDK and virtual-environment configuration.
  • Adds hooks for system dependencies, project tooling, and uv-based project setup.
  • Updates type-checking and adds Workshop coverage to the QA workflow.
  • Ignores Workshop's generated lockfile.
File Description
common.mk Updates type-checking to use the configured Workshop or uv project environment.
.workshop/​noble.yaml Defines the Ubuntu 24.04 test Workshop environment and its test actions.
.workshop/​jammy.yaml Defines the Ubuntu 22.04 test Workshop environment and its test actions.
.workshop/​dev.yaml Defines the Ubuntu 26.04 development Workshop with setup, testing, linting, formatting, and root-test actions.
.workshop/​craft-parts/​meta/​sdk.yaml Declares the shared in-project Workshop SDK and virtual-environment mount.
.workshop/​craft-parts/​hooks/​setup-project Installs project development tools and synchronizes the project's dependency environments.
.workshop/​craft-parts/​hooks/​setup-base Installs system-level development and test dependencies and configures the Workshop environment.
.gitignore Adds Workshop's generated lockfile to the ignored files.
.github/​workflows/​qa.yaml Adds CI jobs that launch the Workshops and run tests, linting, and related checks across Ubuntu versions and architectures.

Review effort: Lite

Comment thread .workshop/craft-parts/hooks/setup-base Resolved
Comment thread .workshop/dev.yaml Resolved

Copilot AI commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Set up remaining repository tooling

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

Comment thread CONTRIBUTING.md

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.

The changes to this file are all-natural, no AI involved.

Comment thread CONTRIBUTING.md Resolved
Comment thread CONTRIBUTING.md Resolved
@LoweRAM LoweRAM closed this Nov 13, 2026
@LoweRAM
LoweRAM deleted the work/workshops branch November 13, 2026 18:12
@LoweRAM LoweRAM reopened this Nov 13, 2026
@lengau

lengau commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Linting fixed in #1820

LoweRAM (sloperated by Alex M. Lowe) and others added 9 commits November 16, 2026 12:53
Add .workshop definitions for container-based development environments:
a dev workshop on Ubuntu 26.04 plus noble and jammy workshops for
running tests on those Ubuntu versions.

The shared in-project craft-parts SDK installs build/test system
packages (setup-base) and runs the project's own make setup in
/project (setup-project). Tools are sourced arch-independently:
tombi as a classic snap, shellcheck/shfmt via apt, actionlint built
with go install (GOBIN=/usr/local/bin), and ruff/ty/codespell/
pre-commit as uv tools since non-classic snaps cannot see /project.

Verified: make test-fast passes on all three workshops (5433 tests),
lint/format actions run in dev, actionlint v1.7.12 present in all.
Run the lint and test-fast workshop actions in a matrix over the
ubuntu-26.04 and ubuntu-26.04-arm GitHub runners and the dev, noble,
and jammy workshop definitions, using the canonical/launch-workshop
action. Lint runs only on the dev workshop since noble and jammy are
test-only environments. The uv package cache and go module cache are
persisted across runs via the action's cache input.
Replace the go install of actionlint with the actionlint SDK from the
SDK Store, which provides prebuilt binaries for all supported bases.
The go SDK stays: it is needed for testing the go plugin.
The go-installed binary is long gone; nothing creates
/usr/local/bin/actionlint anymore.
prek from the SDK Store replaces the uv tool install of pre-commit;
the Makefile already falls back to prek-compatible invocation.
The SDK Store tombi replaces the classic snap install, removing the
snap change tracking and wait loop from setup-base.
The lint action's uv tool invocations refresh .venv with only the lint
dependency groups, dropping the docs group packages such as vale. The
docs Makefile then skips its own venv bootstrap because .venv already
exists, and vale-install fails with a missing vale binary.
LoweRAM (sloperated by Alex M. Lowe) and others added 10 commits November 16, 2026 12:53
Add lint-code and lint-docs as dev workshop actions and run lint-code
in CI, since the full lint target includes docs linting which needs
the docs environment set up.
All workshops on one checkout share /project, so a venv inside it gets
clobbered by each workshop's make setup (each with its own Python
version and distro dependency group). Set UV_PROJECT_ENVIRONMENT to
/opt/venv in the setup-project hook and all actions, so every workshop
syncs and runs against its own venv via the uv:venv mount slot.
Move the per-workshop venv override into setup-base as a profile.d
script, matching how the SDKs set up their environment. The per-action
env prefixes are no longer needed.
The hardcoded --python .venv breaks when the project venv lives
elsewhere (e.g. a Workshop setting UV_PROJECT_ENVIRONMENT to a
per-workshop path). Fall back to .venv when the variable is unset.
Co-authored-by: JJ Coldiron <[email protected]>
Signed-off-by: Alex Lowe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants