Skip to content

Conversation

@chrisburr
Copy link
Member

Fixes #706

This PR removes the problematic LocalGitConfigSource class which encountered file permission issues in containerized deployments when using bind-mounted read-only directories.

Problem

The LocalGitConfigSource class encountered multiple operational challenges in containerized deployments:

  • File permission conflicts between root-owned mount points and container users
  • Git security checks rejecting insecure file permissions during rev-parse operations
  • Incompatibility with bare repositories
  • Read-only volume constraints preventing necessary git operations

Solution

  • Removed LocalGitConfigSource class that directly accessed local git repositories
  • Created FileGitConfigSource as an alias to RemoteGitConfigSource for git+file:// URLs
  • FileGitConfigSource clones repositories into temporary directories, avoiding permission issues
  • Removed _apply_default_scheme() that automatically defaulted to git+file://
  • Updated CLI config validation to support both git+file:// and file:// schemes
  • Updated documentation to recommend git+https:// for production deployments

Benefits

  • ✅ Eliminates file permission conflicts in containerized environments
  • ✅ Provides consistent behavior between remote and local git repositories
  • ✅ Maintains backward compatibility for existing git+file:// usage
  • ✅ Resolves git security check failures with read-only volumes
  • ✅ Simplifies codebase by reusing RemoteGitConfigSource implementation

Changes

  • diracx-core/src/diracx/core/config/sources.py: Removed LocalGitConfigSource, added FileGitConfigSource
  • diracx-core/src/diracx/core/config/__init__.py: Removed LocalGitConfigSource from exports
  • diracx-cli/src/diracx/cli/internal/config.py: Updated to support file:// scheme
  • docs/admin/explanations/configuration.md: Updated documentation

Testing

Existing tests using git+file:// URLs should continue to work with the new FileGitConfigSource implementation. Local development workflows using run_local.sh remain unchanged.

chrisburr and others added 3 commits October 22, 2025 06:04
Add GitHub Actions workflow to automate version bumping and changelog
generation using googleapis/release-please-action on main branch pushes.
This addresses issue DIRACGrid#706 by removing the problematic LocalGitConfigSource
class which encountered file permission issues in containerized deployments.

Changes:
- Removed LocalGitConfigSource class that directly accessed local git repos
- Created FileGitConfigSource as an alias to RemoteGitConfigSource for git+file:// URLs
- FileGitConfigSource clones repos into temporary directories, avoiding permission issues
- Removed _apply_default_scheme() that automatically defaulted to git+file://
- Updated CLI config validation to support both git+file:// and file:// schemes
- Updated documentation to recommend git+https for production use

The new approach uses git clone for both remote and local repositories,
avoiding the security and permission problems with bind-mounted directories.

Fixes DIRACGrid#706
@read-the-docs-community
Copy link

Documentation build overview

📚 diracx | 🛠️ Build #30360099 | 📁 Comparing a181451 against latest (927d51b)


🔍 Preview build

Show files changed (116 files in total): 📝 115 modified | ➕ 0 added | ➖ 1 deleted
File Status
404.html 📝 modified
index.html 📝 modified
REFERENCE/index.html 📝 modified
RUN_PROD/index.html 📝 modified
SECURITY/index.html 📝 modified
SSO/index.html 📝 modified
admin/index.html 📝 modified
dev/index.html 📝 modified
roadmap/index.html 📝 modified
user/index.html 📝 modified
admin/deploy_instance/index.html 📝 modified
admin/explanations/index.html 📝 modified
admin/how-to/index.html 📝 modified
admin/manage_dependencies/index.html 📝 modified
admin/manage_release/index.html 📝 modified
admin/reference/index.html 📝 modified
admin/tutorials/index.html 📝 modified
dev/explanations/index.html 📝 modified
dev/how-to/index.html 📝 modified
dev/manage_extension/index.html 📝 modified
dev/reference/index.html 📝 modified
dev/setup_environment/index.html 📝 modified
dev/tutorials/index.html 📝 modified
dev/web-arch/index.html 📝 modified
developer/contribute/index.html 📝 modified
developer/manage_extension/index.html 📝 modified
developer/setup_environment/index.html 📝 modified
user/explanations/index.html 📝 modified
user/how-to/index.html 📝 modified
user/reference/index.html 📝 modified
user/tutorials/index.html 📝 modified
user/web/index.html 📝 modified
admin/explanations/auth-with-diracx/index.html 📝 modified
admin/explanations/auth-with-external/index.html 📝 modified
admin/explanations/chart-structure/index.html 📝 modified
admin/explanations/configuration/index.html 📝 modified
admin/explanations/database-management/index.html 📝 modified
admin/explanations/opentelemetry/index.html 📝 modified
admin/explanations/sandbox-store/index.html 📝 modified
admin/explanations/user-management/index.html 📝 modified
admin/how-to/debugging/index.html 📝 modified
admin/how-to/install/index.html 📝 modified
admin/how-to/rotate-a-secret/index.html 📝 modified
admin/how-to/upgrading/index.html 📝 modified
admin/reference/env-variables/index.html 📝 modified
admin/reference/security_model/index.html 📝 modified
admin/reference/settings-and-preferences/index.html 📝 modified
admin/reference/values/index.html 📝 modified
admin/tutorials/authentication/index.html 📝 modified
admin/tutorials/run_locally/index.html 📝 modified
dev/explanations/components/index.html 📝 modified
dev/explanations/designing-functionality/index.html 📝 modified
dev/explanations/extensions/index.html 📝 modified
dev/explanations/run_demo/index.html 📝 modified
dev/explanations/testing/index.html 📝 modified
dev/how-to/add-a-cli-command/index.html 📝 modified
dev/how-to/add-a-db/index.html 📝 modified
dev/how-to/add-a-route/index.html 📝 modified
dev/how-to/add-a-setting/index.html 📝 modified
dev/how-to/add-a-task/index.html 📝 modified
dev/how-to/add-a-test/index.html 📝 modified
dev/how-to/add-functionality/index.html 📝 modified
dev/how-to/client-customization/index.html 📝 modified
dev/how-to/client-extension/index.html 📝 modified
dev/how-to/client-generation/index.html 📝 modified
dev/how-to/contribute/index.html 📝 modified
dev/how-to/create_application/index.html 📝 modified
dev/how-to/develop-legacy-dirac/index.html 📝 modified
dev/how-to/extend-diracx/index.html 📝 modified
dev/how-to/use-the-demo/index.html 📝 modified
dev/reference/application-state/index.html 📝 modified
dev/reference/client-metapathfinder/index.html 📝 modified
dev/reference/coding-conventions/index.html 📝 modified
dev/reference/configuration/index.html 📝 modified
dev/reference/db-transaction-model/index.html 📝 modified
dev/reference/dependency-injection/index.html 📝 modified
dev/reference/entrypoints/index.html 📝 modified
dev/reference/env-variables/index.html 📝 modified
dev/reference/pixi-tasks/index.html 📝 modified
dev/reference/security-policies/index.html 📝 modified
dev/reference/security-properties/index.html 📝 modified
dev/reference/test-recipes/index.html 📝 modified
dev/reference/writing-tests/index.html 📝 modified
dev/tutorials/advanced-tutorial/index.html 📝 modified
dev/tutorials/develop-web/index.html 📝 modified
dev/tutorials/getting-started/index.html 📝 modified
dev/tutorials/larger-developments/index.html 📝 modified
dev/tutorials/making-changes/index.html 📝 modified
dev/tutorials/play-with-auth/index.html 📝 modified
dev/tutorials/run-locally/index.html 📝 modified
dev/tutorials/write-docs/index.html 📝 modified
user/reference/client-configuration/index.html 📝 modified
user/reference/known-installations/index.html 📝 modified
user/reference/programmatic-usage/index.html 📝 modified
user/tutorials/getting-started/index.html 📝 modified
user/web/list_and_share_applications/index.html 📝 modified
user/web/login_out/index.html 📝 modified
user/web/monitor_jobs/index.html 📝 modified
admin/how-to/install/connect/index.html ➖ deleted
admin/how-to/install/convert-cs/index.html 📝 modified
admin/how-to/install/embracing/index.html 📝 modified
admin/how-to/install/install-kubernetes/index.html 📝 modified
admin/how-to/install/installing/index.html 📝 modified
admin/how-to/install/minimal-requirements/index.html 📝 modified
admin/how-to/install/register-a-vo/index.html 📝 modified
admin/how-to/install/register-the-admin-vo/index.html 📝 modified
dev/explanations/components/api/index.html 📝 modified
dev/explanations/components/cli/index.html 📝 modified
dev/explanations/components/client/index.html 📝 modified
dev/explanations/components/db/index.html 📝 modified
dev/explanations/components/routes/index.html 📝 modified
dev/how-to/use-the-demo/swagger/index.html 📝 modified
dev/how-to/use-the-demo/web/index.html 📝 modified
user/reference/programmatic-usage/command-line-interface/index.html 📝 modified
user/reference/programmatic-usage/https-interface/index.html 📝 modified
user/reference/programmatic-usage/python-interface/index.html 📝 modified

@fstagni fstagni requested a review from sfayer November 18, 2025 08:31
@sfayer
Copy link
Member

sfayer commented Nov 18, 2025

I can review this if you really want, but at a quick look it has a few "functionality breaking" bugs; the copilot version in #707 appears to be closer to working...

Regards,
Simon

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.

Remove LocalGitConfigSource

3 participants