Open JonSmall opened 1 year ago
is there any stable code branch ? I use the main branch right now, lots of bugs , maybe someone merge branch , make some mistakes.
for example:
show 404 The page you are looking for doesn't exist
Unhandled Runtime Error
TRPCClientError:
Invalid prisma.modelVersion.create()
invocation:
Foreign key constraint failed on the field: ModelVersion_modelId_fkey (index)
Error: P3006
Migration 20230523091547_
failed to apply cleanly to the shadow database.
Error:
db error: ERROR: cannot drop table "ModelRank" because other objects depend on it
DETAIL: view "ImageResourceHelper" depends on table "ModelRank"
view "PostResourceHelper" depends on view "ImageResourceHelper"
view "UserStat" depends on table "ModelRank"
view "UserRank_Live" depends on view "UserStat"
HINT: Use DROP ... CASCADE to drop the dependent objects too.
0: sql_schema_connector::validate_migrations
with namespaces=None
at schema-engine\connectors\sql-schema-connector\src\lib.rs:309
1: schema_core::state::DevDiagnostic
at schema-engine\core\src\state.rs:266
etc.
Hi @JonSmall we haven't done a great job of keeping the database seeding script or the example env file up to date since we've been moving fast to add new features and the team usually operates with a shared set of environment variables and dev database. I apologize for the difficulties that presents when trying to pick up and run the codebase.
We're planning to migrate to a different ORM in the future and as part of that flatten the migration history. I believe that will solve the problem that you mentioned here. We'll also update the example env and ensure that things tied to internal operations of the site like ClickHouse remain optional.
Hi @JustMaier and team, thanks for the great work. Would it be possible for a schema dump (no data) in the mean time, with any sensitive data redacted? This would help to address several bug reports related to db issues.
@billcai were you able to fix this issue? If yes can you please share? I am encountering the exact issue.
@hassanRsiddiqi the CLICKHOUSE_TRACKER_URL
has been updated to be an optional variable. Are you still having trouble with it on the latest version of main
?
yes, I had the issue, I resolve it after providing the click house details.
Now I am facing this issue, I am stuck on it, and don't know how to fix.
Solution is to use older commit: https://github.com/civitai/civitai/commit/f5687d449f1be6200a2b209c38a04a0b52636815
Before these environment variables were introduced
In .env
we can comment out CLICKHOUSE_TRACKER_URL
and SCHEDULER_ENDPOINT
to avoid that error, however it doesn't work for ORCHESTRATOR_ENDPOINT
because:
this line is enforcing ORCHESTRATOR_ENDPOINT
and ORCHESTRATOR_ACCESS_TOKEN
to be required in orchestrator.caller.ts
, although in schema.mjs
it has been made optional
static getInstance(): OrchestratorCaller {
if (!env.ORCHESTRATOR_ENDPOINT) throw new Error('Missing ORCHESTRATOR_ENDPOINT env');
if (!env.ORCHESTRATOR_ACCESS_TOKEN) throw new Error('Missing ORCHESTRATOR_ACCESS_TOKEN env');
//...
related: https://github.com/civitai/civitai/issues/566#issuecomment-1614760791 @manuelurenah
I am facing the same issue, any update?
Should be closed if fixed by Environment fixes #1283
What happened?
npm run dev
CLICKHOUSE_TRACKER_URL is unvaild
why use CLICKHOUSE_TRACKER_URL instead
for (const key of Object.keys(_serverEnv.data)) { error - (api)\src\env\server.mjs (13:8) @ eval error - Error: Invalid environment variables at eval (webpack-internal:///(api)/./src/env/server.mjs:19:11) at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
11 | if (!_serverEnv.success) {
12 | console.error('❌ Invalid environment variables:\n', ...formatErrors(_serverEnv.error.format()));
Steps to reproduce the problem
git check git pull npm install npm run dev
What should have happened?
show website
What platforms do you use to access the site?
No response
What browsers do you use to access the site?
No response
Additional information, context and logs
No response