Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ build:ferrocene-coverage --@rules_rust//rust/settings:extra_exec_rustc_flag=-Cco
build:ferrocene-coverage --@rules_rust//rust/settings:extra_exec_rustc_flag=-Cdebuginfo=2
test:ferrocene-coverage --run_under=@score_tooling//coverage:llvm_profile_wrapper

# Coverage needs to have all intermediate .rlibs to be able to proceed
build:ferrocene-coverage --remote_download_all

test:unit-tests --config=linux-x86_64
test:unit-tests --build_tests_only
test:unit-tests --test_tag_filters=-manual
Expand All @@ -76,3 +79,6 @@ coverage --combined_report=lcov

# user specific overrides (like proxy settings)
try-import %workspace%/user.bazelrc

# Try import setting from home (CI setup-bazel action for caching uses this to provide proper args like --disk-cache)
try-import ~/.bazelrc
3 changes: 2 additions & 1 deletion .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ paths-ignore:
- "**/*test*"
- "**/*mock*"
- "**/test/**"
- "**/mock/**"
- "**/mock/**"
- "**/codeql-coding-standards-repo/**"
2 changes: 1 addition & 1 deletion .github/workflows/codeql-multiple-repo-scan.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

Image can we please ignore this path "codeql-coding-standards-repo/*

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
(cd "$path" && git checkout "$ref")
else
echo " Detected branch/tag. Cloning with --branch."
git clone --depth 1 --branch "$ref" "$url" "$path"
git clone --depth 1 --branch v"$ref" "$url" "$path"
fi
# Append the path to the list, separated by commas
Expand Down
1 change: 0 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ docs(
# "@score_lifecycle_health//:needs_json", # unreadable images - relative paths issue
# "@score_logging//:needs_json", # duplicated labels
"@score_logging//:needs_json",
# "@score_feo//:needs_json",
# Tools
"@score_platform//:needs_json",
"@score_process//:needs_json",
Expand Down
118 changes: 36 additions & 82 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Score Reference Integration

This workspace integrates multiple Eclipse Score modules (baselibs, communication, persistency, orchestrator, feo, etc.) to validate cross-repository builds and detect integration issues early in the development cycle.
This workspace integrates multiple Eclipse Score modules (baselibs, communication, persistency, orchestrator, etc.) to validate cross-repository builds and detect integration issues early in the development cycle.

## Overview

The reference integration workspace serves as a single Bazel build environment to:

- Validate cross-module dependency graphs
- Detect label and repository boundary issues
- Test toolchain and platform support (Linux, QNX, LLVM/GCC)
- Prepare for release validation workflows


## Get started

Simply run `./score_starter` and select which integration You want to run. Once running, You will be guided by our welcome cli to run selected examples.
Expand All @@ -20,48 +20,56 @@ Simply run `./score_starter` and select which integration You want to run. Once
Intention for each folder is described below

### bazel_common

Used to keep a common bazel functionalities for `images` like:

- toolchain setups
- common tooling deps
- common S-CORE modules deps
- common `.bzl` extensions needed to streamline images


### showcases

Used to keep `S-CORE` wide **showcases** implementation to showcase S-CORE in certain deployments (images). Contains:

- proxy target bundling all `standalone` examples from all `S-CORE` repos to deploy then as single bazel target into image
- implementation of certain **showcases** that shall be deployed into images

#### cli

Contains a CLI tool to be used on runner that is showcasing the S-CORE functionality. It will provide superior user experience and will guide user to run examples.
How to use it in Your image, look [here](./showcases/cli/README.md)
Contains a CLI tool to be used on runner that is showcasing the S-CORE functionality. It will provide superior user experience and will guide user to run examples.
How to use it in Your image, look [here] (./showcases/cli/README.md)

### images

Used to keep concrete `images` for given target platform as bazel modules. Each platform shall have it's own folder with name `{platform}_{arch}` ie. `qnx_aarch64`.

This `images` shall:
- deploy all `showcases` into image so they can be run inside
- other specific code for given `image`

- deploy all `showcases` into image so they can be run inside
- other specific code for given `image`

### runners

Used to keep thin logic ro reuse `runners` between images, like docker runner etc.

## Docs

To generate a full documentation of all integrated modules, run:

```bash
bazel run //:docs_combo_experimental
```

## Operating system integrations

> [!NOTE]
> Please refer to the README documents in the respective sub-directories for details about the specific integration.

* [QNX](./images/qnx_x86_64//README.md)
* [Red Hat AutoSD](./images/autosd_x86_64/build/README.md)
* [Elektrobit corbos Linux for Safety Applications](./images/ebclfsa_aarch64/README.md)
* [Linux x86_64]()
- [QNX](./images/qnx_x86_64//README.md)
- [Red Hat AutoSD](./images/autosd_x86_64/build/README.md)
- [Elektrobit corbos Linux for Safety Applications](./images/ebclfsa_aarch64/README.md)
- Linux x86_64

## Workspace support

Expand All @@ -73,48 +81,33 @@ This helps with cross-module development, debugging, and generally "trying out t
> You can do this manually as well, of course (e.g. if you do not use the devcontainer).
> Take a look at `.devcontainer/prepare_workspace.sh`, which contains the setup script.

> [!NOTE]
> Not all Bazel targets are supported yet.
> Running `./scripts/integration_test.sh` will work, though.
> Take a look at the [Known Issues](#known-issues-️) below to see which Bazel targets are available and working.

The supported workspace managers are:

| Name | Description |
|------|-------------|
| [Gita](https://github.com/nosarthur/gita) | "a command-line tool to manage multiple git repos" |

A description of how to use these workspace managers, together with their advantages and drawbacks, is beyond the scope of this document.
In case of doubt, choose the first.

### Initialization of the workspace

> [!WARNING]
> This will change the file `score_modules.MODULE.bazel`.
> Do **not** commit these changes!

1. Switch to local path overrides, using the VSCode Task (`Terminal`->`Run Task...`) "Switch Bazel modules to `local_path_overrides`".
Note that you can switch back to `git_overrides` (the default) using the task "Switch Bazel modules to `git_overrides`"

**Command line:**

```bash
python3 scripts/known_good/update_module_from_known_good.py --override-type local_path
```

2. Update workspace metadata from known good, using the VSCode Task "Update workspace metadata from known good".
This will generate the `.gita-workspace.csv` file based on `known_good.json`.

**Command line:**

```bash
python3 scripts/known_good/known_good_to_workspace_metadata.py
```

3. Run VSCode Task "<Name>: Generate workspace", e.g. "Gita: Generate workspace".
This will clone all modules using the chosen workspace manager.
The modules will be in sub-directories starting with `score_`.
Note that the usage of different workspace managers is mutually exclusive.

**Command line:**

```bash
gita clone --preserve-path --from-file .gita-workspace.csv
```
Expand All @@ -124,67 +117,34 @@ You can make local changes to each module, which will be directly reflected in t

## Known Issues ⚠️

### Orchestrator
**Issue:** Direct toolchain loading at `BUILD:14`
```
load("@score_toolchains_qnx//rules/fs:ifs.bzl", "qnx_ifs")
```
**Resolution needed:** Refactor to use proper toolchain resolution instead of direct load statements.

**Issue:** clang needs to be installed
```
sudo apt install clang
```
**Resolution needed:** why is this happening with -extra_toolchains=@gcc_toolchain//:host_gcc_12 ?

### Communication

**Module:** `score/mw/com/requirements`

**Issues when building from external repository:**

1. **Label inconsistency:** Some `BUILD` files use `@//third_party` instead of `//third_party` (repository-qualified vs. local label). Should standardize on local labels within the module.
2. **Outdated path reference:** `runtime_test.cpp:get_path` checks for `safe_posix_platform` (likely obsolete module name) instead of `external/score_communication+/`.

### Persistency
**Test failures in `src/cpp/tests`:**
1. **Dependency misconfiguration:** `google_benchmark` should not be a dev-only dependency if required by tests. Consider separating benchmark targets.
2. **Compiler-specific issue in `test_kvs.cpp`:** Contains GCC-specific self-move handling that is incorrect and fails with GCC (only builds with LLVM). Needs portable fix or removal of undefined behavior.

## Build Blockers 🚧

The following builds are currently failing:
### Coverage

### FEO (Full Build)
```bash
bazel build @feo//... --verbose_failures
```

### Persistency (Full Build)
```bash
bazel build --config x86_64-linux @score_persistency//src/... --verbose_failures
```
Running coverage has to be executed on Ubuntu 22.04, newer versions are not supported and might have issues.

## System Dependencies

### Required Packages for FEO
Install the following system packages before building FEO:
Install the following system packages:

```bash
sudo apt-get update
sudo apt-get install -y protobuf-compiler libclang-dev
sudo apt-get install -y protobuf-compiler libclang-dev lcov
```

## Pending Tasks 🧪

- [ ] Add test targets once cross-repository visibility constraints are clarified
- [ ] Normalize third-party label usage across all `BUILD` files
- [ ] Resolve FEO build failures
- [ ] Fix Persistency full build
- [ ] Address compiler-specific issues in test suites

## Proxy & External Dependencies 🌐

### Current Issue

The `starpls.bzl` file ([source](https://github.com/eclipse-score/tooling/blob/main/starpls/starpls.bzl)) uses `curl` directly for downloading dependencies, which:

- Bypasses Bazel's managed fetch lifecycle and dependency tracking
- Breaks reproducibility and remote caching expectations
- May fail in corporate proxy-restricted environments
Expand All @@ -201,19 +161,13 @@ export HTTPS_PROXY=http://127.0.0.1:3128
```

Add this to your `MODULE.bazel`:

```python
local_path_override(module_name = "score_tooling", path = "../tooling")
```

### Suggested Improvements
- Replace raw `curl` calls with Bazel `http_archive` or `repository_ctx.download` for reproducibility.
- Parameterize proxy usage via environment or Bazel config flags.

## IDE support

### Rust

Use `scripts/generate_rust_analyzer_support.sh` to generate rust_analyzer settings that will let VS Code work.

## 🗂 Notes
Keep this file updated as integration issues are resolved. Prefer converting ad-hoc shell steps into Bazel rules or documented scripts under `scripts/` for repeatability.
36 changes: 15 additions & 21 deletions bazel_common/score_modules_target_sw.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,19 @@
# Do not edit manually - use scripts/known_good/update_module_from_known_good.py

bazel_dep(name = "score_baselibs")
git_override(
single_version_override(
module_name = "score_baselibs",
remote = "https://github.com/eclipse-score/baselibs.git",
commit = "158fe6a7b791c58f6eac5f7e4662b8db0cf9ac6e",
version = "0.2.4",
patches = [
"//patches/baselibs:003-acl-fixes-for-aarch64.patch",
],
patch_strip = 1,
)

bazel_dep(name = "score_baselibs_rust")
git_override(
single_version_override(
module_name = "score_baselibs_rust",
remote = "https://github.com/eclipse-score/baselibs_rust.git",
commit = "9f781acfb6d1a8fa06012ce772b0befb304acf31",
version = "0.1.0",
)

bazel_dep(name = "score_communication")
Expand All @@ -44,40 +42,36 @@ git_override(
)

bazel_dep(name = "score_persistency")
git_override(
single_version_override(
module_name = "score_persistency",
remote = "https://github.com/eclipse-score/persistency.git",
commit = "9692dadab51c677183262e8870c5425ab1797c4f",
version = "0.3.0",
patches = [
"//patches/persistency:fix-duplicated-needs-name.patch",
"//patches/persistency:fix-bazel-dev-dep.patch",
],
patch_strip = 1,
)

bazel_dep(name = "score_orchestrator")
git_override(
single_version_override(
module_name = "score_orchestrator",
remote = "https://github.com/eclipse-score/orchestrator.git",
commit = "675007a2baa226fad1e2979ed732360dc111d056",
version = "0.1.0",
)

bazel_dep(name = "score_kyron")
git_override(
single_version_override(
module_name = "score_kyron",
remote = "https://github.com/eclipse-score/kyron.git",
commit = "d4d0afc1dd733a0c8a4aba9cc2b2b3a58d38ebf6",
version = "0.1.1",
)

bazel_dep(name = "score_lifecycle_health")
git_override(
single_version_override(
module_name = "score_lifecycle_health",
remote = "https://github.com/eclipse-score/lifecycle.git",
commit = "14ee704eeac03e03ca10bece5de8b694d3c5e2dd",
version = "0.1.0",
)

bazel_dep(name = "score_logging")
git_override(
single_version_override(
module_name = "score_logging",
remote = "https://github.com/qorix-group/logging.git",
commit = "3718923aafc273531b1d0b3a240d821db24afbbc",
version = "0.1.0",
)
10 changes: 4 additions & 6 deletions bazel_common/score_modules_tooling.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ single_version_override(
)

bazel_dep(name = "score_test_scenarios")
git_override(
single_version_override(
module_name = "score_test_scenarios",
remote = "https://github.com/eclipse-score/testing_tools.git",
commit = "6b5e85863e8fb5687251c19f5bb81e0a3afdf581",
version = "0.4.0",
)

bazel_dep(name = "score_docs_as_code")
Expand All @@ -63,8 +62,7 @@ single_version_override(
)

bazel_dep(name = "score_process")
git_override(
single_version_override(
module_name = "score_process",
remote = "https://github.com/eclipse-score/process_description.git",
commit = "6c772cf05a493218a5ac6071361bf0b66c5427b2",
version = "1.4.3",
)
Loading