mirego/accent

Syncing doesn't work at all anymore

Opened this issue · 1 comments

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

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).