Skip to content

Commit da3c5db

Browse files
committed
fix review findings
1 parent c03f9bd commit da3c5db

10 files changed

Lines changed: 190 additions & 122 deletions

docs/integration_process/integration_process.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ Integration Process
1717
###################
1818

1919
This document is a step-by-step *how-to* for module owners who want to integrate
20-
their own S-CORE module into the **Reference Integration** for the first time.
20+
their own S-CORE module into the **Reference Integration** — whether for the
21+
first time, when bringing it back after an exclusion, or to make it part of the
22+
S-CORE releases in general.
2123

2224
It walks you through everything from registering the module in
2325
``known_good.json`` over wiring it into the Bazel build, the showcases, the
@@ -54,7 +56,12 @@ Before you start, make sure that:
5456
* The module name follows the ``score_<name>`` convention (e.g.
5557
``score_communication``). The same name is used as the Bazel
5658
``bazel_dep`` / repository name (``@score_<name>//...``).
57-
* The module builds and tests pass standalone on Linux ``x86_64``.
59+
* Your module is registered in the
60+
`S-CORE Bazel registry <https://github.com/eclipse-score/bazel_registry>`_ so
61+
that it can be resolved as a ``bazel_dep`` during the integration.
62+
* The module builds and tests pass standalone on all four currently supported
63+
target platforms: Linux ``x86_64``, QNX 8 ``x86_64``, Red Hat AutoSD
64+
``x86_64`` and EB corbos Linux (Safety Apps) ``aarch64``.
5865
* You know the commit hash you want to pin (the integration always pins an exact
5966
commit, never a floating branch).
6067

docs/integration_process/reference.rst

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ and their images are listed in :ref:`supported_platforms` (Step 4).
2626
CI checks
2727
---------
2828

29-
The pipelines live under `.github/workflows <../../.github/workflows>`_. Most
29+
The pipelines live under `.github/workflows <https://github.com/eclipse-score/reference_integration/tree/main/.github/workflows>`_. Most
3030
operate on ``//...`` and pick up your module without changes; the table says
3131
what each check verifies and whether you typically need to touch anything.
3232

@@ -46,61 +46,61 @@ declared in the workflows.
4646
- What it verifies
4747
- Gating
4848
- Your action
49-
* - `build_and_test_qnx.yml <../../.github/workflows/build_and_test_qnx.yml>`_
49+
* - `build_and_test_qnx.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/build_and_test_qnx.yml>`_
5050
- Builds the QNX IFS and runs integration tests on QEMU.
5151
- **yes**
5252
- none (graph-wide)
53-
* - `build_and_test_autosd.yml <../../.github/workflows/build_and_test_autosd.yml>`_
53+
* - `build_and_test_autosd.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/build_and_test_autosd.yml>`_
5454
- Builds the AutoSD OCI image with the Automotive Image Builder.
5555
- **yes**
5656
- none (graph-wide)
57-
* - `build_and_test_ebclfsa.yml <../../.github/workflows/build_and_test_ebclfsa.yml>`_
57+
* - `build_and_test_ebclfsa.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/build_and_test_ebclfsa.yml>`_
5858
- Builds the EBcLfSA image and runs the high-integrity safety tests.
5959
- **yes**
6060
- none (graph-wide)
61-
* - `known_good_correct.yml <../../.github/workflows/known_good_correct.yml>`_
61+
* - `known_good_correct.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/known_good_correct.yml>`_
6262
- Fails if the generated Bazel fragments drift from ``known_good.json``.
6363
- **yes**
6464
- commit step 1.2 output
65-
* - `bzlmod-lock.yml <../../.github/workflows/bzlmod-lock.yml>`_
65+
* - `bzlmod-lock.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/bzlmod-lock.yml>`_
6666
- Verifies ``MODULE.bazel.lock`` is consistent with the module graph.
6767
- **yes**
6868
- update lockfile if it fails
69-
* - `format.yml <../../.github/workflows/format.yml>`_
69+
* - `format.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/format.yml>`_
7070
- Runs the code-formatting checks.
7171
- **yes**
7272
- run the format targets
73-
* - `codeql-multiple-repo-scan.yml <../../.github/workflows/codeql-multiple-repo-scan.yml>`_
73+
* - `codeql-multiple-repo-scan.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/codeql-multiple-repo-scan.yml>`_
7474
- Multi-repository CodeQL security scan across the integrated modules.
7575
- **yes**
7676
- none
77-
* - `test_and_docs.yml <../../.github/workflows/test_and_docs.yml>`_
77+
* - `test_and_docs.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/test_and_docs.yml>`_
7878
- Code-quality checks, builds the docs and reports, publishes to Pages.
7979
- **yes**
8080
- wire docs in Step 2, reports in Step 7
81-
* - `check_release_approvals.yml <../../.github/workflows/check_release_approvals.yml>`_
81+
* - `check_release_approvals.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/check_release_approvals.yml>`_
8282
- Enforces required approvals on PRs targeting ``releases/*`` branches.
8383
- release branches only
8484
- none
85-
* - `build_and_test_linux.yml <../../.github/workflows/build_and_test_linux.yml>`_
85+
* - `build_and_test_linux.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/build_and_test_linux.yml>`_
8686
- Builds the Linux x86_64 image and runs feature integration tests on Docker.
8787
- no
8888
- none (graph-wide)
89-
* - `internal_tests.yml <../../.github/workflows/internal_tests.yml>`_
89+
* - `internal_tests.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/internal_tests.yml>`_
9090
- Runs the integration tooling tests (``//scripts/tooling:tooling_tests``).
9191
- no
9292
- only if you change scripts
93-
* - `docs_cleanup.yml <../../.github/workflows/docs_cleanup.yml>`_
93+
* - `docs_cleanup.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/docs_cleanup.yml>`_
9494
- Scheduled cleanup of published documentation versions.
9595
- no
9696
- none
97-
* - `test_integration.yml <../../.github/workflows/test_integration.yml>`_ /
98-
`reusable_smoke-test.yml <../../.github/workflows/reusable_smoke-test.yml>`_ /
99-
`reusable_integration-build.yml <../../.github/workflows/reusable_integration-build.yml>`_
97+
* - `test_integration.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/test_integration.yml>`_ /
98+
`reusable_smoke-test.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/reusable_smoke-test.yml>`_ /
99+
`reusable_integration-build.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/reusable_integration-build.yml>`_
100100
- Smoke-test / reusable build of the latest module ``main`` branches.
101101
- no
102102
- add runtime targets to
103-
`ci/showcase_targets_run.txt <../../ci/showcase_targets_run.txt>`_
103+
`ci/showcase_targets_run.txt <https://github.com/eclipse-score/reference_integration/blob/main/ci/showcase_targets_run.txt>`_
104104

105105
.. _reports:
106106

@@ -119,30 +119,30 @@ The consolidated outputs published by the integration. They are built by
119119
- Source / target
120120
* - Consolidated documentation
121121
- All integrated module docs merged into one Sphinx site.
122-
- `BUILD <../../BUILD>`_ ``docs(...)`` → ``bazel run //:docs_combo``
122+
- `BUILD <https://github.com/eclipse-score/reference_integration/blob/main/BUILD>`_ ``docs(...)`` → ``bazel run //:docs_combo``
123123
* - Platform verification report
124124
- Per-release requirements/architecture verification, safety analyses and
125125
per-test-case results.
126-
- `docs/verification_report/platform_verification_report.rst <../../docs/verification_report/platform_verification_report.rst>`_
126+
- `docs/verification_report/platform_verification_report.rst <https://github.com/eclipse-score/reference_integration/blob/main/docs/verification_report/platform_verification_report.rst>`_
127127
* - Unit test summary
128128
- Per-module unit-test execution table (generated at build time by
129129
``quality_runners.py``).
130-
- `docs/verification_report/unit_test_summary.md <../../docs/verification_report/unit_test_summary.md>`_
130+
- `docs/verification_report/unit_test_summary.md <https://github.com/eclipse-score/reference_integration/blob/main/docs/verification_report/unit_test_summary.md>`_
131131
* - Coverage summary
132132
- Per-module C++ and Rust coverage table (generated at build time by
133133
``quality_runners.py``).
134-
- `docs/verification_report/coverage_summary.md <../../docs/verification_report/coverage_summary.md>`_
134+
- `docs/verification_report/coverage_summary.md <https://github.com/eclipse-score/reference_integration/blob/main/docs/verification_report/coverage_summary.md>`_
135135
* - C++ coverage (per module)
136136
- lcov/genhtml line/function/branch report for modules declaring ``cpp``.
137-
- `scripts/quality_runners.py <../../scripts/quality_runners.py>`_ →
137+
- `scripts/quality_runners.py <https://github.com/eclipse-score/reference_integration/blob/main/scripts/quality_runners.py>`_ →
138138
``python3 scripts/quality_runners.py --modules-to-test <module>``
139139
* - Rust coverage reports
140140
- Per-module Rust line coverage (C0/C1) for modules declaring ``rust``.
141-
- `rust_coverage/BUILD <../../rust_coverage/BUILD>`_ →
141+
- `rust_coverage/BUILD <https://github.com/eclipse-score/reference_integration/blob/main/rust_coverage/BUILD>`_ →
142142
``bazel run //rust_coverage:rust_coverage_<module>``
143143
* - Overall feature & process status
144144
- Feature/process completion dashboard derived from the pinned module repos.
145-
- `docs/s_core_v_1/roadmap/overall_status.rst <../../docs/s_core_v_1/roadmap/overall_status.rst>`_
145+
- `docs/s_core_v_1/roadmap/overall_status.rst <https://github.com/eclipse-score/reference_integration/blob/main/docs/s_core_v_1/roadmap/overall_status.rst>`_
146146
* - Integration status dashboard
147147
- Live build/health overview of the integration.
148148
- `status_dashboard.html <https://eclipse-score.github.io/reference_integration/main/status_dashboard.html>`_

docs/integration_process/step_1_add_module.rst

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@
1515
Step 1 — Adding module to reference integration
1616
=================================================
1717

18-
**What this unlocks:** your module becomes a *known* part of the integration,
19-
pinned at an exact commit, enters the **Bazel module graph** and builds
20-
cleanly against every other module. This is the foundation every later step
21-
builds on — afterwards ``@score_my_module//...`` resolves and any other
18+
.. admonition:: What it unlocks
19+
:class: tip
20+
21+
**Module in the graph** — Your module becomes a *known* part of the
22+
integration, pinned at an exact commit, enters the **Bazel module graph** and
23+
builds cleanly against every other module. This is the foundation every later
24+
step builds on — afterwards ``@score_my_module//...`` resolves and any other
2225
target can depend on your module.
2326

2427
1.1 Register the module in ``known_good.json``
@@ -28,7 +31,7 @@ Step 1 — Adding module to reference integration
2831
which commit — are part of the integration. Every other generated file is
2932
derived from it, so this is always the first change.
3033

31-
Open `known_good.json <../../known_good.json>`_. It has two top-level groups
34+
Open `known_good.json <https://github.com/eclipse-score/reference_integration/blob/main/known_good.json>`_. It has two top-level groups
3235
under ``modules``:
3336

3437
* ``target_sw`` — the S-CORE software modules that are built and shipped
@@ -114,14 +117,28 @@ hand. After editing the JSON, regenerate them:
114117
115118
This (re)writes:
116119

117-
* `bazel_common/score_modules_target_sw.MODULE.bazel <../../bazel_common/score_modules_target_sw.MODULE.bazel>`_
120+
* `bazel_common/score_modules_target_sw.MODULE.bazel <https://github.com/eclipse-score/reference_integration/blob/main/bazel_common/score_modules_target_sw.MODULE.bazel>`_
118121
— a ``bazel_dep`` + ``git_override`` block for your module. This file is
119122
pulled into the build via ``include(...)`` in
120-
`MODULE.bazel <../../MODULE.bazel>`_.
121-
* `rust_coverage/BUILD <../../rust_coverage/BUILD>`_ — a
123+
`MODULE.bazel <https://github.com/eclipse-score/reference_integration/blob/main/MODULE.bazel>`_.
124+
* `rust_coverage/BUILD <https://github.com/eclipse-score/reference_integration/blob/main/rust_coverage/BUILD>`_ — a
122125
``rust_coverage_report`` target for every module that declares ``rust`` in its
123126
``langs`` (skipped for C++-only modules).
124127

128+
Next, refresh the Bazel lockfile so it reflects the updated module graph:
129+
130+
.. code-block:: bash
131+
132+
bazel mod deps --lockfile_mode=update
133+
134+
Adding your module introduces a new ``bazel_dep`` / ``git_override`` into the
135+
module graph, which changes the set of resolved dependencies. Running ``bazel
136+
mod deps`` with ``--lockfile_mode=update`` re-resolves the graph and writes the
137+
new dependencies into `MODULE.bazel.lock <https://github.com/eclipse-score/reference_integration/blob/main/MODULE.bazel.lock>`_. Committing
138+
an up-to-date lockfile keeps the dependency resolution reproducible for everyone
139+
and is required by the ``Bzlmod Lockfile Check`` CI job (see section 1.4), which
140+
fails if the committed lockfile is out of sync with the module graph.
141+
125142
Commit the regenerated files together with the ``known_good.json`` change. CI
126143
verifies that the generated files are in sync with the JSON (see the
127144
``known_good_correct`` workflow), so a manual edit that drifts from the JSON
@@ -135,9 +152,17 @@ will fail.
135152
If the module does not build cleanly out-of-tree (e.g. label visibility issues),
136153
add patch files under ``patches/<module>/`` and reference them from the
137154
``bazel_patches`` list of the module entry in ``known_good.json``. See
138-
`patches/communication <../../patches/communication>`_ for a worked example. The
155+
`patches/communication <https://github.com/eclipse-score/reference_integration/tree/main/patches/communication>`_ for a worked example. The
139156
generator emits ``patches = [...]`` with ``patch_strip = 1`` automatically.
140157

158+
.. note::
159+
160+
Patching a module should be the **exception, not the rule**. A patch keeps a
161+
local divergence from the upstream module that has to be maintained and
162+
re-based on every update. Prefer fixing the underlying issue in the module's
163+
own repository so it builds cleanly out-of-tree, and only reach for a patch
164+
as a temporary, last-resort workaround.
165+
141166
1.4 CI checks that the module was added correctly
142167
-------------------------------------------------
143168

@@ -153,14 +178,14 @@ check that the generated metadata is in sync with ``known_good.json``:
153178
- What it verifies
154179
- Fix if it fails
155180
* - Known Good Matches Bazel
156-
(`known_good_correct.yml <../../.github/workflows/known_good_correct.yml>`_)
181+
(`known_good_correct.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/known_good_correct.yml>`_)
157182
- Re-runs ``update_module_from_known_good.py`` and fails if the generated
158183
Bazel fragments differ from what you committed — i.e. ``known_good.json``
159184
and the generated ``*.MODULE.bazel`` / ``rust_coverage/BUILD`` are out of
160185
sync.
161186
- re-run step 1.2 and commit the regenerated files
162187
* - Bzlmod Lockfile Check
163-
(`bzlmod-lock.yml <../../.github/workflows/bzlmod-lock.yml>`_)
188+
(`bzlmod-lock.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/bzlmod-lock.yml>`_)
164189
- Verifies ``MODULE.bazel.lock`` is consistent with the updated module
165190
graph (your new ``bazel_dep`` / ``git_override``).
166191
- refresh and commit ``MODULE.bazel.lock``

docs/integration_process/step_2_documentation.rst

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,20 @@
1515
Step 2 — Join the documentation and process-compliance checks
1616
=============================================================
1717

18-
**What this unlocks:** your module's documentation appears in the single,
19-
combined docs site that is built and published for the whole integration —
20-
and, just as importantly, your module's **requirements, architecture and
21-
other process artifacts are validated against the S-CORE process** as part of
22-
the same build. This is usually the first thing you *extend the integration
23-
with* after the module is in the graph.
18+
.. admonition:: What it unlocks
19+
:class: tip
20+
21+
**Docs & process checks** — Your module's documentation appears in the
22+
single, combined docs site that is built and published for the whole
23+
integration — and, just as importantly, your module's **requirements,
24+
architecture and other process artifacts are validated against the S-CORE
25+
process** as part of the same build. This is usually the first thing you
26+
*extend the integration with* after the module is in the graph.
2427

2528
Building the docs is not only about rendering pages. The integration uses the
2629
docs-as-code toolchain (`score_docs_as_code
2730
<https://github.com/eclipse-score/docs-as-code>`_, pulled in via
28-
``score_sphinx_bundle`` in `docs/conf.py <../../docs/conf.py>`_), which runs the
31+
``score_sphinx_bundle`` in `docs/conf.py <https://github.com/eclipse-score/reference_integration/blob/main/docs/conf.py>`_), which runs the
2932
**S-CORE metamodel checks** on every ``needs`` object: requirements,
3033
architecture elements, safety artifacts and their links must conform to the
3134
process model defined in `score_process
@@ -38,7 +41,7 @@ The integration builds one Sphinx site that merges the docs of every integrated
3841
module. To pull yours in:
3942

4043
#. Add your module's ``needs_json`` to the ``docs(...)`` rule's ``data`` list in
41-
the top-level `BUILD <../../BUILD>`_ file:
44+
the top-level `BUILD <https://github.com/eclipse-score/reference_integration/blob/main/BUILD>`_ file:
4245

4346
.. code-block:: python
4447
@@ -67,18 +70,18 @@ module. To pull yours in:
6770
- Page to edit
6871
- Put your module here if it is…
6972
* - **Modules**
70-
- `docs/sw_components.rst <../../docs/sw_components.rst>`_
73+
- `docs/sw_components.rst <https://github.com/eclipse-score/reference_integration/blob/main/docs/sw_components.rst>`_
7174
- an S-CORE **software module** that ships in the integration — i.e. it
7275
lives under ``modules.target_sw`` in ``known_good.json`` (communication,
7376
persistency, logging, orchestrator, baselibs, …). This is the common
7477
case.
7578
* - **Process, Methods & Tools**
76-
- `docs/process_methods_tools.rst <../../docs/process_methods_tools.rst>`_
79+
- `docs/process_methods_tools.rst <https://github.com/eclipse-score/reference_integration/blob/main/docs/process_methods_tools.rst>`_
7780
- a **tooling / process** repo from ``modules.tooling`` (platform, process,
7881
docs-as-code) rather than a shipped software module.
7982

8083
For a normal software module, add the entry to the ``Modules`` toctree in
81-
`docs/sw_components.rst <../../docs/sw_components.rst>`_, next to the existing
84+
`docs/sw_components.rst <https://github.com/eclipse-score/reference_integration/blob/main/docs/sw_components.rst>`_, next to the existing
8285
modules:
8386

8487
.. code-block:: rst
@@ -124,7 +127,7 @@ The docs are built and published by the ``test_and_docs`` workflow (see
124127
**Planned refactoring.** Today documentation generation is entangled with
125128
unit tests, coverage and feature integration tests in the single
126129
``test_and_docs`` workflow
127-
(`test_and_docs.yml <../../.github/workflows/test_and_docs.yml>`_). This
130+
(`test_and_docs.yml <https://github.com/eclipse-score/reference_integration/blob/main/.github/workflows/test_and_docs.yml>`_). This
128131
should be refactored: the documentation build (including the metamodel /
129132
process-compliance checks) belongs in a **dedicated, reusable workflow shared
130133
across all S-CORE repositories**, hosted centrally in the

0 commit comments

Comments
 (0)