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

[BUG]: The initialization of the database does not work in version 0.25.1 and main #4562

Closed
volodymyrpo opened this issue Apr 25, 2024 · 4 comments
Labels
🤷‍♂️ action required Further action or information required

Comments

@volodymyrpo
Copy link

Describe the bug
On initial run, CascadeProjectDeleteAppCredentialsAndConnectionKey1710720610669 migration fails. The keys FK_03177dc6779e6e147866d43c050 and FK_d82bfb4c7432a69dc2419083a0e already exist in the database at the time of migration.

To Reproduce
Steps to reproduce the behavior:

  1. Clear environment
  2. Run node tools/setup-dev
  3. Run docker-compose -f docker-compose.dev.yml up
  4. See error

Expected behavior
The application should have launched without any problems

Screenshots
Backend issue

Additional context
I couldn't find a clear description of which version is the most stable, so I decided to run tag 0.25.1 (ec0f149eadcca975420d563e028ed98e92c8c2b1)

The same issue exists on main (8a7d9380a8e4128faafc9a706f3636704ee250e2)

Stack trace:

[API] Migration "CascadeProjectDeleteAppCredentialsAndConnectionKey1710720610669" failed, error: constraint "FK_03177dc6779e6e147866d43c050" for relation "connection_key" already exists
[API] [16:23:55 UTC] ERROR: [Main#main]
[API]     err: {
[API]       "type": "QueryFailedError",
[API]       "message": "constraint \"FK_03177dc6779e6e147866d43c050\" for relation \"connection_key\" already exists",
[API]       "stack":
[API]           QueryFailedError: constraint "FK_03177dc6779e6e147866d43c050" for relation "connection_key" already exists
[API]               at PostgresQueryRunner.query (/usr/src/app/src/driver/postgres/PostgresQueryRunner.ts:331:19)
[API]               at processTicksAndRejections (node:internal/process/task_queues:95:5)
[API]       "query": "\n            ALTER TABLE \"connection_key\"\n            ADD CONSTRAINT \"FK_03177dc6779e6e147866d43c050\" FOREIGN KEY (\"projectId\") REFERENCES \"project\"(\"id\")\n                ON DELETE CASCADE ON UPDATE NO ACTION\n        ",
[API]       "driverError": {
[API]         "type": "DatabaseError",
[API]         "message": "constraint \"FK_03177dc6779e6e147866d43c050\" for relation \"connection_key\" already exists",
[API]         "stack":
[API]             error: constraint "FK_03177dc6779e6e147866d43c050" for relation "connection_key" already exists
[API]                 at /usr/src/app/node_modules/pg/lib/client.js:526:17
[API]                 at processTicksAndRejections (node:internal/process/task_queues:95:5)
[API]                 at PostgresQueryRunner.query (/usr/src/app/src/driver/postgres/PostgresQueryRunner.ts:260:25)
[API]         "length": 156,
[API]         "name": "error",
[API]         "severity": "ERROR",
[API]         "code": "42710",
[API]         "file": "tablecmds.c",
[API]         "line": "8645",
[API]         "routine": "ATExecAddConstraint"
[API]       },
[API]       "length": 156,
[API]       "severity": "ERROR",
[API]       "code": "42710",
[API]       "file": "tablecmds.c",
[API]       "line": "8645",
[API]       "routine": "ATExecAddConstraint"
[API]     }
@volodymyrpo
Copy link
Author

Potentially this is just my problem. I expected docker-compose.dev.yml to provide an environment for contributors, but it defaults to cloud.

@abuaboud
Copy link
Contributor

Hi @volodymyrpo

That's correct, It's because using cloud edition for some reason in docker-compose.dev.yml, this development mode will be deprecated soon, have you tried using dev containers?

@abuaboud abuaboud added the 🤷‍♂️ action required Further action or information required label Apr 26, 2024
@abuaboud
Copy link
Contributor

I am closing this issue, Please reopen if the question is not answered.

@abuaboud abuaboud closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2024
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If this issue is continuing with the latest stable version of Activepieces, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷‍♂️ action required Further action or information required
Projects
None yet
Development

No branches or pull requests

2 participants