Skip to content

refactor: transport external needs labels explicitly - #840

Merged
a-zw merged 3 commits into
eclipse-score:mainfrom
etas-contrib:refactor/sourcelinks-metamodel-env-vars-upstream-pr
Sep 18, 2026
Merged

a-zw merged 3 commits into
eclipse-score:mainfrom
etas-contrib:refactor/sourcelinks-metamodel-env-vars-upstream-pr

Conversation

@AlexanderLanin

@AlexanderLanin AlexanderLanin commented Sep 18, 2026

Copy link
Copy Markdown
Member

Motivation

External Needs enter the documentation build as Bazel labels. The sandboxed needs_json action did not pass those labels through the same path as regular documentation builds, and the old docs_sources/sphinx-collections path mixed documentation mounts with Needs inventory handling.

The goal is one clear architecture:

  • Bazel declares the inputs.
  • The CLI passes the labels and runfiles root to Sphinx.
  • score_metamodel handles external Needs inventories.
  • score_mounts handles documentation source mounts.
  • All build modes use the same path rules.

Sphinx accepts --define values as text, so the CLI sends the labels as JSON. This is only a transport format; the labels are parsed in score_metamodel, which resolves the corresponding Needs files.

Changes

  • Pass explicitly declared external Needs labels from docs() into the sandboxed Needs action through EXTERNAL_NEEDS_LABELS.
  • Combine the relevant Bazel label inputs in the documentation CLI and pass them to Sphinx with the runfiles root.
  • Centralize label parsing and runfiles path rules for needs_json and needs_json_file.
  • Register resolved files as Sphinx-Needs external inventory entries.
  • Remove the obsolete config.collections path and sphinx-collections dependency.
  • Keep documentation source mounts in mounts_manifest, consumed by score_mounts.
  • Update the affected tests.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-840: https://eclipse-score.github.io/docs-as-code/pr-840/

This comment was marked as resolved.

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

The transport and resolution paths are consistent, obsolete integration is removed, and focused tests cover the new behavior.

Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@AlexanderLanin
AlexanderLanin marked this pull request as ready for review September 18, 2026 12:20

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

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.

Talked about in a call and all questions answered.

Looks good

@a-zw
a-zw merged commit d66c8ad into eclipse-score:main Sep 18, 2026
22 checks passed
@a-zw
a-zw deleted the refactor/sourcelinks-metamodel-env-vars-upstream-pr branch September 18, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants