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

Upgrade fails using helm on 3.1.0 and 3.1.1 #109

Closed
jalberto opened this issue Sep 27, 2023 · 1 comment
Closed

Upgrade fails using helm on 3.1.0 and 3.1.1 #109

jalberto opened this issue Sep 27, 2023 · 1 comment
Assignees

Comments

@jalberto
Copy link

Describe the bug

When issuing the helm upgrade command, I get:

init-postgres pgb-pgbouncer.ops:5432 - accepting connections                                                                                                                                                                        │
│ init-postgres Database ready to accept connections.                                                                                                                                                                                 │
│ Stream closed EOF for support/chatwoot-migrate-dgd7r (init-postgres)                                                                                                                                                                │
│ Stream closed EOF for support/chatwoot-migrate-dgd7r (init-redis)                                                                                                                                                                   │
│ db-migrate-job fatal: not a git repository (or any of the parent directories): .git                                                                                                                                                 │
│ db-migrate-job I, [2023-09-27T12:13:35.132167 chatwoot/chatwoot#1]  INFO -- : Migrating to UpdateReportingEventsFirstResponseTime (20230302054408)                                                                                                   │
│ db-migrate-job == 20230302054408 UpdateReportingEventsFirstResponseTime: migrating ===========                                                                                                                                      │
│ db-migrate-job rails aborted!                                                                                                                                                                                                       │
│ db-migrate-job StandardError: An error has occurred, this and all later migrations canceled:                                                                                                                                        │
│ db-migrate-job                                                                                                                                                                                                                      │
│ db-migrate-job PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"                                                                                                                                            │
│ db-migrate-job LINE 1: ... "accounts".* FROM "accounts" ORDER BY "accounts"."" ASC LIM...                                                                                                                                           │
│ db-migrate-job                                                              ^                                                                                                                                                       │
│ db-migrate-job /app/db/migrate/20230302054408_update_reporting_events_first_response_time.rb:3:in `change'                                                                                                                          │
│ db-migrate-job /app/lib/tasks/db_enhancements.rake:26:in `block (3 levels) in <main>'                                                                                                                                               │
│ db-migrate-job /app/lib/tasks/db_enhancements.rake:18:in `each'                                                                                                                                                                     │
│ db-migrate-job /app/lib/tasks/db_enhancements.rake:18:in `block (2 levels) in <main>'                                                                                                                                               │
│ db-migrate-job                                                                                                                                                                                                                      │
│ db-migrate-job Caused by:                                                                                                                                                                                                           │
│ db-migrate-job ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"                                                                                                            │
│ db-migrate-job LINE 1: ... "accounts".* FROM "accounts" ORDER BY "accounts"."" ASC LIM...                                                                                                                                           │
│ db-migrate-job                                                              ^                                                                                                                                                       │
│ db-migrate-job /app/db/migrate/20230302054408_update_reporting_events_first_response_time.rb:3:in `change'                                                                                                                          │
│ db-migrate-job /app/lib/tasks/db_enhancements.rake:26:in `block (3 levels) in <main>'                                                                                                                                               │
│ db-migrate-job /app/lib/tasks/db_enhancements.rake:18:in `each'                                                                                                                                                                     │
│ db-migrate-job /app/lib/tasks/db_enhancements.rake:18:in `block (2 levels) in <main>'                                                                                                                                               │
│ db-migrate-job                                                                                                                                                                                                                      │
│ db-migrate-job Caused by:                                                                                                                                                                                                           │
│ db-migrate-job PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"                                                                                                                                            │
│ db-migrate-job LINE 1: ... "accounts".* FROM "accounts" ORDER BY "accounts"."" ASC LIM...                                                                                                                                           │
│ db-migrate-job                                                              ^                                                                                                                                                       │
│ db-migrate-job /app/db/migrate/20230302054408_update_reporting_events_first_response_time.rb:3:in `change'                                                                                                                          │
│ db-migrate-job /app/lib/tasks/db_enhancements.rake:26:in `block (3 levels) in <main>'                                                                                                                                               │
│ db-migrate-job /app/lib/tasks/db_enhancements.rake:18:in `each'                                                                                                                                                                     │
│ db-migrate-job /app/lib/tasks/db_enhancements.rake:18:in `block (2 levels) in <main>'                                                                                                                                               │
│ db-migrate-job Tasks: TOP => db:migrate                                                                                                                                                                                             │
│ db-migrate-job (See full trace by running task with --trace)

To Reproduce

  1. try to upgrade to 3.1.0
  2. use helm upgrade
  3. get logs of migration jobs

Expected behavior

No response

Environment

Kubernetes

Cloud Provider

Other [please specify in the description]

Platform

None

Operating system

No response

Browser and version

No response

Docker (if applicable)

  • k8s 1.28.0

Additional context

No response

@pranavrajs pranavrajs transferred this issue from chatwoot/chatwoot Sep 27, 2023
@jalberto
Copy link
Author

I think this happened at some point on migrating the DB from one server to another by using pg dump/restore

Somehow, still not clear to me as only happened to chatwoot, some tables lost its primarykey configuration and the sequences were resented

I will close this issue as I cannot ensure it was something in chatwoot side.

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

No branches or pull requests

2 participants