Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 3, 2026

The website builder (bazel/website/) is intended to be generator-agnostic but lacks tests to validate this design. This adds comprehensive test coverage and documents the current state of generator-agnostic support.

Test Infrastructure

  • //website/tests:website_generation_test - Validates basic website generation with Pelican
  • //website/tests:website_parameterized_test - Tests custom exclude patterns and mappings
  • Shell test harness verifies tarball structure and HTML output

Run with: cd bazel && bazel test //website/tests/...

Fixtures

Minimal test content, theme, and Pelican config demonstrating the macro interface:

static_website(
    name = "test_basic_website",
    content = ":test_content",
    theme = ":test_theme",
    config = ":test_config.py",
    mappings = {},  # Empty mappings work
    # generator = ... # Customizable
)

Generator-Agnostic Analysis

Already flexible:

  • Generator parameter accepts any Bazel target
  • Simple interface: generator receives content path, outputs to configured location
  • All parameters (exclude, mappings, paths) are overridable

Pelican-specific defaults:

  • exclude list includes Pelican artifacts: archives.html, authors.html, categories.html, tags.html
  • mappings assume Pelican theme structure: theme/css → theme/static/css

Tests demonstrate these can be overridden. Future generators can either override these parameters or use a generator-specific wrapper (e.g., pelican_website()) that sets appropriate defaults while keeping static_website() generic.

See bazel/website/tests/README.md for detailed findings and recommendations.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • mirror.bazel.build
    • Triggering command: /build/bazel_root/install/fb2a7f6d344d2f4e335882534df59296/embedded_tools/jdk/bin/java bazel(bazel) --add-opens=java.base/java.lang=ALL-UNNAMED -Xverify:none -Djava.util.logging.config.file=/build/bazel_root/base/javalog.properties -Dcom.google.devtools.build.lib.util.LogHandlerQuerier.class=com.google.devtools.build.lib.util.SimpleLogHandler$HandlerQuerier -XX:-MaxFDLimit -Djava.library.path=/build/bazel_root/install/fb2a7f6d344d2f4e335882534df59296/embedded_tools/jdk/lib:/build/bazel_root/install/fb2a7f6d344d2f4e335882534df59296/embedded_tools/jdk/lib/server:/build/bazel_root/install/fb2a7f6d344d2f4e335882534df59296/ -Dfile.encoding=ISO-8859-1 -Duser.country= -Duser.language= -Duser.variant= -Djavax.net.ssl.trustStore=/tmp/custom-cacerts -Djavax.net.ssl.trustStorePassword=changeit -jar /build/bazel_root/install/fb2a7f6d344d2f4e335882534df59296/A-server.jar --max_idle_secs=10800 --noshutdown_on_low_sys_mem --connect_timeout_secs=30 --output_user_root=/build/bazel_root --install_base=/build/bazel_root/install/fb2a7f6d344d2f4e335882534df59296 (dns block)
  • www.googleapis.com
    • Triggering command: /usr/local/bin/bazel bazel shutdown (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

this repo has a bazel website builder - the idea is that its agnostic to the generator - with the default being python pelican

not sure how well it meets this criteria atm - but it will need to - i want to add a different generator in a later iteration (ie out of scope for this task)

mostly right now im more interested in adding some bazel tests for the current setup (and fixing anything that makes it non-agnostic atm)

im not great with bazel tests - ive always found them confused/confusing about whether they are testing rule or target - but either way this website generator is used in a few places (envoyproxy/envoy-website, envoyproxy/apt) so really i want to get some testing on it before hacking


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@netlify
Copy link

netlify bot commented Jan 3, 2026

Deploy Preview for nifty-bassi-e26446 ready!

Name Link
🔨 Latest commit 6f3209c
🔍 Latest deploy log https://app.netlify.com/projects/nifty-bassi-e26446/deploys/695928ce5d489b000867d9ea
😎 Deploy Preview https://deploy-preview-3371--nifty-bassi-e26446.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI changed the title [WIP] Add Bazel tests for website builder Add Bazel tests for website builder and document generator-agnostic design Jan 3, 2026
Copilot AI requested a review from phlax January 3, 2026 13:43
@phlax phlax force-pushed the copilot/add-bazel-tests-website-builder branch from 0f1a6d3 to 95c35c4 Compare January 3, 2026 14:30
Signed-off-by: Ryan Northey <[email protected]>
@phlax phlax force-pushed the copilot/add-bazel-tests-website-builder branch from 95c35c4 to 6f3209c Compare January 3, 2026 14:33
@phlax phlax marked this pull request as ready for review January 3, 2026 15:42
@phlax phlax changed the title Add Bazel tests for website builder and document generator-agnostic design bazel/website: Add tests Jan 3, 2026
@phlax phlax merged commit 3902e87 into main Jan 3, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants