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

Syncing doesn't work at all anymore #429

Open
RappyTV opened this issue Apr 16, 2024 · 2 comments
Open

Syncing doesn't work at all anymore #429

RappyTV opened this issue Apr 16, 2024 · 2 comments

Comments

@RappyTV
Copy link

RappyTV commented Apr 16, 2024

I'm on accent version v1.21.1 and cli version v0.16.2 and the console is spammed with these errors:

accent

accent           | 18:47:52.721 [error] GenServer {Oban.Registry, {Oban, {:producer, "hook"}}} terminating
accent           | ** (Postgrex.Error) ERROR 42601 (syntax_error) syntax error at or near "MATERIALIZED"
accent           | 
accent           |     query: WITH "subset" AS MATERIALIZED(SELECT so0."id" AS "id" FROM "public"."oban_jobs" AS so0 WHERE (so0."state" = 'available') AND (so0."queue" = $1) ORDER BY so0."priority", so0."scheduled_at", so0."id" LIMIT $2 FOR UPDATE SKIP LOCKED) UPDATE "public"."oban_jobs" AS o0 SET "state" = $3, "attempted_at" = $4, "attempted_by" = $5, "attempt" = o0."attempt" + $6 FROM "subset" AS f1 WHERE (o0."id" = f1."id") AND (o0."attempt" < o0."max_attempts") RETURNING o0."id", o0."state", o0."queue", o0."worker", o0."args", o0."meta", o0."tags", o0."errors", o0."attempt", o0."attempted_by", o0."max_attempts", o0."priority", o0."attempted_at", o0."cancelled_at", o0."completed_at", o0."discarded_at", o0."inserted_at", o0."scheduled_at"
accent           |     (ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1054: Ecto.Adapters.SQL.raise_sql_call_error/1
accent           |     (ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:952: Ecto.Adapters.SQL.execute/6
accent           |     (ecto 3.11.2) lib/ecto/repo/queryable.ex:232: Ecto.Repo.Queryable.execute/4
accent           |     (oban 2.17.6) lib/oban/engines/basic.ex:119: anonymous fn/4 in Oban.Engines.Basic.fetch_jobs/3
accent           |     (ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1358: anonymous fn/3 in Ecto.Adapters.SQL.checkout_or_transaction/4
accent           |     (db_connection 2.6.0) lib/db_connection.ex:1710: DBConnection.run_transaction/4
accent           |     (oban 2.17.6) lib/oban/engine.ex:223: anonymous fn/4 in Oban.Engine.fetch_jobs/3
accent           |     (oban 2.17.6) lib/oban/engine.ex:319: anonymous fn/3 in Oban.Engine.with_span/4
accent           | Last message: :dispatch
accent           | State: %Oban.Queue.Producer{conf: %Oban.Config{dispatch_cooldown: 5, engine: Oban.Engines.Basic, get_dynamic_repo: nil, insert_trigger: true, log: false, name: Oban, node: "accent@09fd3e1ba5f0", notifier: {Oban.Notifiers.Postgres, []}, peer: {Oban.Peers.Postgres, []}, plugins: [{Oban.Plugins.Pruner, []}], prefix: "public", queues: [hook: [limit: 10], operations: [limit: 10]], repo: Accent.Repo, shutdown_grace_period: 15000, stage_interval: 1000, testing: :disabled}, foreman: {:via, Registry, {Oban.Registry, {Oban, {:foreman, "hook"}}}}, meta: %{name: Oban, node: "accent@09fd3e1ba5f0", queue: "hook", started_at: ~U[2024-04-16 18:47:51.670109Z], limit: 10, uuid: "f31926cc-1d3d-4813-beb9-7821b8939d81", updated_at: ~U[2024-04-16 18:47:51.670124Z], paused: false, refresh_interval: 30000}, name: {:via, Registry, {Oban.Registry, {Oban, {:producer, "hook"}}}}, dispatch_timer: #Reference<0.1743839257.3231449094.110850>, refresh_timer: #Reference<0.1743839257.3231449094.110776>, dispatch_cooldown: 5, running: %{}}

postgresql

accent-postgres  | 2024-04-16 18:47:56.858 UTC [35] ERROR:  syntax error at or near "MATERIALIZED" at character 18
accent-postgres  | 2024-04-16 18:47:56.858 UTC [35] STATEMENT:  WITH "subset" AS MATERIALIZED(SELECT so0."id" AS "id" FROM "public"."oban_jobs" AS so0 WHERE (so0."state" = 'available') AND (so0."queue" = $1) ORDER BY so0."priority", so0."scheduled_at", so0."id" LIMIT $2 FOR UPDATE SKIP LOCKED) UPDATE "public"."oban_jobs" AS o0 SET "state" = $3, "attempted_at" = $4, "attempted_by" = $5, "attempt" = o0."attempt" + $6 FROM "subset" AS f1 WHERE (o0."id" = f1."id") AND (o0."attempt" < o0."max_attempts") RETURNING o0."id", o0."state", o0."queue", o0."worker", o0."args", o0."meta", o0."tags", o0."errors", o0."attempt", o0."attempted_by", o0."max_attempts", o0."priority", o0."attempted_at", o0."cancelled_at", o0."completed_at", o0."discarded_at", o0."inserted_at", o0."scheduled_at"

also i can't sync anymore with this response (the directory with the translation files is not touched at all):

Fetch config in accent.json... API Client ✓

Syncing sources → en-US  ✓


Adding translations paths → cs, nl, de, it, ja, ko, lol, sk, es-ES, tr ✓

   Source: locales/%slug%.json
   ~~ Translations will be added on write ~~


Writing files locally


For more informations on operations: https://www.accent.reviews/guides/glossary.html#sync
Syncing took 406 milliseconds, completed without issues
@RappyTV
Copy link
Author

RappyTV commented Apr 24, 2024

Alr I just tested it with cli version v0.14.1 and that's working properly. So the error above is probably unrelated (but still annoying and most probably unwanted).

@simonprev
Copy link
Member

Could it be linked to the PostgreSQL version? Maybe a bump in Oban dependency caused an unsupported version of PostgreSQL to throw the error?

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