Ash Weekly: Issue #10
GigCity Elixir added to the training schedule, AlchemyConf Training on April 1st, and a new example app.
Ash Weekly!
This is a super quick, informal update about the goings on in and around Ash Framework each week. If you find something interesting and think it should make it on this newsletter, drop a message in the #ash-weekly channel in our Discord server.
Shameless Plugs
Check out Ash Premium Support from Alembic.
Sponsor me if you like what I do.
GigCity Elixir Training
We’ve got a training coming up in Chattanooga for the illustrious GigCity Elixir conference in May! Tickets are not on sale for the training yet, but let me tell you: it is by far the best pricing we’ve ever had for a training, and there are only going to be a few slots available. Keep your eyes peeled for the announcement! You can also catch my talk about Igniter while you’re there 🎉.
AlchemyConf Training
Join myself and Josh in Braga, Portugal for our training at AlchemyConf 🎉! Use code ZACHDANIEL to get 10% off your ticket to the conference. Can’t wait to see you all there 😎. Really looking forward to this conference.
https://membrz.club/alchemyconf/events/supercharge-your-elixir-apps-with-ash
A new example app: Tololo
Take a look at the ElixirForum post for a very interesting and ambitious Ash example application called “Tololo” (which is very fun to say). It’s great to have more examples out there of building interesting and useful things, especially when they aren’t contrived “todo” apps!
Releases
Ash: 3.4.69-3.4.71
`Ash.Seed.seed_generator` now supports a tuple input format, allowing you to only specify some fields to generate, with the rest taking on the default generators provided by their type.
The `compare` validation now supports `is_equal`, `is_not_equal`, and `is_nil`. You could always do this with custom validations or the builtin `attribute_equals`, but its nice to see this additional flexibility as the compare validation has some extra options that are useful in general.
A new option for read pagination called `stable_sort` allows configuring what sort we added to the end of any current sort, to ensure that pagination is stable. Previously it was always adding a sort by the primary key.
Using the a new backwards compatibility configuration, you can opt into some better behavior for bulk actions, specifically that the default value of `return_errors?` and `stop_on_error?` is now `true`. We’ve got a fancy new guide on backwards compatibility configurations, where you can find out more about this option.
Another backwards compatibility flagged change, after action hooks on read actions were being evaluated in reverse order. This is behavior from before 3.0, and was *supposed* to have been fixed in the 3.0 upgrade, but it was missed since multiple after action hooks on read actions are uncommon. See the backwards compatibility guide for more.
*Yet another* backwards compatibility flagged change: the default update action added with `defaults […]` was not configured to `require_atomic? true`. We want all update actions to require this by default, but couldn’t break everyone’s apps on an upgrade of course.
AshJsonApi: 1.4.21-1.4.22
Two improvements to the open api spec:
Types defined with `Ash.Type.NewType` are now properly rendered for inputs.
Some functions that are available were not being displayed in the open api spec, like `contains`, but they are now.
AshAuthentication 4.5.6-4.6.0
Added a `context` argument to secret functions, allowing you to choose secret values based on information about the action. For secrets called for plugs, it will contain the `conn`, allowing for more advanced oauth setups, etc.
The installer now sets `bcrypt_elixir` `log_rounds` to `1` in the test env. People’s test suites were taking forever for no good reason! If you don’t have that config set, we suggest setting it for faster tests.
AshAuthenticationPhoenix 2.5.0-2.5.1
Added an override to control the display order for strategies on the sign in page. See the docs for more.