-
Notifications
You must be signed in to change notification settings - Fork 614
[BUG]: make pre-commit fails on check-shebang-scripts-are-executable for multiple files #2732
Copy link
Copy link
Closed
Bug
Copy link
Labels
SHOULDP2: Important but not vital; high-value items that are not crucial for the immediate releaseP2: Important but not vital; high-value items that are not crucial for the immediate releasebugSomething isn't workingSomething isn't working
Milestone
Description
🐞 Bug Summary
The make pre-commit task fails with the check-shebang-scripts-are-executable hook, reporting that multiple files have shebangs but are not marked as executable. This occurs on both Mac and Linux platforms.
🧩 Affected Component
Select the area of the project impacted:
-
mcpgateway- API -
mcpgateway- UI (admin panel) -
mcpgateway.wrapper- stdio wrapper - Federation or Transports
- CLI, Makefiles, or shell scripts
- Container setup (Docker/Podman/Compose)
- Other (explain below)
🔁 Steps to Reproduce
- Run
make pre-commiton Mac or Linux - Observe the failure in the check-shebang-scripts-are-executable hook
🤔 Expected Behavior
Files with shebangs that are intended to be executable should have the executable bit set. The pre-commit hook should pass without errors.
📓 Logs / Error Output
✅ Check Shebang Scripts Are Executable..................................Failed
- hook id: check-shebang-scripts-are-executable
- exit code: 1
infra/nginx/docker-entrypoint.sh: has a shebang but is not marked executable!
If it is supposed to be executable, try: `chmod +x infra/nginx/docker-entrypoint.sh`
If on Windows, you may also need to: `git add --chmod=+x infra/nginx/docker-entrypoint.sh`
If it not supposed to be executable, double-check its shebang is wanted.
mcpgateway/plugins/framework/external/mcp/server/runtime.py: has a shebang but is not marked executable!
If it is supposed to be executable, try: `chmod +x mcpgateway/plugins/framework/external/mcp/server/runtime.py`
If on Windows, you may also need to: `git add --chmod=+x mcpgateway/plugins/framework/external/mcp/server/runtime.py`
If it not supposed to be executable, double-check its shebang is wanted.
scripts/set-backup-completed.sh: has a shebang but is not marked executable!
If it is supposed to be executable, try: `chmod +x scripts/set-backup-completed.sh`
If on Windows, you may also need to: `git add --chmod=+x scripts/set-backup-completed.sh`
If it not supposed to be executable, double-check its shebang is wanted.
tests/performance/test_parallel_cleanup.py: has a shebang but is not marked executable!
If it is supposed to be executable, try: `chmod +x tests/performance/test_parallel_cleanup.py`
If on Windows, you may also need to: `git add --chmod=+x tests/performance/test_parallel_cleanup.py`
If it not supposed to be executable, double-check its shebang is wanted.
plugins/examples/simple_token_auth/token_cli.py: has a shebang but is not marked executable!
If it is supposed to be executable, try: `chmod +x plugins/examples/simple_token_auth/token_cli.py`
If on Windows, you may also need to: `git add --chmod=+x plugins/examples/simple_token_auth/token_cli.py`
If it not supposed to be executable, double-check its shebang is wanted.
scripts/benchmark_middleware.py: has a shebang but is not marked executable!
If it is supposed to be executable, try: `chmod +x scripts/benchmark_middleware.py`
If on Windows, you may also need to: `git add --chmod=+x scripts/benchmark_middleware.py`
If it not supposed to be executable, double-check its shebang is wanted.
scripts/cleanup_orphaned_resources.py: has a shebang but is not marked executable!
If it is supposed to be executable, try: `chmod +x scripts/cleanup_orphaned_resources.py`
If on Windows, you may also need to: `git add --chmod=+x scripts/cleanup_orphaned_resources.py`
If it not supposed to be executable, double-check its shebang is wanted.
tests/jmeter/render_fragments.py: has a shebang but is not marked executable!
If it is supposed to be executable, try: `chmod +x tests/jmeter/render_fragments.py`
If on Windows, you may also need to: `git add --chmod=+x tests/jmeter/render_fragments.py`
If it not supposed to be executable, double-check its shebang is wanted.
tests/integration/test_a2a_sdk_integration.py: has a shebang but is not marked executable!
If it is supposed to be executable, try: `chmod +x tests/integration/test_a2a_sdk_integration.py`
If on Windows, you may also need to: `git add --chmod=+x tests/integration/test_a2a_sdk_integration.py`
If it not supposed to be executable, double-check its shebang is wanted.
Command executed:
uv run --active pre-commit run --config .pre-commit-lite.yaml check-shebang-scripts-are-executable --all-files🧠 Environment Info
| Key | Value |
|---|---|
| Version or commit | main |
| Runtime | Python 3.11+ |
| Platform / OS | macOS, Linux |
| Container | none |
🧩 Additional Context (optional)
The following files have shebangs but are missing executable permissions:
Shell scripts:
infra/nginx/docker-entrypoint.shscripts/set-backup-completed.sh
Python scripts:
mcpgateway/plugins/framework/external/mcp/server/runtime.pytests/performance/test_parallel_cleanup.pyplugins/examples/simple_token_auth/token_cli.pyscripts/benchmark_middleware.pyscripts/cleanup_orphaned_resources.pytests/jmeter/render_fragments.pytests/integration/test_a2a_sdk_integration.py
Recommended fix:
chmod +x infra/nginx/docker-entrypoint.sh
chmod +x mcpgateway/plugins/framework/external/mcp/server/runtime.py
chmod +x scripts/set-backup-completed.sh
chmod +x tests/performance/test_parallel_cleanup.py
chmod +x plugins/examples/simple_token_auth/token_cli.py
chmod +x scripts/benchmark_middleware.py
chmod +x scripts/cleanup_orphaned_resources.py
chmod +x tests/jmeter/render_fragments.py
chmod +x tests/integration/test_a2a_sdk_integration.py
git add --chmod=+x infra/nginx/docker-entrypoint.sh
git add --chmod=+x mcpgateway/plugins/framework/external/mcp/server/runtime.py
git add --chmod=+x scripts/set-backup-completed.sh
git add --chmod=+x tests/performance/test_parallel_cleanup.py
git add --chmod=+x plugins/examples/simple_token_auth/token_cli.py
git add --chmod=+x scripts/benchmark_middleware.py
git add --chmod=+x scripts/cleanup_orphaned_resources.py
git add --chmod=+x tests/jmeter/render_fragments.py
git add --chmod=+x tests/integration/test_a2a_sdk_integration.pyAlternatively, if any of these files are not intended to be executable scripts, their shebangs should be removed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
SHOULDP2: Important but not vital; high-value items that are not crucial for the immediate releaseP2: Important but not vital; high-value items that are not crucial for the immediate releasebugSomething isn't workingSomething isn't working