Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make dev-up core resource errors #1407

Open
yojoe opened this issue Feb 13, 2025 · 3 comments
Open

make dev-up core resource errors #1407

yojoe opened this issue Feb 13, 2025 · 3 comments

Comments

@yojoe
Copy link

yojoe commented Feb 13, 2025

I'm trying to get the local (docker) stack up and running on Apple Silicon Macbook Pro (arm64), by following the instructions in the current README.md. However the core resource won't build successfully and does not start. The build fails while parsing some JSON:

Error: ServiceAccountError - SerdeJson: EOF while parsing a value at line 1 column 0

Caused by:
    EOF while parsing a value at line 1 column 0
Server exited with exit code 0

Here's the full steps I do for replicating the error:

git clone https://github.com/GaloyMoney/lana-bank
cd lana-bank
make dev-up

When I check Tilt, the core resource has errors and is not started/running:

Running cmd: cd .. && make setup-db run-server
cd lana/app && cargo sqlx migrate run
error: the `--database-url` option or the `DATABASE_URL` environment variable must be provided
make[1]: *** [setup-db] Error 1
[readiness probe: failure] Get "[http://localhost:5253/graphql":](http://localhost:5253/graphql%22:) dial tcp [::1]:5253: connect: connection refused

I added the missing DATABASE_URL environment variable to dev/Tiltfile:

 serve_env_core = {
     "PG_CON": "postgres://user:password@localhost:5433/pg",
+    "DATABASE_URL": "postgres://user:password@localhost:5433/pg",
     "OTEL_EXPORTER_OTLP_ENDPOINT": "http://localhost:4317",
 }

Now, sqlx mirgrations run successful, but I end up with cargo build errors:

Running cmd: cd .. && make setup-db run-server
cd lana/app && cargo sqlx migrate run
Applied 20231208110808/migrate cala ledger setup (106.775584ms)
Applied 20240517074612/migrate core setup (167.892792ms)
cargo run --bin lana-cli --features sim-time -- --config ./bats/lana-sim-time.yml | tee .e2e-logs
warning: unexpected `cfg` condition value: `graphql`
...
warning: `chart-of-accounts` (lib) generated 2 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.06s
     Running `target/debug/lana-cli --config ./bats/lana-sim-time.yml`
Error: ServiceAccountError - SerdeJson: EOF while parsing a value at line 1 column 0

Caused by:
    EOF while parsing a value at line 1 column 0
Server exited with exit code 0
[readiness probe: failure] Get "[http://localhost:5253/graphql":](http://localhost:5253/graphql%22:) dial tcp [::1]:5253: connect: connection refused
@nicolasburtey
Copy link
Member

nicolasburtey commented Feb 13, 2025

README needs an update, but do you have the dependencies as highlighted in https://github.com/GaloyMoney/cala? ie for direnv and nix?

@nicolasburtey
Copy link
Member

ok actually starting from a fresh new install, getting the same error

Running cmd: cd .. && make setup-db run-server
make[1]: Entering directory '/Users/n/Code/lana-bank'
cd lana/app && cargo sqlx migrate run
cargo run --bin lana-cli --features sim-time -- --config ./bats/lana-sim-time.yml | tee .e2e-logs
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.66s
     Running `target/debug/lana-cli --config ./bats/lana-sim-time.yml`
Error: ServiceAccountError - SerdeJson: EOF while parsing a value at line 1 column 0

Caused by:
    EOF while parsing a value at line 1 column 0
make[1]: Leaving directory '/Users/n/Code/lana-bank'
Server exited with exit code 0

investigating why

@nicolasburtey
Copy link
Member

it's because it's missing the .env.

we'll document how to create it, currently there is a dependency with bigquery for the data pipelines but I think it should be an optional dependency at this point and shouldn't require an API key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants