Fix deployment failure 2924255608893769127#25
Open
iamwaqargulzar wants to merge 7 commits intoessamamdani:mainfrom
Open
Fix deployment failure 2924255608893769127#25iamwaqargulzar wants to merge 7 commits intoessamamdani:mainfrom
iamwaqargulzar wants to merge 7 commits intoessamamdani:mainfrom
Conversation
* Add Nixpacks configuration files to fix deployment detection error - Added `package.json` to allow Nixpacks to detect the project as a Node.js application. - Added `nixpacks.toml` to configure system dependencies (Python, Go, Docker client, etc.) and build phases, mimicking the original Dockerfile setup. - Configured environment variables and paths to support OpenClaw execution in the Nixpacks environment. * Fix Nixpacks build failures and deployment configuration - Updated `nixpacks.toml` to: - Add `npm install` to `phases.install` to ensure dependencies (OpenClaw) are installed. - Add `--break-system-packages` to `pip3 install` command to comply with PEP 668 and fix build error. - Make `mkdir /data` and symlink commands non-fatal to accommodate different build environments (root vs non-root). - Update `[start]` command to include `node_modules/.bin` and `/app/scripts` in PATH, ensuring `openclaw` binary and scripts are found at runtime. - Verified `scripts` directory content exists. - This resolves the "Command execution failed" error during Nixpacks build.
Fixed a SQL injection vulnerability in `delete_sandbox.sh` and `create_sandbox.sh` by: 1. Enhancing `query_db` in `db.sh` to support parameterized queries via a Python 3 wrapper. 2. Updating `delete_sandbox.sh` and `create_sandbox.sh` to use the new parameterized query syntax. This ensures all user-controlled input is safely handled by SQLite's parameter binding mechanism.
) The try-except block in `skills/web-utils/scripts/scrape_browser_use.py` was effectively dead code because the `try` block only contained a `print` statement, which rarely fails. This change: 1. Implements actual JSON validation using `json.loads()`. 2. Prints the result as-is if it's valid JSON. 3. Wraps the result in a `{"text": ...}` JSON object if it's not valid JSON. 4. Handles empty or `None` results gracefully. This ensures that the script consistently outputs valid JSON for downstream consumers.
The `ensurepip` module attempts to install pip into the system Python environment, which is managed by Nix and is immutable. This causes the build to fail with an "externally-managed-environment" error. Since `pip` is typically available in the python3 package provided by Nixpkgs or handled by `uv` later, this step is unnecessary and harmful in this context. Removing this line allows the build to proceed to the next step, where dependencies are installed using `pip3 install --break-system-packages`.
The `python3 -m ensurepip` command fails in Nixpacks environments because the Python installation is externally managed and immutable (Nix store). Additionally, the `pip3` command was not found in the PATH, causing the subsequent installation command to fail. This change: 1. Removes `python3 -m ensurepip` to avoid the "externally-managed-environment" error. 2. Replaces `pip3 install` with `python3 -m pip install` to invoke pip reliably via the python interpreter.
The build server seemed to be using cached commands. This change: 1. Replaces `pip3 install` with `python3 -m pip install` to invoke pip reliably. 2. Adds a visible `echo` statement to the command list to ensure the build instruction hash changes, forcing a cache invalidation. 3. Removes `ensurepip` which is not supported in Nix environments.
The build server seemed to be using cached commands. This change: 1. Replaces `pip3 install` with `python3 -m pip install` to invoke pip reliably. 2. Adds a visible `echo` statement to the command list to ensure the build instruction hash changes, forcing a cache invalidation. 3. Removes `ensurepip` which is not supported in Nix environments. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.