Skip to content

test(devcontainer): cover config volume parent ownership - #200

Merged
lurtz merged 2 commits into
eclipse-score:mainfrom
etas-contrib:fix/config-volume-parent-ownership
Nov 5, 2026
Merged

lurtz merged 2 commits into
eclipse-score:mainfrom
etas-contrib:fix/config-volume-parent-ownership

Conversation

@AlexanderLanin

@AlexanderLanin AlexanderLanin commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

The config-volume ownership repair merged in #198 needs regression coverage so development users can continue creating state directories below ~/.local while existing private permissions are preserved.

Add a small check to the existing s-core-local/tests/test_default.sh: create root-owned configuration parents in a temporary home directory, run the repair script, and verify user ownership, preservation of mode 0700, and creation of .local/state.

The ownership fix itself is already on main; this PR only adds the test. Part of #190.

This comment was marked as resolved.

Copilot AI balanced review requested due to automatic review settings November 4, 2026 13:29
@AlexanderLanin
AlexanderLanin marked this pull request as ready for review November 4, 2026 13:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the configuration-volume parent ownership changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Comment thread tools/tests/volume_ownership_test.py Outdated

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

etas-contrib-automation Bot pushed a commit to etas-contrib/score_devcontainer that referenced this pull request Nov 5, 2026
…lipse-score#198)

## Why

Adding or removing a tool currently means following several installation
scripts and separate version files. Maintainers need one place to see
which tools each environment provides, and to change that selection
without rewriting installation steps.

For developers, basedpyright and pytest become available to all
DevContainer users alongside pre-commit, rather than being installed
into one user's home directory. They also gain Bazel targets using the
same package versions. Invalid selections, missing declared dependencies
and unsupported platform artifacts are reported before installation
starts.

## What changes

- **Tool selection:** `tools/environments.json` lists the directly
managed tools for the two existing container features and this
repository's own setup.
- **Package definitions:** `tools/providers.json` holds Python/npm
packages, APT policies and special setup metadata. Native release
versions and checksums stay in the existing lockfiles; Bazel reads
Python definitions from the same JSON source.
- **Installation:** each setup requests its selection with one installer
call. The installer manages temporary build packages, tool setup,
cleanup and required privileges, while npm retains the development
user's environment. Tool-specific setup lives beside the installer.
- **Cleanup and fixes:** remove the replaced YAML definitions and yq
bootstrap, and repair config/state parent ownership without changing
existing private permissions.

Existing tool versions and APT policies are retained.
Distribution-selected packages still follow Ubuntu; the change does not
make those packages exactly pinned.

Part of eclipse-score#190; builds on eclipse-score#196.

---

## Possible split if this is too large

If this PR is too large to review as one change, we could split it into
the following independently usable steps. Extractions eclipse-score#200 and eclipse-score#201 are
ready for review, each based directly on `main` and independent of the
other. This PR retains the complete implementation until the extractions
land.

| PR | Scope | Result |
| --- | --- | --- |
| 1. Fix directory ownership (eclipse-score#200) | Repair config/state parent
ownership while preserving private permissions, with regression
coverage. | An independent bugfix. |
| 2. Consolidate package definitions (eclipse-score#201) | Introduce `providers.json`
and the Bazel adapter; replace the Python/YAML definitions and yq. Adapt
existing installers to read the new metadata and expose the additional
Python Bazel targets. | Shared definitions, with existing installation
flows largely retained. |
| 3. Migrate repository setup | Add environment selection, validation
and native/Python/npm installation with privilege handling; migrate
`post_create_command.sh`. | The new model is used by this repository's
own setup. |
| 4. Migrate container features | Add APT, temporary build dependencies
and declared setup scripts; migrate both features, including system-wide
Python tools, and remove their inline installation logic. | The complete
behavior proposed by this PR. |

Steps 2 → 3 → 4 build on each other. Step 1 is independent and should
land before step 4. If step 4 is still too large, it can be split
further by `bazel-feature` and `s-core-local`. Tests and documentation
would accompany their respective changes; intermediate steps would keep
one source for each version rather than introducing duplicate
definitions.
Copilot AI balanced review requested due to automatic review settings November 5, 2026 14:28
@AlexanderLanin
AlexanderLanin force-pushed the fix/config-volume-parent-ownership branch from c501837 to 188775d Compare November 5, 2026 14:41
@AlexanderLanin AlexanderLanin changed the title fix(devcontainer): repair config volume parent ownership test(devcontainer): cover config volume parent ownership Nov 5, 2026

This comment was marked as resolved.

@AlexanderLanin

Copy link
Copy Markdown
Member Author

most of this was in #198, just the test was missing

Copilot AI balanced review requested due to automatic review settings November 5, 2026 14:42

This comment was marked as resolved.

Copilot AI balanced review requested due to automatic review settings November 5, 2026 14:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block the added config-volume ownership regression coverage.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@lurtz
lurtz added this pull request to the merge queue Nov 5, 2026
Merged via the queue into eclipse-score:main with commit ffb59c3 Nov 5, 2026
8 checks passed
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants