Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 18, 2025

This PR resolves the issue where Palace simulations fail during documentation builds in CI due to Palace not being available in the build environment.

Problem

Documentation builds were failing with errors like:

RuntimeError: palace not found. Make sure it is available in your PATH or via Spack.

This occurred because the pages.yml workflow for building docs didn't include Palace setup, while the test_palace job in test_code.yml successfully uses Apptainer containers.

Solution

1. Enhanced Palace Detection

  • Created gplugins/palace/utils.py with robust Palace executable detection
  • Supports multiple installation methods: PATH → Apptainer/Singularity containers → Spack fallback
  • Automatically detects CI environments and container runtimes
  • Generates execution scripts for containerized Palace

2. Updated Palace Execution

  • Modified get_capacitance.py and get_scattering.py to use the new detection utility
  • Maintains backward compatibility with existing Spack and PATH installations
  • Provides consistent error messaging across modules

3. Enhanced Documentation CI

  • Updated pages.yml workflow to include Palace container setup matching test_palace job
  • Implements identical caching strategy for efficient container reuse
  • Added graceful fallback when container builds fail or timeout
  • Conditional Palace setup with proper error handling

Key Features

  • Container Cache Reuse: Uses same cache key as test_palace job for efficient builds
  • Graceful Degradation: Clear error messages when Palace unavailable, no silent failures
  • Multi-Runtime Support: Works with both apptainer and singularity
  • Backward Compatible: Existing Palace installations continue working unchanged
  • CI-Optimized: Automatic detection of GitHub Actions environment

Testing

Palace notebooks in documentation will now execute successfully when Apptainer containers are available, with efficient cache sharing between test and documentation workflows.

Fixes #651.

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:

  • astral.sh
    • Triggering command: curl -LsSf REDACTED (dns block)

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


💡 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.

@github-actions github-actions bot added the bug Something isn't working label Sep 18, 2025
Co-authored-by: nikosavola <7860886+nikosavola@users.noreply.github.com>
sourcery-ai[bot]
sourcery-ai bot previously requested changes Sep 18, 2025
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New security issues found

Co-authored-by: nikosavola <7860886+nikosavola@users.noreply.github.com>
Copilot AI changed the title [WIP] Palace is not available when generating docs in CI Fix Palace availability in CI documentation builds using Apptainer containers Sep 18, 2025
Copilot AI requested a review from nikosavola September 18, 2025 11:07
@nikosavola nikosavola marked this pull request as ready for review September 19, 2025 14:22
Copy link
Contributor

@joamatab joamatab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikosavola there seems to be a conflict

@nikosavola nikosavola merged commit 8745ace into main Nov 10, 2025
15 checks passed
@nikosavola nikosavola deleted the copilot/fix-651 branch November 10, 2025 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Palace is not available when generating docs in CI

3 participants