Skip to content

feat: docs_bundle - #671

Draft
AlexanderLanin wants to merge 6 commits into
mainfrom
bundles
Draft

feat: docs_bundle#671
AlexanderLanin wants to merge 6 commits into
mainfrom
bundles

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

Bundles!

📌 Description

🚨 Impact Analysis

  • This change does not violate any tool requirements and is covered by existing tool requirements
  • This change does not violate any design decisions
  • Otherwise I have created a ticket for new tool qualification

✅ Checklist

  • Added/updated documentation for new or changed features
  • Added/updated tests to cover the changes
  • Followed project coding standards and guidelines

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //src:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 9535f60c-0582-4b65-9d5b-90d83f874e10
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
DEBUG: /home/runner/.bazel/external/rules_python+/python/private/repo_utils.bzl:101:16: 
rules_python:coverage_dep WARNING: rules_python's bundled coverage tool has no wheel for python_version=3.12.13, platform=ppc64le-unknown-linux-gnu. `bazel coverage` will produce empty lcov for py_test targets in this configuration. Either pin python_version to a version in the bundled set (see python/private/coverage_deps.bzl), or configure coverage manually via py_runtime.coverage_tool. See docs/coverage.md.
DEBUG: /home/runner/.bazel/external/rules_python+/python/private/repo_utils.bzl:101:16: 
rules_python:coverage_dep WARNING: rules_python's bundled coverage tool has no wheel for python_version=3.12.13, platform=riscv64-unknown-linux-gnu. `bazel coverage` will produce empty lcov for py_test targets in this configuration. Either pin python_version to a version in the bundled set (see python/private/coverage_deps.bzl), or configure coverage manually via py_runtime.coverage_tool. See docs/coverage.md.
DEBUG: /home/runner/.bazel/external/rules_python+/python/private/repo_utils.bzl:101:16: 
rules_python:coverage_dep WARNING: rules_python's bundled coverage tool has no wheel for python_version=3.12.13, platform=s390x-unknown-linux-gnu. `bazel coverage` will produce empty lcov for py_test targets in this configuration. Either pin python_version to a version in the bundled set (see python/private/coverage_deps.bzl), or configure coverage manually via py_runtime.coverage_tool. See docs/coverage.md.
DEBUG: /home/runner/.bazel/external/rules_python+/python/private/repo_utils.bzl:101:16: 
rules_python:coverage_dep WARNING: rules_python's bundled coverage tool has no wheel for python_version=3.12.13, platform=x86_64-unknown-linux-musl. `bazel coverage` will produce empty lcov for py_test targets in this configuration. Either pin python_version to a version in the bundled set (see python/private/coverage_deps.bzl), or configure coverage manually via py_runtime.coverage_tool. See docs/coverage.md.
Loading: 0 packages loaded
    currently loading: src
Loading: 0 packages loaded
    currently loading: src
WARNING: Target pattern parsing failed.
ERROR: Skipping '//src:license-check': no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
ERROR: no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
INFO: Elapsed time: 8.265s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

runtime_mounts: list[dict[str, object]] = []
for spec in manifest.mounts:
walk_dir = _resolve_walk_dir(manifest, spec, ws_root)
if not walk_dir.is_dir():
(tmp_path / "src").symlink_to(runfiles_workspace / "src", target_is_directory=True)

copied_source_dir = tmp_path / "docs"
shutil.copytree(source_dir, copied_source_dir)
env["SCORE_SOURCELINKS"] = str(sourcelinks)

return subprocess.run(
[str(docs_binary)],
runtime_mounts: list[dict[str, object]] = []
for spec in manifest.mounts:
walk_dir = _resolve_walk_dir(manifest, spec, ws_root)
if not walk_dir.is_dir():
(tmp_path / "src").symlink_to(runfiles_workspace / "src", target_is_directory=True)

copied_source_dir = tmp_path / "docs"
shutil.copytree(source_dir, copied_source_dir)
env["SCORE_SOURCELINKS"] = str(sourcelinks)

return subprocess.run(
[str(docs_binary)],
Comment thread docs.bzl

docs_sources_env["ACTION"] = "incremental"
py_binary(
name = "docs_combo",

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.

Moving too fast. Keep docs_combo for backwards-compatibility.

Comment thread docs.bzl
exec root in a sandbox) is the caller's responsibility.
"""
manifest_path = Path(manifest_path)
data = json.loads(manifest_path.read_text(encoding="utf-8"))
def test_docs_build_mounts_bundle_and_extends_toctree(tmp_path: Path):
"""A nested bundle keeps its placement and becomes part of the host site."""
mounts_manifest = runfile("FIXTURE_MOUNTS_MANIFEST")
manifest = json.loads(mounts_manifest.read_text(encoding="utf-8"))
"concepts/example_bundle",
"concepts/example_bundle/child",
]
sourcelinks = json.loads(runfile("FIXTURE_SOURCELINKS").read_text(encoding="utf-8"))
def test_pure_aggregator_keeps_declared_mount_order():
"""An aggregator contributes no implicit package sources or reordered mounts."""
manifest = json.loads(
runfile("ORDERED_AGGREGATE_MANIFEST").read_text(encoding="utf-8")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants