Skip to content

Enable devcontainer in Workflows#411

Open
MaximilianSoerenPollak wants to merge 1 commit intoeclipse-score:mainfrom
MaximilianSoerenPollak:MSP_add_pre_commit
Open

Enable devcontainer in Workflows#411
MaximilianSoerenPollak wants to merge 1 commit intoeclipse-score:mainfrom
MaximilianSoerenPollak:MSP_add_pre_commit

Conversation

@MaximilianSoerenPollak
Copy link
Contributor

@MaximilianSoerenPollak MaximilianSoerenPollak commented Feb 23, 2026

Benefits:

  • yamlfmt, ruff, basedpyright, actionlint, shellcheck, buildifier versions dictated centrally by devcontainer
  • centralized "open in devcontainer and you are good to go", no custom commands like install bazel and run ide_support
  • same baseline for debugging. An issue is reported and you can get to the same baseline 'faster' than before

Drawbacks:

  • increase in startup time of dev environment
  • increase in CI runtime
  • pre-commit will not work without devcontainer

@github-actions
Copy link

github-actions bot commented Feb 23, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //src:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: 15544b84-06b3-49a6-838b-abff74b58e9c
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: src
Loading: 0 packages loaded
    currently loading: src
Analyzing: target //src:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //src:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //src:license-check (66 packages loaded, 9 targets configured)

Analyzing: target //src:license-check (69 packages loaded, 9 targets configured)

Analyzing: target //src:license-check (76 packages loaded, 9 targets configured)

Analyzing: target //src:license-check (128 packages loaded, 1673 targets configured)

Analyzing: target //src:license-check (135 packages loaded, 2527 targets configured)

Analyzing: target //src:license-check (135 packages loaded, 2527 targets configured)

Analyzing: target //src:license-check (135 packages loaded, 2527 targets configured)

Analyzing: target //src:license-check (136 packages loaded, 2527 targets configured)

Analyzing: target //src:license-check (139 packages loaded, 4537 targets configured)

Analyzing: target //src:license-check (144 packages loaded, 4589 targets configured)

INFO: Analyzed target //src:license-check (145 packages loaded, 4715 targets configured).
[12 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox ... (2 actions running)
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
INFO: Found 1 target...
Target //src:license.check.license_check up-to-date:
  bazel-bin/src/license.check.license_check
  bazel-bin/src/license.check.license_check.jar
INFO: Elapsed time: 23.314s, Critical Path: 2.48s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/src/license.check.license_check src/formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions
Copy link

The created documentation from the pull request is available at: docu-html

{
"name": "eclipse-s-core",
"image": "ghcr.io/eclipse-score/devcontainer:1.0.0",
"image": "ghcr.io/eclipse-score/devcontainer:v1.2.0",
Copy link

Choose a reason for hiding this comment

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

Can you add this and tell me if you stell need PIPX_BIN_DIR to execute pre-commit?

Suggested change
"image": "ghcr.io/eclipse-score/devcontainer:v1.2.0",
"image": "ghcr.io/eclipse-score/devcontainer:v1.2.0",
"postCreateCommand": "echo \"export PATH=$PIPX_BIN_DIR:$PATH\" | sudo tee /etc/bash_completion.d/add_pipx_to_path",

Copy link

Choose a reason for hiding this comment

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

This only works in conjunction with devcontainer/cli. If this works I can add this to the image.

Copy link

Choose a reason for hiding this comment

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

Now I found a solution, which works in /etc/profile.d/. This took me way too long time

Suggested change
"image": "ghcr.io/eclipse-score/devcontainer:v1.2.0",
"image": "ghcr.io/eclipse-score/devcontainer:v1.2.0",
"postCreateCommand": "echo \"export PATH=$PIPX_BIN_DIR:$PATH\" | sudo tee /etc/profile.d/add_pipx_to_path.sh",

Copy link

Choose a reason for hiding this comment

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

Will be taken care of with eclipse-score/devcontainer#98

@MaximilianSoerenPollak MaximilianSoerenPollak marked this pull request as draft February 25, 2026 09:12
@MaximilianSoerenPollak
Copy link
Contributor Author

Converted to Draft, as currently unsure if this PR is in the right direction of the Repo.

@AlexanderLanin
Copy link
Member

@MaximilianSoerenPollak have fun merging/rebasing. Looks like there are some conflicts.

run: bash scripts/run-linters.sh
cacheFrom: ghcr.io/eclipse-score/devcontainer
push: never
runCmd: ${PIPX_BIN_DIR}/pre-commit run -a
Copy link

Choose a reason for hiding this comment

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

With the current main tag PIPX_BIN_DIR is now part of $PATH

Suggested change
runCmd: ${PIPX_BIN_DIR}/pre-commit run -a
runCmd: pre-commit run -a

Comment on lines -33 to -34
- name: Setup Bazel with cache
uses: bazel-contrib/[email protected]
Copy link

Choose a reason for hiding this comment

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

We should keep an eye on build times and if we can use a cache with the devcontainer

export PYTHONUNBUFFERED="1"
export CONSUMER="${{ matrix.consumer }}"
export PYTHONPATH=.
uv run pytest -s -v src/tests/ \
Copy link

Choose a reason for hiding this comment

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

pytest is preinstalled in the devcontainer and should be accessible without uv. Maybe uv just runs what is already there

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes pytest is there, but the packages this test needs arent'.

So i installe eveyrthing via uv then running it

@MaximilianSoerenPollak MaximilianSoerenPollak marked this pull request as ready for review February 25, 2026 14:51
@MaximilianSoerenPollak MaximilianSoerenPollak changed the title Add pre-commit config & upgrade devcontainer Enable devcontainer in Workflows Feb 25, 2026
@MaximilianSoerenPollak
Copy link
Contributor Author

I honestly do not know why some of the changes it says they are new here ?

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

Labels

None yet

Projects

Status: Draft

Development

Successfully merging this pull request may close these issues.

3 participants