Skip to content

chore(make): show the dev database before starting the backend - #6006

Merged
norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:norm/feat/dev-db-info
Oct 14, 2026
Merged

norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:norm/feat/dev-db-info

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

With SQLite, jetstream opens $SQLITE_DB_DIR/console-database.db relative to the directory it starts in, so every checkout has its own endpoints, tokens and favourites, and nothing says which file is open. Switching worktrees, or moving between make dev backend and an E2E run (dist/e2e-db, rebuilt each run), silently swaps the endpoint set.

make dev backend now prints the database before it starts the backend:

Backend database: /…/src/jetstream/console-database.db
  SQLite, kept between restarts
  Endpoints (3):
    cf                           cf         https://api.example.com
    github                       git        https://api.github.com
    k3d                          k8s        https://127.0.0.1:49662
  • Settings resolve as jetstream reads them for a dev run: the environment first, then src/jetstream/config.properties (DATABASE_PROVIDER, SQLITE_DB_DIR, SQLITE_KEEP_DB).
  • SQLITE_KEEP_DB false prints "RESET at startup"; a missing file or directory says so; PostgreSQL and MySQL print the provider, host and database name.
  • The database is opened read-only with sqlite3; without sqlite3 only the path is printed.
  • The logic is in build/dev-db-info.sh (shellcheck clean), called by one line in dev.backend.

Tried with make dev backend in this checkout, with E2E settings (SQLITE_DB_DIR=../../dist/e2e-db SQLITE_KEEP_DB=false), from another checkout, and with DATABASE_PROVIDER=pgsql.

Changelog fragment: changelog.d/0007-dev-db-info.md.

AI disclosure (RFC-0047): prepared with AI coding assistance; reviewed by the author.

jetstream opens console-database.db relative to the directory it
starts in, so each checkout has its own endpoints and tokens, and
nothing says which file is in use. make dev backend now prints the
database first: for SQLite the full path, whether it is kept or
reset at startup, and its registered endpoints (read-only).

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@norman-abramovitz
norman-abramovitz merged commit 6920f7a into cloudfoundry:develop Oct 14, 2026
24 checks passed
@nabramovitz
nabramovitz deleted the norm/feat/dev-db-info branch October 14, 2026 07:43
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.

2 participants