Closed Exadra37 closed 2 weeks ago
Is there something flaky about the generated files as well, or is it really just the tests?
It's just the tests. At a glance I cannot see any issue in the schema file.
The test is likely failing due to a map ordering issue. The attributes are converted to a map at:
For reference, inspecting these values in the tests:
Failure:
.[title: :string, desc: :string]
%{desc: :string, title: :string}
Success:
[title: :string, desc: :string]
%{title: :string, desc: :string}
Presumably these are used as a map to prevent duplicates? If they were kept as a keyword list, then the ordering would be deterministic.
@Gazler I don't know see why we use maps. +1 for converting to a keyword list.
Environment
Elixir 1.17.0 (compiled with Erlang/OTP 27)
{:phoenix, ">= 1.7.0"},
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"
Then run from the terminal:
Then wait for it to fail with:
Expected behavior
This command should run for minutes/hours without experiencing a random failure: