Conversation
Replacements applied: - `databaseSchemaName` to `ensIndexerSchemaName` - `databaseUrl` to `ensDbUrl` - `DATABASE_SCHEMA` to `ENSINDEXER_SCHEMA_NAME` - `DATABASE_URL` to `ENSDB_URL` - `DatabaseUrlSchema` to `EnsDbUrlSchema` - `DatabaseSchemaNameSchema` to `EnsIndexerSchemaNameSchema`
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 8978d7f The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughRepository-wide rename of ENS DB and schema identifiers: Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR performs a systematic rename of ENSDb-related symbols across the entire ENSNode codebase, replacing generic database terms (
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph ENV["Environment Variables (renamed)"]
E1["DATABASE_URL → ENSDB_URL"]
E2["DATABASE_SCHEMA → ENSINDEXER_SCHEMA_NAME"]
end
subgraph SDK["@ensnode/ensnode-sdk (shared)"]
S1["EnsIndexerDatabaseEnvironment\nEnsApiDatabaseEnvironment\n→ DatabaseEnvironment"]
S2["DatabaseSchemaNameSchema\n→ EnsIndexerSchemaNameSchema"]
S3["DatabaseSchemaName type\n→ EnsIndexerSchemaName type"]
S4["makeDatabaseSchemaNameSchema()\n→ makeEnsIndexerSchemaNameSchema()"]
end
subgraph INDEXER["ENSIndexer App"]
I1["EnsIndexerConfig\ndatabaseUrl → ensDbUrl\ndatabaseSchemaName → ensIndexerSchemaName"]
I2["EnsIndexerPublicConfig\ndatabaseSchemaName → ensIndexerSchemaName"]
I3["package.json scripts\n--schema ENSINDEXER_SCHEMA_NAME"]
end
subgraph API["ENSApi App"]
A1["EnsDbConfigSchema\ndatabaseUrl → ensDbUrl"]
A2["EnsApiConfig\ndatabaseUrl → ensDbUrl"]
A3["redactEnsApiConfig()\n(explicit fields)"]
end
ENV --> INDEXER
ENV --> API
SDK --> INDEXER
SDK --> API
INDEXER --> |"EnsIndexerPublicConfig\nensIndexerSchemaName"| API
Reviews (1): Last reviewed commit: "docs(changeset): Updated the Connection ..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
This PR standardizes ENSDb-related naming across the monorepo by renaming env vars and config fields away from generic DATABASE_* / database* terminology toward ENSDB_* / ensDb* and ENSINDEXER_SCHEMA_NAME / ensIndexerSchemaName, and updates related docs, mocks, and UI text.
Changes:
- Renamed env vars and config fields (e.g.
DATABASE_URL→ENSDB_URL,DATABASE_SCHEMA→ENSINDEXER_SCHEMA_NAME,databaseSchemaName→ensIndexerSchemaName). - Updated ENSIndexer Ponder scripts to pass schema via
--schema. - Updated docs/examples and ENSAdmin connection UI to reflect the new naming.
Reviewed changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ensnode-sdk/src/shared/config/zod-schemas.ts | Rename schema-name zod schema + update required error messages to ENSINDEXER_SCHEMA_NAME. |
| packages/ensnode-sdk/src/shared/config/types.ts | Rename DatabaseSchemaName type to EnsIndexerSchemaName (leaves DatabaseUrl). |
| packages/ensnode-sdk/src/shared/config/environments.ts | Replace app-specific DB env interfaces with shared DatabaseEnvironment using ENSDB_URL/ENSINDEXER_SCHEMA_NAME. |
| packages/ensnode-sdk/src/ensindexer/config/zod-schemas.ts | Rename public config field + schema builder to ensIndexerSchemaName. |
| packages/ensnode-sdk/src/ensindexer/config/zod-schemas.test.ts | Update schema tests and expected error messages for renamed field. |
| packages/ensnode-sdk/src/ensindexer/config/types.ts | Rename EnsIndexerPublicConfig.databaseSchemaName → ensIndexerSchemaName + update docstring. |
| packages/ensnode-sdk/src/ensindexer/config/serialize.ts | Serialize renamed public config field. |
| packages/ensnode-sdk/src/ensindexer/config/conversions.test.ts | Update conversions tests to use ensIndexerSchemaName. |
| packages/ensnode-sdk/src/ensindexer/config/compatibility.ts | Update compatibility check omit list to new field name. |
| packages/ensnode-sdk/src/ensindexer/client.mock.ts | Update mocked public config field name. |
| packages/ensnode-sdk/src/ensapi/config/conversions.test.ts | Update ENSApi config conversion tests for renamed field. |
| packages/ensnode-sdk/src/ensapi/client.test.ts | Update client test fixture to use ensIndexerSchemaName. |
| packages/ensdb-sdk/src/client/ensdb-client.mock.ts | Update ENSDb SDK mock public config to new field name. |
| docs/ensnode.io/src/content/docs/docs/usage/api.mdx | Update Config API example response to ensIndexerSchemaName. |
| docs/ensnode.io/src/content/docs/docs/contributing/releases.mdx | Update release guidance to reference ENSINDEXER_SCHEMA_NAME. |
| docker-compose.yml | Switch docker-compose env vars to ENSDB_URL / ENSINDEXER_SCHEMA_NAME. |
| apps/ensindexer/src/lib/public-config-builder/public-config-builder.ts | Build immutable public config with ensIndexerSchemaName. |
| apps/ensindexer/src/lib/public-config-builder/public-config-builder.test.ts | Update mocks/assertions for renamed field. |
| apps/ensindexer/src/lib/ensdb/singleton.ts | Use ensDbUrl + ensIndexerSchemaName from config. |
| apps/ensindexer/src/lib/ensdb-writer-worker/ensdb-writer-worker.mock.ts | Update test fixture public config field. |
| apps/ensindexer/src/lib/test/mockConfig.ts | Update test env inputs to new env var names. |
| apps/ensindexer/src/config/types.ts | Rename config fields (databaseSchemaName→ensIndexerSchemaName, databaseUrl→ensDbUrl) and update docs. |
| apps/ensindexer/src/config/serialize.ts | Serialize redacted config with new keys (ensDbUrl, ensIndexerSchemaName). |
| apps/ensindexer/src/config/redact.ts | Redact ensDbUrl instead of databaseUrl. |
| apps/ensindexer/src/config/environment.ts | Switch environment type composition to DatabaseEnvironment. |
| apps/ensindexer/src/config/config.test.ts | Update tests to use ENSDB_URL / ENSINDEXER_SCHEMA_NAME and new config property names. |
| apps/ensindexer/src/config/config.schema.ts | Parse env using ENSDB_URL / ENSINDEXER_SCHEMA_NAME and rename schema/url zod schema identifiers. |
| apps/ensindexer/package.json | Update dev/start scripts to pass Ponder --schema and use new env vars. |
| apps/ensindexer/.env.local.example | Update example env var names and explanatory comments. |
| apps/ensapi/src/lib/handlers/drizzle.ts | Remove unused Drizzle helper (deleted). |
| apps/ensapi/src/lib/ensdb/singleton.ts | Construct EnsDbReader using ensDbUrl. |
| apps/ensapi/src/handlers/subgraph/subgraph-api.ts | Feed subgraph middleware with config.ensDbUrl. |
| apps/ensapi/src/config/redact.ts | Redact ensDbUrl and reshape redacted output. |
| apps/ensapi/src/config/environment.ts | Switch environment type composition to DatabaseEnvironment. |
| apps/ensapi/src/config/ensdb-config.schema.ts | Rename url schema to EnsDbUrlSchema and read ENSDB_URL. |
| apps/ensapi/src/config/config.singleton.test.ts | Update singleton bootstrap tests for new env var names. |
| apps/ensapi/src/config/config.schema.ts | Build config using ensDbUrl and ensIndexerPublicConfig.ensIndexerSchemaName. |
| apps/ensapi/src/config/config.schema.test.ts | Update config schema tests for new env var + field names. |
| apps/ensapi/.env.local.example | Update ENSApi example env var names and wording. |
| apps/ensadmin/src/components/connection/cards/ensnode-info.tsx | Update labels/tooltips and field access to ensIndexerSchemaName. |
| apps/ensadmin/src/app/mock/config-info/data.json | Update mock config payloads to new field name. |
| apps/ensadmin/src/app/mock/config-api.mock.ts | Update mock config deserialization input to new field name. |
| .changeset/wide-trams-rule.md | Changeset: env var rename for ENSIndexer. |
| .changeset/slow-readers-pay.md | Changeset: ENSAdmin UI wording update. |
| .changeset/slick-kings-travel.md | Changeset: env var rename for ENSApi. |
| .changeset/metal-views-start.md | Changeset: SDK public config field rename. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ponder requires setting the database schema value with either `DATABASE_SCHEMA` evn var, or `--schema` CLI arg. We just stopped using the `DATABASE_SCHEMA` env var, so we need to use the `--schema` CLI arg and pass the selected ENSIndexer Schema Name value there.
Using lazy proxy for constructing `config` object does not allow for using `...config` spread operator. Instead, we have to list the `config` fields manually.
…rPublicConfig` type to `ensIndexerSchemaName`.
…SDB_URL`, and `DATABASE_SCHEMA` to `ENSINDEXER_SCHEMA_NAME`.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/ensapi/src/config/ensdb-config.schema.ts (1)
7-23: 🧹 Nitpick | 🔵 TrivialConsider extracting shared
EnsDbUrlSchemato avoid duplication.The
EnsDbUrlSchemavalidation logic here is identical to the one inapps/ensindexer/src/config/config.schema.ts. Consider extracting this to a shared location (e.g., within@ensnode/ensnode-sdk/internalalongsideEnsIndexerSchemaNameSchema) to maintain a single source of truth for PostgreSQL connection string validation.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/ensapi/src/config/ensdb-config.schema.ts` around lines 7 - 23, Extract the duplicate PostgreSQL connection-string validator into a shared module and replace local definitions with it: create a shared export (e.g., EnsDbUrlSchema) under `@ensnode/ensnode-sdk/internal` (next to EnsIndexerSchemaNameSchema) that encapsulates the current logic that uses parseConnectionString and the same refine/error message, then update both apps/ensapi/src/config/ensdb-config.schema.ts and apps/ensindexer/src/config/config.schema.ts to import and reuse that shared EnsDbUrlSchema instead of duplicating the refine logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/ensindexer/package.json`:
- Around line 15-16: The start script is using shell variable expansion which is
inconsistent with the dev script and breaks on Windows; update the package.json
"start" script to set ENSINDEXER_SCHEMA_NAME inline like the "dev" script (for
example: ENSINDEXER_SCHEMA_NAME=public ponder --root ./ponder start --schema
$ENSINDEXER_SCHEMA_NAME) so both scripts use the same environment-variable
assignment style, or explicitly document that Windows development is unsupported
if you prefer not to change the script.
---
Outside diff comments:
In `@apps/ensapi/src/config/ensdb-config.schema.ts`:
- Around line 7-23: Extract the duplicate PostgreSQL connection-string validator
into a shared module and replace local definitions with it: create a shared
export (e.g., EnsDbUrlSchema) under `@ensnode/ensnode-sdk/internal` (next to
EnsIndexerSchemaNameSchema) that encapsulates the current logic that uses
parseConnectionString and the same refine/error message, then update both
apps/ensapi/src/config/ensdb-config.schema.ts and
apps/ensindexer/src/config/config.schema.ts to import and reuse that shared
EnsDbUrlSchema instead of duplicating the refine logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: d62fd296-8c5e-434b-b08f-dc488ccb5154
📒 Files selected for processing (46)
.changeset/metal-views-start.md.changeset/slick-kings-travel.md.changeset/slow-readers-pay.md.changeset/wide-trams-rule.mdapps/ensadmin/src/app/mock/config-api.mock.tsapps/ensadmin/src/app/mock/config-info/data.jsonapps/ensadmin/src/components/connection/cards/ensnode-info.tsxapps/ensapi/.env.local.exampleapps/ensapi/src/config/config.schema.test.tsapps/ensapi/src/config/config.schema.tsapps/ensapi/src/config/config.singleton.test.tsapps/ensapi/src/config/ensdb-config.schema.tsapps/ensapi/src/config/environment.tsapps/ensapi/src/config/redact.tsapps/ensapi/src/handlers/subgraph/subgraph-api.tsapps/ensapi/src/lib/ensdb/singleton.tsapps/ensapi/src/lib/handlers/drizzle.tsapps/ensindexer/.env.local.exampleapps/ensindexer/package.jsonapps/ensindexer/src/config/config.schema.tsapps/ensindexer/src/config/config.test.tsapps/ensindexer/src/config/environment.tsapps/ensindexer/src/config/redact.tsapps/ensindexer/src/config/serialize.tsapps/ensindexer/src/config/types.tsapps/ensindexer/src/lib/__test__/mockConfig.tsapps/ensindexer/src/lib/ensdb-writer-worker/ensdb-writer-worker.mock.tsapps/ensindexer/src/lib/ensdb/singleton.tsapps/ensindexer/src/lib/public-config-builder/public-config-builder.test.tsapps/ensindexer/src/lib/public-config-builder/public-config-builder.tsdocker-compose.ymldocs/ensnode.io/src/content/docs/docs/contributing/releases.mdxdocs/ensnode.io/src/content/docs/docs/usage/api.mdxpackages/ensdb-sdk/src/client/ensdb-client.mock.tspackages/ensnode-sdk/src/ensapi/client.test.tspackages/ensnode-sdk/src/ensapi/config/conversions.test.tspackages/ensnode-sdk/src/ensindexer/client.mock.tspackages/ensnode-sdk/src/ensindexer/config/compatibility.tspackages/ensnode-sdk/src/ensindexer/config/conversions.test.tspackages/ensnode-sdk/src/ensindexer/config/serialize.tspackages/ensnode-sdk/src/ensindexer/config/types.tspackages/ensnode-sdk/src/ensindexer/config/zod-schemas.test.tspackages/ensnode-sdk/src/ensindexer/config/zod-schemas.tspackages/ensnode-sdk/src/shared/config/environments.tspackages/ensnode-sdk/src/shared/config/types.tspackages/ensnode-sdk/src/shared/config/zod-schemas.ts
💤 Files with no reviewable changes (1)
- apps/ensapi/src/lib/handlers/drizzle.ts
apps/ensindexer/package.json
Outdated
| "dev": "ENSINDEXER_SCHEMA_NAME=public ponder --root ./ponder dev --disable-ui --schema public", | ||
| "start": "ponder --root ./ponder start --schema $ENSINDEXER_SCHEMA_NAME", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if cross-env is already a dependency or used elsewhere in the monorepo
rg -l 'cross-env' --type=jsonRepository: namehash/ensnode
Length of output: 42
🏁 Script executed:
#!/bin/bash
# Check other npm scripts in the monorepo for comparison
find . -name "package.json" -type f | head -10 | while read f; do
echo "=== $f ==="
jq '.scripts' "$f" 2>/dev/null | head -20
doneRepository: namehash/ensnode
Length of output: 4402
🏁 Script executed:
#!/bin/bash
# Check for CI/GitHub Actions config that shows platform testing
fd -e "yml" -e "yaml" . .github/workflows 2>/dev/null | head -5 | while read f; do
echo "=== $f ==="
head -50 "$f"
doneRepository: namehash/ensnode
Length of output: 10284
🏁 Script executed:
#!/bin/bash
# Look for Windows or cross-platform documentation
fd -e "md" . -type f | xargs grep -l -i "windows\|cross.?platform\|cmd\|powershell" 2>/dev/null | head -10Repository: namehash/ensnode
Length of output: 230
🏁 Script executed:
#!/bin/bash
# Search README files for Windows, WSL, or platform documentation
find . -maxdepth 3 -iname "readme*" -o -iname "contributing*" | while read f; do
if [ -f "$f" ]; then
if grep -qi "windows\|wsl\|platform\|setup\|development" "$f"; then
echo "=== Found in $f ==="
grep -i -A 2 -B 2 "windows\|wsl\|platform.*development" "$f" | head -30
fi
fi
doneRepository: namehash/ensnode
Length of output: 516
🏁 Script executed:
#!/bin/bash
# Check if there are any npm scripts that explicitly handle Windows (cmd/powershell alternatives)
rg "\.cmd|cmd\.exe|powershell|cross-env" --type=json --max-count=20Repository: namehash/ensnode
Length of output: 42
🏁 Script executed:
#!/bin/bash
# Read the main README and CONTRIBUTING guide to check for platform/setup guidance
echo "=== README.md excerpt (setup section) ==="
head -200 ./README.md | tail -100
echo -e "\n=== CONTRIBUTING.md excerpt ==="
head -150 ./CONTRIBUTING.mdRepository: namehash/ensnode
Length of output: 4227
🏁 Script executed:
#!/bin/bash
# Check if there are any other npm scripts in ensindexer that might show patterns
cat ./apps/ensindexer/package.json | jq '.scripts'Repository: namehash/ensnode
Length of output: 474
Inconsistent environment variable handling between dev and start scripts.
The start script uses shell variable expansion ($ENSINDEXER_SCHEMA_NAME) which is incompatible with Windows cmd/PowerShell, while the dev script uses an inline environment variable (ENSINDEXER_SCHEMA_NAME=public) that works cross-platform. Since the project has no Windows CI and doesn't document Windows as a supported development platform, either make the start script consistent with the dev script using inline variables, or document that Windows development is not supported.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/ensindexer/package.json` around lines 15 - 16, The start script is using
shell variable expansion which is inconsistent with the dev script and breaks on
Windows; update the package.json "start" script to set ENSINDEXER_SCHEMA_NAME
inline like the "dev" script (for example: ENSINDEXER_SCHEMA_NAME=public ponder
--root ./ponder start --schema $ENSINDEXER_SCHEMA_NAME) so both scripts use the
same environment-variable assignment style, or explicitly document that Windows
development is unsupported if you prefer not to change the script.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 57 out of 57 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Avoid using the `public` schema as we force that in the `dev` command. Using `public` | ||
| # cause conflicts as you interchange between dev and start commands so use literally | ||
| # anything else. |
There was a problem hiding this comment.
The guidance here says the dev command forces the public schema, but apps/ensindexer/package.json now sets ENSINDEXER_SCHEMA_NAME=ensindexer_temp_dev and passes --schema ensindexer_temp_dev. Please update these comments to reflect the current dev/start behavior (and avoid suggesting public is forced if it no longer is).
| # Avoid using the `public` schema as we force that in the `dev` command. Using `public` | |
| # cause conflicts as you interchange between dev and start commands so use literally | |
| # anything else. | |
| # In development, the `dev` command uses a temporary schema (see apps/ensindexer/package.json, | |
| # currently `ensindexer_temp_dev`), while the `start` command uses the schema configured via | |
| # ENSINDEXER_SCHEMA_NAME. Choose a unique schema name that does not conflict with these and | |
| # avoid using the shared `public` schema. |
1677e84 to
7efe7ee
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 57 out of 57 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Maintain backward compatibility to allow smooth deployment pipeline operations.
7efe7ee to
8978d7f
Compare
Lite PR
Tip: Review docs on the ENSNode PR process
Summary
databaseSchemaNametoensIndexerSchemaNamedatabaseUrltoensDbUrlDATABASE_SCHEMAtoENSINDEXER_SCHEMA_NAMEDATABASE_URLtoENSDB_URLDatabaseUrlSchematoEnsDbUrlSchemaDatabaseSchemaNameSchematoEnsIndexerSchemaNameSchemaENSIndexer
devandstartcommands have been updated to passENSINDEXER_SCHEMA_NAMEvalue with--schemaPonder CLI param. Theservecommand was removed.Connection view in ENSAdmin: updated tooltip contents.
Updated code docs in several places to match the current state of reality.
Why
Testing
Notes for Reviewer (Optional)
Pre-Review Checklist (Blocking)
Resolves #1762, #1763.