-
Notifications
You must be signed in to change notification settings - Fork 17
Remove id prefixes for mega-build (DR-004-Infra) #293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove id prefixes for mega-build (DR-004-Infra) #293
Conversation
- Remove all PROCESS_ prefixes from requirements and related files.
- Eliminate id_prefix from external needs configuration and code.
- Update tests and extensions to work without prefix logic.
- Make id_prefix handling optional in score_source_code_linker.
Why:
S-CORE requires bi-directional traceability for compliance
(see gd_req__req_traceability).
Previously, modules used prefixes for external needs, but this breaks
integration when building a single, unified documentation site
("mega-build").
This change implements "Option S: Single documentation build" from
decision record DR-004-Infra: Bi-directional traceability in docs
(https://eclipse-score.github.io/score/main/design_decisions/DR-004-infra.html).
Option S was chosen because it enables quick integration and unified
navigation, even though it results in longer build times and requires
dropping prefixes.
Since our id schemas already provide namespacing, removing prefixes
does not risk id clashes. This refactoring aligns with the decision to
prioritize integration speed and documentation consistency for releases.
License Check Results🚀 The license check job ran with the Bazel command: bazel run //src:license-checkStatus: Click to expand output |
|
Pre-discussed in #292 and https://github.com/orgs/eclipse-score/discussions/407#discussioncomment-14869810 |
|
I'm missing something... Why don't we get errors when building score documentation? |
|
The created documentation from the pull request is available at: docu-html |
AlexanderLanin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduces a major change... although not reported by testing :/
| assert isinstance(config.needs_external_needs, list) # pyright: ignore[reportUnknownMemberType] | ||
| config.needs_external_needs.append( # pyright: ignore[reportUnknownMemberType] | ||
| { | ||
| "id_prefix": needs_json_data["project_prefix"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trick for a backwards-compatible change would probably be to assign an id_prefix here unless some flag in conf.py is set to do otherwise. Then every repo has to set DISABLE_EXTERNAL_NEEDS_PREFIXES=True. Once everybody has done so, we can actually remove this line. Then everybody can remove the DISABLE_EXTERNAL_NEEDS_PREFIXES from their conf.py again.
That sounds like too much work considering that "everybody" is effectively only the score Platform repo.
| # Making the prefixes uppercase here to match sphinx_needs, | ||
| # as it does this internally too. | ||
| assert isinstance(config.allowed_external_prefixes, list) # pyright: ignore[reportAny] | ||
| config.allowed_external_prefixes.append( # pyright: ignore[reportUnknownMemberType] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can delete even more. Nobody in the whole score organization is actually doing anything with "allowed_external_prefixes" and it appears two more times in this repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint. I've now done another cleanup and removed the remaining unnecessary code as well.
Remove all remaining prefix configuration and logic that became unnecessary code after removing the PROCESS_ prefixes from requirements. Changes: - Remove project_prefix from docs/conf.py - Remove allowed_external_prefixes config value from score_metamodel - Simplify find_need() by removing prefix parameter and logic - Update tests to match new function signatures - Remove prefix-related test cases from test_codelink.py
|
I'll merge this now. If there are strong reservations, we can still revert it. |
|
Another note: due to time constraints (and simply not being worth it), I'll make this into a major release. |
Looks good, including source links already, I think for process description, there should be no impact, but we would need to update everything in score-repo for upgrading it. |
Remove prefixes for mega-build (DR-004-Infra) and align with docs-as-code 2.0.0 to enable single documentation mega-build where all repositories can be built together without prefix conflicts. Changes: - Remove project_prefix "S-CORE_" from docs/conf.py - Remove PROCESS_ prefix from all external need references - Fix incorrect need ID: wp__platform_sw_aou -> wp__requirements_sw_platform_aou Rationale: docs-as-code 2.0.0 removed module prefixes to support the mega-build approach where documentation from all repositories is built in a single Sphinx instance. Requirement IDs remain globally unique through built-in namespacing, eliminating the need for repository-specific prefixes. The mega-build also improves validation: the incorrect reference to wp__platform_sw_aou was only detected after removing prefixes, demonstrating better error detection in the unified build. Related: - eclipse-score/docs-as-code#293 - https://eclipse-score.github.io/score/main/design_decisions/DR-004-infra.html
Remove prefixes for mega-build (DR-004-Infra) and align with docs-as-code 2.0.0 to enable single documentation mega-build where all repositories can be built together without prefix conflicts. Changes: - Remove project_prefix "S-CORE_" from docs/conf.py - Remove PROCESS_ prefix from all external need references - Fix incorrect need ID: wp__platform_sw_aou -> wp__requirements_sw_platform_aou Rationale: docs-as-code 2.0.0 removed module prefixes to support the mega-build approach where documentation from all repositories is built in a single Sphinx instance. Requirement IDs remain globally unique through built-in namespacing, eliminating the need for repository-specific prefixes. The mega-build also improves validation: the incorrect reference to wp__platform_sw_aou was only detected after removing prefixes, demonstrating better error detection in the unified build. Related: - eclipse-score/docs-as-code#293 - https://eclipse-score.github.io/score/main/design_decisions/DR-004-infra.html


📌 Description
Why:
S-CORE requires bi-directional traceability for compliance (see gd_req__req_traceability).
Previously, modules used prefixes for external needs, but this breaks integration when building a single, unified documentation site ("mega-build").
This change implements "Option S: Single documentation build" from decision record DR-004-Infra: Bi-directional traceability in docs (https://eclipse-score.github.io/score/main/design_decisions/DR-004-infra.html).
Option S was chosen because it enables quick integration and unified navigation, even though it results in longer build times and requires dropping prefixes.
Since our id schemas already provide namespacing, removing prefixes does not risk id clashes. This refactoring aligns with the decision to prioritize integration speed and documentation consistency for releases.
🚨 Impact Analysis
✅ Checklist