Draak
Draak
RRailway
Created by Draak on 7/22/2024 in #✋|help
Build error: "Unable to build profile"
Not sure what this build error means or what to do about it. project id = 2090e121-cc62-4fbe-9114-5349121f7893 This project pulls data from APIs in sequence. It was just Rust, but after adding a Python data loader and using custom build/start commands, this error comes up. I specified both the Rust and Python Providers as well as my custom build and start commands. From what I can find from searching myself, this looks like a nix problem with merging, but I'm not sure how to handle or prevent that in Railway. relevant log output:
#10 50.66 building '/nix/store/wps1agix0hhaz5gfawfq92dwqz2sxlk7-bf446f08bff6814b569265bef8374cfdd3d8f0e0-env.drv'...

#10 50.72 created 52 symlinks in user environment

#10 50.76 building '/nix/store/2x4nswyixk163hbzxwlmgfvi3xk62rgs-user-environment.drv'...



#10 50.77 error: Unable to build profile. There is a conflict for the following files:

#10 50.77

#10 50.77 /nix/store/icwr3ihx5n1pvgdl88y53kx3im1k70hv-gcc-13.2.0-man/share/man/man7/fsf-funding.7.gz

#10 50.77 /nix/store/mvi91frx6krjfpjzjickgivx8zq6h8mc-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db-env/share/man/man7/fsf-funding.7.gz

#10 50.83 error: builder for '/nix/store/2x4nswyixk163hbzxwlmgfvi3xk62rgs-user-environment.drv' failed with exit code 1



#10 ERROR: process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-bf446f08bff6814b569265bef8374cfdd3d8f0e0.nix && nix-collect-garbage -d" did not complete successfully: exit code: 100
#10 50.66 building '/nix/store/wps1agix0hhaz5gfawfq92dwqz2sxlk7-bf446f08bff6814b569265bef8374cfdd3d8f0e0-env.drv'...

#10 50.72 created 52 symlinks in user environment

#10 50.76 building '/nix/store/2x4nswyixk163hbzxwlmgfvi3xk62rgs-user-environment.drv'...



#10 50.77 error: Unable to build profile. There is a conflict for the following files:

#10 50.77

#10 50.77 /nix/store/icwr3ihx5n1pvgdl88y53kx3im1k70hv-gcc-13.2.0-man/share/man/man7/fsf-funding.7.gz

#10 50.77 /nix/store/mvi91frx6krjfpjzjickgivx8zq6h8mc-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db-env/share/man/man7/fsf-funding.7.gz

#10 50.83 error: builder for '/nix/store/2x4nswyixk163hbzxwlmgfvi3xk62rgs-user-environment.drv' failed with exit code 1



#10 ERROR: process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-bf446f08bff6814b569265bef8374cfdd3d8f0e0.nix && nix-collect-garbage -d" did not complete successfully: exit code: 100
19 replies
RRailway
Created by Draak on 9/18/2023 in #✋|help
Unchanged repo fails to deploy on env var change.
I had this exact setup running last night, and this morning when I changed an environment variable it failed. For debugging I made my start command this:
pwd && ls . && ls bin && ./bin/tklbot
pwd && ls . && ls bin && ./bin/tklbot
Output from deploy logs:
/app
bin
tklbot
/bin/bash: line 1: ./bin/tklbot: No such file or directory
/app
bin
tklbot
/bin/bash: line 1: ./bin/tklbot: No such file or directory
Which seems a little contradictory. My full nixpacks.toml:
[phases.setup]
nixPkgs = ["binutils", "gcc", "rust-bin.stable.latest.default"]

[phases.build]
cmds = ["mkdir -p bin", "cargo build --release", "cp target/release/tklbot bin"]

[start]
cmd = "pwd && ls . && ls bin && ./bin/tklbot"
[phases.setup]
nixPkgs = ["binutils", "gcc", "rust-bin.stable.latest.default"]

[phases.build]
cmds = ["mkdir -p bin", "cargo build --release", "cp target/release/tklbot bin"]

[start]
cmd = "pwd && ls . && ls bin && ./bin/tklbot"
Relevant Cargo.toml sections: (I'm building several binaries with the default /bin module naming.)
[package]
name = "tklbot"
version = "0.3.2"
edition = "2021"
default-run = "tklbot"

[lib]
name = "tklbot"
path = "src/lib.rs"

[[bin]]
name = "tklbot"
path = "src/main.rs"
[package]
name = "tklbot"
version = "0.3.2"
edition = "2021"
default-run = "tklbot"

[lib]
name = "tklbot"
path = "src/lib.rs"

[[bin]]
name = "tklbot"
path = "src/main.rs"
9 replies
RRailway
Created by Draak on 9/17/2023 in #✋|help
Deploying Rust tries to copy binaries that don't exist.
I'm not using my own nixpacks.toml, and railway is attempting to copy binaries that it doesn't need to run and don't exist. (I tried my own nixpacks.toml but I'd prefer to deploy this way. I'll open up a separate ticket for my problems with my own nixpacks.toml if I need to). I would expect it to only copy tklbot. Cargo.toml
[package]
name = "tklbot"
version = "0.3.0"
edition = "2021"
default-run = "tklbot"

[lib]
name = "tklbot"
path = "src/lib.rs"

[[bin]]
name = "tklbot"
path = "src/main.rs"

[[bin]]
name = "integration-tests"
path = "src/bin/integration_tests.rs"

[dependencies]
...
[package]
name = "tklbot"
version = "0.3.0"
edition = "2021"
default-run = "tklbot"

[lib]
name = "tklbot"
path = "src/lib.rs"

[[bin]]
name = "tklbot"
path = "src/main.rs"

[[bin]]
name = "integration-tests"
path = "src/bin/integration_tests.rs"

[dependencies]
...
from the railway build logs:
╔═════════════════════ Nixpacks v1.15.0 ═════════════════════╗
║ setup │ binutils, gcc, rust-bin.stable.latest.default ║
║────────────────────────────────────────────────────────────║
║ build │ mkdir -p bin ║
║ │ cargo build --release ║
║ │ cp target/release/tklbot bin ║
║ │ cp target/release/db bin ║
║ │ cp target/release/logger bin ║
║ │ cp target/release/mod bin ║
║ │ cp target/release/scoped bin ║
║ │ cp target/release/tests bin ║
║ │ cp target/release/integration_tests bin ║
║────────────────────────────────────────────────────────────║
║ start │ ./bin/tklbot ║
╚════════════════════════════════════════════════════════════╝
╔═════════════════════ Nixpacks v1.15.0 ═════════════════════╗
║ setup │ binutils, gcc, rust-bin.stable.latest.default ║
║────────────────────────────────────────────────────────────║
║ build │ mkdir -p bin ║
║ │ cargo build --release ║
║ │ cp target/release/tklbot bin ║
║ │ cp target/release/db bin ║
║ │ cp target/release/logger bin ║
║ │ cp target/release/mod bin ║
║ │ cp target/release/scoped bin ║
║ │ cp target/release/tests bin ║
║ │ cp target/release/integration_tests bin ║
║────────────────────────────────────────────────────────────║
║ start │ ./bin/tklbot ║
╚════════════════════════════════════════════════════════════╝
8 replies
RRailway
Created by Draak on 8/6/2023 in #✋|help
Setting Another Env Var to Railway Port Value
project id: 2090e121-cc62-4fbe-9114-5349121f7893 I'm trying to deploy Metabase via their official docker image. It listens on whatever port is specified by MB_JETTY_PORT and I verified it works by setting my own. I want to pass it the railway port, but when I set MB_JETTY_PORT=${{PORT}} it doesn't pick up any value which I validated with the railway cli. How should I be passing the Railway port so it gets picked up by Metabase?
8 replies