Updating map column fails authorization in VERY specific scenarios

Me again!

I have a Person resource that has a birthdate field. I would like to have the column be a map type because I want to allow a nil year. My domain always requires an actor and I have some policies set up to ensure that the actor is the only one that can read, update, or destroy the Resource.

When I attempt to update the Resource’s birthdate field with an appropriate actor, I get the following error:


17:43:20.715 [debug] QUERY ERROR source="people" db=0.0ms queue=2.8ms idle=1211.0ms
UPDATE "people" AS p0 SET "birthdate" = s1."__new_birthdate", "updated_at" = s1."__new_updated_at" FROM (SELECT $1::timestamp::timestamp AS "__new_updated_at", $2 AS "__new_birthdate", sp0."id" AS "id" FROM "people" AS sp0 LEFT OUTER JOIN "public"."people" AS sp1 ON sp0."user_id" = sp1."id" WHERE (sp0."id"::uuid = $3::uuid) AND ((CASE WHEN sp1."id"::uuid = $4::uuid THEN $5 ELSE ash_raise_error($6::jsonb) END))) AS s1 WHERE (p0."id" = s1."id") RETURNING p0."id", p0."name", p0."birthdate", p0."inserted_at", p0."updated_at", p0."user_id" [~U[2025-02-16 23:43:20.711984Z], %{month: 2, day: 4, year: 2000}, "f8af8361-bc73-4fe4-8891-1c7ee75c9cae", "202c002e-8bbc-45dd-89e0-623f07360d0d", true, "{\"input\":{\"authorizer\":\"Ash.Policy.Authorizer\"},\"exception\":\"Ash.Error.Forbidden.Placeholder\"}"]
** (Ash.Error.Unknown)
Bread Crumbs:
  > Exception raised in bulk update: Playdate.People.Person.update
  > Exception raised in: Playdate.People.Person.update

Unknown Error

* ** (Postgrex.Error) ERROR 42804 (datatype_mismatch) column "birthdate" is of type jsonb but expression is of type text

    query: UPDATE "people" AS p0 SET "birthdate" = s1."__new_birthdate", "updated_at" = s1."__new_updated_at" FROM (SELECT $1::timestamp::timestamp AS "__new_updated_at", $2 AS "__new_birthdate", sp0."id" AS "id" FROM "people" AS sp0 LEFT OUTER JOIN "public"."people" AS sp1 ON sp0."user_id" = sp1."id" WHERE (sp0."id"::uuid = $3::uuid) AND ((CASE WHEN sp1."id"::uuid = $4::uuid THEN $5 ELSE ash_raise_error($6::jsonb) END))) AS s1 WHERE (p0."id" = s1."id") RETURNING p0."id", p0."name", p0."birthdate", p0."inserted_at", p0."updated_at", p0."user_id"

    hint: You will need to rewrite or cast the expression.
  (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:1096: Ecto.Adapters.SQL.raise_sql_call_error/1
  (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:994: Ecto.Adapters.SQL.execute/6
  (ecto 3.12.5) lib/ecto/repo/queryable.ex:232: Ecto.Repo.Queryable.execute/4
  (ash_postgres 2.5.3) lib/data_layer.ex:1503: AshPostgres.DataLayer.update_query/4
  (ash 3.4.63) lib/ash/actions/update/bulk.ex:576: Ash.Actions.Update.Bulk.do_atomic_update/5
  (ash 3.4.63) lib/ash/actions/update/bulk.ex:272: Ash.Actions.Update.Bulk.run/6
  (ash 3.4.63) lib/ash/actions/update/update.ex:165: Ash.Actions.Update.run/4
  (ash 3.4.63) lib/ash.ex:2736: Ash.update/3
    (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:1096: Ecto.Adapters.SQL.raise_sql_call_error/1
    (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:994: Ecto.Adapters.SQL.execute/6
    (ecto 3.12.5) lib/ecto/repo/queryable.ex:232: Ecto.Repo.Queryable.execute/4
    (ash_postgres 2.5.3) lib/data_layer.ex:1503: AshPostgres.DataLayer.update_query/4
    (ash 3.4.63) lib/ash/actions/update/bulk.ex:576: Ash.Actions.Update.Bulk.do_atomic_update/5
    (ash 3.4.63) lib/ash/actions/update/bulk.ex:272: Ash.Actions.Update.Bulk.run/6
    (ash 3.4.63) lib/ash/actions/update/update.ex:165: Ash.Actions.Update.run/4
    iex:10: (file)

Based on the debug output, this led me to think, despite the Postgrex error later, that it was actually an authorization error. If I change my authorization code to always allow an update, it passes and the update is made.

Here’s where it gets stranger. If I use defaults [:read, update: :*], the update passes, even with my more restrictive policy (this is what I would consider expected behaviour). If I have an actual update :update do ... end block, the policy fails BUT ONLY WHEN UPDATING THE birthdate MAP FIELD. I’ve tried both putting in all the fields explicity and the :* version within the block and both fail. If I put in the always() policy for action_type(:update), the update again succeeds even with the block-type update.

Is there something I need to put in my update :update do ... end block for that birthdate field specifically? I am at a total loss here.

Here is my resource.

defmodule Playdate.People.Person do
  use Ash.Resource,
    otp_app: :playdate,
    domain: Playdate.People,
    authorizers: [Ash.Policy.Authorizer],
    data_layer: AshPostgres.DataLayer

  postgres do
    table "people"
    repo Playdate.Repo
  end

  actions do
    defaults [:read]
    # defaults [:read, update: :*] THIS ALWAYS SUCCEEDS

    create :create do
      accept [:birthdate, :name]
      change relate_actor(:user)
    end

    read :list do
      prepare build(load: [:date_of_latest_activity])
    end

    update :update do
      accept :* # STRANGELY, THIS ALSO FAILS
      # accept [:birthdate, :name] THIS FAILS
    end
  end

  policies do
    policy action_type(:create) do
      authorize_if always()
    end

    # this allows the block-type update action to succeed
    policy action_type(:update) do
      authorize_if always()
    end

    # putting :update in here (instead of the above) only succeeds when I don't use the block-type update definition
    # but it only fails when updating the `birthdate` field
    policy action_type([:destroy, :read]) do
      authorize_if relates_to_actor_via(:user)
    end
  end

  attributes do
    uuid_primary_key :id

    attribute :birthdate, :map do
      allow_nil? true
      public? true

      constraints fields: [
                    year: [
                      type: :integer,
                      allow_nil?: true
                    ],
                    month: [
                      type: :integer,
                      allow_nil?: false,
                      constraints: [
                        min: 1,
                        max: 12
                      ]
                    ],
                    day: [
                      type: :integer,
                      allow_nil?: false,
                      constraints: [
                        min: 1,
                        max: 31
                      ]
                    ]
                  ]
    end

    attribute :name, :string do
      allow_nil? false
      public? true
    end

    timestamps()
  end

  relationships do
    belongs_to :user, Playdate.People.Person
    has_many :activities, Playdate.People.Activity
  end

  aggregates do
    first :date_of_latest_activity, :activities, :date do
      sort date: :desc
      public? true
    end
  end
end

I’m on latest ash (main in fact) and all the related ash packages.

1 Like

This looks like a query building error to me :smile: if you can set up a reproduction I will take a look tomorrow.

EDIT: or whenever you have time to put together a reproduction :slight_smile:

2 Likes

You got it! Same repo as last time: GitHub - geolessel/ash-bug-repo. I’ve tagged the different bugs in that repo—this tag is map-bug (but it should essentially be the same as main).

Could you include a failing test? I don’t see one in that repo.

Or code I can run to reproduce the issue. Saves me a lot of time putzing around making sure I have exactly the conditions :smile:

Oh hmm. I already included the steps to reproduce the bug in an IEx session in the repo readme. It’s like 4 lines you can copy and paste. If that’s not enough I can come up with a test tomorrow.

Sorry, missed that somehow :slight_smile:

Fixed in ash_sql main.

1 Like

@zachdaniel Thank you. I can confirm that it is indeed working in fine now in the reproduction repo I created. However (and annoyingly), it does not seem to be fixed in my main project in which I first discovered the bug. I’ve tried adding other dependencies and such to the reproduction repo to again reproduce this but have been unable.

I’m going to paste my real project’s code in here to see if anything strikes you. I’m also going to include my other dependencies in case there is something else that is hijacking that sql.

First, the error as it shows up:

[debug] QUERY ERROR source="people" db=0.0ms queue=12.2ms idle=1970.5ms
UPDATE "people" AS p0 SET "birthdate" = s1."__new_birthdate", "updated_at" = s1."__new_updated_at" FROM (SELECT $1::timestamp::timestamp AS "__new_updated_at", $2 AS "__new_birthdate", sp0."id" AS "id" FROM "people" AS sp0 LEFT OUTER JOIN "public"."users" AS su1 ON sp0."user_id" = su1."id" WHERE (sp0."archived_at"::timestamp IS NULL) AND (sp0."id"::uuid::uuid = $3::uuid::uuid) AND ((CASE WHEN su1."id"::uuid::uuid = $4::uuid::uuid THEN $5 ELSE ash_raise_error($6::jsonb) END))) AS s1 WHERE (p0."id" = s1."id") RETURNING p0."id", p0."name", p0."description", p0."inserted_at", p0."updated_at", p0."user_id", p0."archived_at", p0."birthdate" [~U[2025-02-18 14:16:24.660441Z], %{month: 3, day: 30, year: 1980}, "6e148b61-b725-45bd-b814-0e1f4a179751", "2eabb5f4-e3a9-4c8a-b938-f381257a7168", true, "{\"input\":{\"authorizer\":\"Ash.Policy.Authorizer\"},\"exception\":\"Ash.Error.Forbidden.Placeholder\"}"]
↳ AshPostgres.DataLayer.update_query/4, at: lib/data_layer.ex:1503
** (Ash.Error.Unknown)
Bread Crumbs:
  > Exception raised in bulk update: MyApp.People.Person.update
  > Exception raised in: MyApp.People.Person.update

Unknown Error

* ** (Postgrex.Error) ERROR 42804 (datatype_mismatch) column "birthdate" is of type jsonb but expression is of type text

    query: UPDATE "people" AS p0 SET "birthdate" = s1."__new_birthdate", "updated_at" = s1."__new_updated_at" FROM (SELECT $1::timestamp::timestamp AS "__new_updated_at", $2 AS "__new_birthdate", sp0."id" AS "id" FROM "people" AS sp0 LEFT OUTER JOIN "public"."users" AS su1 ON sp0."user_id" = su1."id" WHERE (sp0."archived_at"::timestamp IS NULL) AND (sp0."id"::uuid::uuid = $3::uuid::uuid) AND ((CASE WHEN su1."id"::uuid::uuid = $4::uuid::uuid THEN $5 ELSE ash_raise_error($6::jsonb) END))) AS s1 WHERE (p0."id" = s1."id") RETURNING p0."id", p0."name", p0."description", p0."inserted_at", p0."updated_at", p0."user_id", p0."archived_at", p0."birthdate"

    hint: You will need to rewrite or cast the expression.
  (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:1096: Ecto.Adapters.SQL.raise_sql_call_error/1

My Person resource:

defmodule MyApp.People.Person do
  @moduledoc false
  use Ash.Resource,
    otp_app: :MyApp,
    domain: MyApp.People,
    authorizers: [Ash.Policy.Authorizer],
    data_layer: AshPostgres.DataLayer,
    extensions: [AshArchival.Resource]

  postgres do
    table "people"
    repo MyApp.Repo
  end

  actions do
    defaults [:destroy, :read]

    create :create do
      accept [:birthdate, :description, :name]
      change relate_actor(:user)
    end

    read :list do
      prepare build(load: [:email_addresses, :date_of_latest_activitie])
    end

    read :get_for_show do
      prepare build(load: [:email_addresses, :note, :phone_numbers, :activities])
    end

    update :update do
      accept [:birthdate, :description, :name]
    end
  end

  policies do
    policy action_type(:create) do
      authorize_if always()
    end

    policy action_type([:destroy, :read, :update]) do
      authorize_if relates_to_actor_via(:user)
    end
  end

  attributes do
    uuid_primary_key :id

    attribute :birthdate, :map do
      allow_nil? true
      public? true

      constraints fields: [
                    year: [
                      type: :integer,
                      allow_nil?: true
                    ],
                    month: [
                      type: :integer,
                      allow_nil?: false,
                      constraints: [
                        min: 1,
                        max: 12
                      ]
                    ],
                    day: [
                      type: :integer,
                      allow_nil?: false,
                      constraints: [
                        min: 1,
                        max: 31
                      ]
                    ]
                  ]
    end

    attribute :description, :string do
      allow_nil? true
      public? true
    end

    attribute :name, :string do
      allow_nil? false
      public? true
    end

    timestamps()
  end

  relationships do
    belongs_to :user, MyApp.Accounts.User, allow_nil?: false

    has_many :phone_numbers, MyApp.People.PhoneNumber
    has_many :email_addresses, MyApp.People.EmailAddress

    has_many :activities, MyApp.People.Activity do
      sort date: :desc
    end

    has_one :note, MyApp.People.Note
  end

  aggregates do
    first :date_of_latest_activity, :activities, :date do
      sort date: :desc
      public? true
    end
  end
end

My deps

  defp deps do
    [
      # {:ash, "~> 3.0"},
      {:ash, github: "ash-project/ash", branch: "main", override: true},
      {:ash_admin, "~> 0.12"},
      {:ash_archival, "~> 1.0"},
      {:ash_authentication, "~> 4.0"},
      {:ash_authentication_phoenix, "~> 2.0"},
      {:ash_json_api, "~> 1.0"},
      {:ash_paper_trail, "~> 0.5"},
      {:ash_phoenix, "~> 2.0"},
      # {:ash_postgres, "~> 2.0"},
      {:ash_postgres, github: "ash-project/ash_postgres", branch: "main", override: true},
      {:ash_sql, github: "ash-project/ash_sql", branch: "main", override: true},
      {:bandit, "~> 1.5"},
      {:bcrypt_elixir, "~> 3.0"},
      {:dns_cluster, "~> 0.1.1"},
      {:earmark, "~> 1.4"},
      {:ecto_sql, "~> 3.10"},
      {:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
      {:finch, "~> 0.13"},
      {:floki, ">= 0.30.0", only: :test},
      {:gettext, "~> 0.26"},
      {:heroicons,
       github: "tailwindlabs/heroicons", tag: "v2.1.1", sparse: "optimized", app: false, compile: false, depth: 1},
      {:igniter, "~> 0.5", only: [:dev, :test]},
      {:jason, "~> 1.2"},
      {:open_api_spex, "~> 3.0"},
      {:phoenix, "~> 1.7.18"},
      {:phoenix_ecto, "~> 4.5"},
      {:phoenix_html, "~> 4.1"},
      {:phoenix_live_dashboard, "~> 0.8.3"},
      {:phoenix_live_reload, "~> 1.2", only: :dev},
      {:phoenix_live_view, "~> 1.0.0"},
      {:picosat_elixir, "~> 0.2"},
      {:postgrex, ">= 0.0.0"},
      {:salad_ui, "~> 0.14"},
      {:sourceror, "~> 1.7", only: [:dev, :test]},
      {:styler, "~> 1.2.1", only: [:dev, :test], runtime: false},
      {:swoosh, "~> 1.5"},
      {:tailwind, "~> 0.2", runtime: Mix.env() == :dev},
      {:tailwind_formatter, "~> 0.4.2", only: [:dev, :test], runtime: false},
      {:telemetry_metrics, "~> 1.0"},
      {:telemetry_poller, "~> 1.0"},
      {:timex, "~> 3.0"}
    ]
  end

And finally (in a separate post because it was too long to include in the previous one)…

My mix.lock (truncated to the ash-related ones)

  "ash": {:git, "https://github.com/ash-project/ash.git", "a36aed61db75d19528bfefe84e8f9c77bfcc80b7", [branch: "main"]},
  "ash_admin": {:hex, :ash_admin, "0.12.6", "ffebd80dd4af1b14aa85d589e40cdb94d6751db207e3c39634cf744a51c83f7d", [:mix], [{:ash, ">= 3.4.47 and < 4.0.0-0", [hex: :ash, repo: "hexpm", optional: false]}, {:ash_phoenix, ">= 2.1.8 and < 3.0.0-0", [hex: :ash_phoenix, repo: "hexpm", optional: false]}, {:gettext, "~> 0.26", [hex: :gettext, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.7", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 4.1", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}], "hexpm", "15ea0c8a73b897c3c81300913b9e03fa162b7796e458c550869820bf39fa39ed"},
  "ash_archival": {:hex, :ash_archival, "1.1.0", "414fe9eedbe4d18584bbd6ddc708434af54087008715c9cb09e11c93d96979d8", [:mix], [{:ash, ">= 3.0.5 and < 4.0.0-0", [hex: :ash, repo: "hexpm", optional: false]}], "hexpm", "225665cf15a49d362b29c786e64f25d770d2a50c3a1a3b214d167c57056b8551"},
  "ash_authentication": {:hex, :ash_authentication, "4.4.5", "1c626de7191d43382083109fc459b895cd8ec255538dcd1933518b0755f7a3f6", [:mix], [{:ash, ">= 3.4.29 and < 4.0.0-0", [hex: :ash, repo: "hexpm", optional: false]}, {:ash_postgres, "~> 2.0", [hex: :ash_postgres, repo: "hexpm", optional: true]}, {:assent, "~> 0.2.0", [hex: :assent, repo: "hexpm", optional: false]}, {:bcrypt_elixir, "~> 3.0", [hex: :bcrypt_elixir, repo: "hexpm", optional: false]}, {:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:finch, "~> 0.19", [hex: :finch, repo: "hexpm", optional: false]}, {:igniter, "~> 0.4", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:joken, "~> 2.5", [hex: :joken, repo: "hexpm", optional: false]}, {:plug, "~> 1.13", [hex: :plug, repo: "hexpm", optional: false]}, {:spark, "~> 2.0", [hex: :spark, repo: "hexpm", optional: false]}, {:splode, "~> 0.2", [hex: :splode, repo: "hexpm", optional: false]}], "hexpm", "3288d83ac21d76951cf3b6410e8b231175d9006f909326ff1277859072160ec6"},
  "ash_authentication_phoenix": {:hex, :ash_authentication_phoenix, "2.4.5", "867a7df1af6d09ce6eb28485f66b5c96a8efad61e7926d39537bd2591f71da0c", [:mix], [{:ash, "~> 3.0", [hex: :ash, repo: "hexpm", optional: false]}, {:ash_authentication, "~> 4.1", [hex: :ash_authentication, repo: "hexpm", optional: false]}, {:ash_phoenix, "~> 2.0", [hex: :ash_phoenix, repo: "hexpm", optional: false]}, {:bcrypt_elixir, "~> 3.0", [hex: :bcrypt_elixir, repo: "hexpm", optional: false]}, {:gettext, "~> 0.26", [hex: :gettext, repo: "hexpm", optional: true]}, {:igniter, ">= 0.5.1 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.6", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_html_helpers, "~> 1.0", [hex: :phoenix_html_helpers, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}, {:slugify, "~> 1.3", [hex: :slugify, repo: "hexpm", optional: false]}], "hexpm", "64fe265d656de4296904b408cb019ffc156fabb4be5f6894e507bb05f346ee3c"},
  "ash_json_api": {:hex, :ash_json_api, "1.4.17", "0fb3c49d08043565a32f572abb4ba55de1f16eea3a3b49d2de0d3c8a4bd76a0d", [:mix], [{:ash, "~> 3.3", [hex: :ash, repo: "hexpm", optional: false]}, {:igniter, ">= 0.3.58 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:json_xema, "~> 0.4", [hex: :json_xema, repo: "hexpm", optional: false]}, {:open_api_spex, "~> 3.16", [hex: :open_api_spex, repo: "hexpm", optional: true]}, {:plug, "~> 1.11", [hex: :plug, repo: "hexpm", optional: false]}, {:spark, ">= 2.2.10 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}], "hexpm", "ed320880b7dfffddc9cc58ef15446e675af11c4ec30a0d8cecb5238912ae76fc"},
  "ash_paper_trail": {:hex, :ash_paper_trail, "0.5.0", "e9645305875be2d1afa416803f1d07569edaf0ef6517d9ac408a9fcbb136b7db", [:mix], [{:ash, "~> 3.0", [hex: :ash, repo: "hexpm", optional: false]}], "hexpm", "5c47de72b2f815f7827b4e4e22b72c0e25219620db4bb1ed75eaee05369ca74e"},
  "ash_phoenix": {:hex, :ash_phoenix, "2.1.15", "6894ca316fd4058b8c93b87fe37d6ada0ee0b65d3ac270c3c74721ab9fe63d91", [:mix], [{:ash, ">= 3.4.31 and < 4.0.0-0", [hex: :ash, repo: "hexpm", optional: false]}, {:igniter, ">= 0.4.3 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.5.6 or ~> 1.6", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.20.3 or ~> 1.0-rc.1", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:spark, ">= 2.2.29 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}], "hexpm", "a6b7c93387395d0bb9c1cf9ab583200ac0bafca3f154958d8d376cd0f4350b5d"},
  "ash_postgres": {:git, "https://github.com/ash-project/ash_postgres.git", "120d2049b954caed768526008ce8ddbf3b6b56b8", [branch: "main"]},
  "ash_sql": {:git, "https://github.com/ash-project/ash_sql.git", "8cbafa1f105a4dc9737716096e174749a1375fd3", [branch: "main"]},
  "bcrypt_elixir": {:hex, :bcrypt_elixir, "3.2.0", "feab711974beba4cb348147170346fe097eea2e840db4e012a145e180ed4ab75", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "563e92a6c77d667b19c5f4ba17ab6d440a085696bdf4c68b9b0f5b30bc5422b8"},
  "comeonin": {:hex, :comeonin, "5.5.0", "364d00df52545c44a139bad919d7eacb55abf39e86565878e17cebb787977368", [:mix], [], "hexpm", "6287fc3ba0aad34883cbe3f7949fc1d1e738e5ccdce77165bc99490aa69f47fb"},
  "db_connection": {:hex, :db_connection, "2.7.0", "b99faa9291bb09892c7da373bb82cba59aefa9b36300f6145c5f201c7adf48ec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dcf08f31b2701f857dfc787fbad78223d61a32204f217f15e881dd93e4bdd3ff"},
  "ecto": {:hex, :ecto, "3.12.5", "4a312960ce612e17337e7cefcf9be45b95a3be6b36b6f94dfb3d8c361d631866", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6eb18e80bef8bb57e17f5a7f068a1719fbda384d40fc37acb8eb8aeca493b6ea"},
  "ecto_sql": {:hex, :ecto_sql, "3.12.1", "c0d0d60e85d9ff4631f12bafa454bc392ce8b9ec83531a412c12a0d415a3a4d0", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.12", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.7", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.19 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "aff5b958a899762c5f09028c847569f7dfb9cc9d63bdb8133bff8a5546de6bf5"},
  "ets": {:hex, :ets, "0.9.0", "79c6a6c205436780486f72d84230c6cba2f8a9920456750ddd1e47389107d5fd", [:mix], [], "hexpm", "2861fdfb04bcaeff370f1a5904eec864f0a56dcfebe5921ea9aadf2a481c822b"},
  "gettext": {:hex, :gettext, "0.26.2", "5978aa7b21fada6deabf1f6341ddba50bc69c999e812211903b169799208f2a8", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "aa978504bcf76511efdc22d580ba08e2279caab1066b76bb9aa81c4a1e0a32a5"},
  "igniter": {:hex, :igniter, "0.5.25", "a9e26794efe4b5619edd112b2ce8ffa3931f1e4d558dfebcd344553024e359b5", [:mix], [{:glob_ex, "~> 0.1.7", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:inflex, "~> 2.0", [hex: :inflex, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:owl, "~> 0.11", [hex: :owl, repo: "hexpm", optional: false]}, {:phx_new, "~> 1.7", [hex: :phx_new, repo: "hexpm", optional: true]}, {:req, "~> 0.5", [hex: :req, repo: "hexpm", optional: false]}, {:rewrite, ">= 1.1.1 and < 2.0.0-0", [hex: :rewrite, repo: "hexpm", optional: false]}, {:sourceror, "~> 1.4", [hex: :sourceror, repo: "hexpm", optional: false]}, {:spitfire, ">= 0.1.3 and < 1.0.0-0", [hex: :spitfire, repo: "hexpm", optional: false]}], "hexpm", "d944d3ed8439bb2d98391f39b86305d109f4123c947061db54c1c0f9ecad890e"},
  "open_api_spex": {:hex, :open_api_spex, "3.21.2", "6a704f3777761feeb5657340250d6d7332c545755116ca98f33d4b875777e1e5", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 3.0 or ~> 4.0 or ~> 5.0 or ~> 6.0", [hex: :poison, repo: "hexpm", optional: true]}, {:ymlr, "~> 2.0 or ~> 3.0 or ~> 4.0 or ~> 5.0", [hex: :ymlr, repo: "hexpm", optional: true]}], "hexpm", "f42ae6ed668b895ebba3e02773cfb4b41050df26f803f2ef634c72a7687dc387"},
  "picosat_elixir": {:hex, :picosat_elixir, "0.2.3", "bf326d0f179fbb3b706bb2c15fbc367dacfa2517157d090fdfc32edae004c597", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "f76c9db2dec9d2561ffaa9be35f65403d53e984e8cd99c832383b7ab78c16c66"},
  "postgrex": {:hex, :postgrex, "0.20.0", "363ed03ab4757f6bc47942eff7720640795eb557e1935951c1626f0d303a3aed", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "d36ef8b36f323d29505314f704e21a1a038e2dc387c6409ee0cd24144e187c0f"},
  "spark": {:hex, :spark, "2.2.45", "19e3a879e80d02853ded85ed7b4c0a84a5d2e395f9d0c884e1a13afbe026929d", [:mix], [{:igniter, ">= 0.3.64 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: true]}, {:sourceror, "~> 1.2", [hex: :sourceror, repo: "hexpm", optional: true]}], "hexpm", "70b272d0ee16e3c10a4f8cf0ef6152840828152e68f2f8e3046e89567f2b49ad"},
  "spitfire": {:hex, :spitfire, "0.1.5", "10b041e781bff9544d2fdf00893e1a325758408c5366a9bfa4333072568659b1", [:mix], [], "hexpm", "866a55d21fe827934ff38200111335c9dd311df13cbf2580ed71d84b0a783150"},
  "splode": {:hex, :splode, "0.2.8", "289d4eec13e7a83061bc44827877eb4c575e1fdf198bd1a9c6449f9b64805059", [:mix], [], "hexpm", "dbe92fa526589416435e12203b56db1f74c834d207bc474016cedf930d987284"},
}

This ref that you have for ash_sql is the ref before the fix: 8cbafa1f105a4dc9737716096e174749a1375fd3 is what you have. Try mix deps.update ash_sql to update to a later sha.

1 Like

Wow, I definitely ran update on ash_sql before posting this. I wonder why it didn’t catch that new SHA. In any case, I cleaned the deps, updated, and got them again and this time I have the good SHA.

Confirmed that my main application issues have been fixed! Thank you.

1 Like