ExUnited v0.1.2 has just been released
With the following improvements:
-
Add ability to use a different MIX_ENV when spawning nodes (solves
meckrelated testing problems) - Add boolean flag to not start ExUnit
The README fragment concerning the :mix_env configuration:
ATTENTION: When also using meck-based packages
The following errors can occur when also using packages like mock or MecksUnit (which both use the Erlang library meck to mock functions) and spawning the nodes with the default environment :test:
-
(UndefinedFunctionError) function Some.Module.some_function/1 is undefined -
(ErlangError) Erlang error: {{:undefined_module, < Some.Module >}
To tackle this, you should configure any other (Mix) environment to spawn the nodes with. Configure it like so:
# config/test.exs
import Config
config :ex_united,
mix_env: :dev
You might also want to consider using a bogus environment (e.g. :void) to skip the non-relevant :dev dependencies, like credo or dialyxir probably. That will save some compile time.
And last but not least, please note that using a different environment within CI builds will require compiling the project in that particular environment on beforehand of the tests. Otherwise spawning the nodes will take too much time and that will cause timeout errors during the tests.
# .gitlab-ci.yml
before_script:
...
- MIX_ENV=void mix deps.get
- MIX_ENV=void mix run -e 'IO.puts("Done.")'
- epmd -daemon
script:
- mix test
ElixirMix Podcast 093: Multi-Tenant DBs with Lars Wikman
In this episode of ElixirMix, we catch up with Lars Wikman to talk about what he’s learned along his journey with Elixir and multi-tenant databases. We cover what multi-tenant means, various ways to do it and where it may or may not make sense. We learn about dynamic repos, query prefixes, how to deal with migrations, testing, and much more!
phoenix_integration 0.8.2 released to hex
phoenix_integration 0.8.2 is released to Hex. Fixes Phoenix 1.5 compatibility and has better complex form verification.
Configuring your Elixir Application at Runtime with Vapor
Learn how to configure your application with Vapor in a safe, consistent, and reliable way that will last you well into the future.
https://blog.appsignal.com/2020/04/28/configuring-your-elixir-application-at-runtime-with-vapor.html
COVID-19’s outbreak worldwide using Phoenix LiveView
COVID-19 outbreak data displayed in a live table, built with Phoenix LiveView features only.
See Github page.
A modern Elixir pipeline for GitLab
Collection of learnings about GitLab pipelines that I’ve picked up on over the last few months, optimised for speed and clarity.
https://tomasztomczyk.com/2019/04/27/modern-elixir-pipeline-for-gitlab.html
I added realtime likes in less than an hour with Phoenix's LiveView
In this post, I show you how I added a realtime likes button to my blog via LiveView. Keep in mind this was the very first time I used LiveView and I was able to add this feature in about an hour and under 100 lines of code without writing any JS. That said it was my first time using LiveView and I’m sure it’s not a perfect approach.
https://morphic.pro/posts/i-added-realtime-likes-in-less-than-an-hour-with-phoenixs-liveview
How to add a user session metric to a Phoenix app with Pow
It’s very easy to add new metrics to the shiny new Phoenix LiveDashboard, in this post I show how to add a metric showing number of current sessions with Pow Auth. https://ghost.jmnorlund.net/instrumenting-an-elixir-phoenix-pow-application/
Resuming Elixir by self-hosting plausible analytics
My journey (in form of a daily journal and blog post) about learning more about Elixir, the BEAM, plausible analytics, deployment+hosting of Elixir and things discovered along the way!
Read the full story on cri.dev
#phoenix #elixir #analytics #docker #digitalocean
ExUnited v0.1.1 released
ExUnited v0.1.1 contains the following enhancements:
-
Add
:excludeoption for individual spawned nodes -
Exclude current project as dependency (instead, add
“lib”to code paths) - Do not generate config files
- Fix redundant prompt when in verbose mode
See Github page.
Elixir Quiz that tests your Knowledge in Elixir Programming.
Elixir Quiz that tests your Knowledge in Elixir Programming. Elixir Functional Programming Test Intermediate level 🖊 30 questions · ⏱ 30 sec · 🔀 questions
External sharing link: Elixir Quiz
Anyone else notice that Phoenix 1.5.0 was just released?
If you didn’t, don’t worry you are not alone.
In this post, I show you a few things you may have also missed about this new release. https://morphic.pro/posts/phoenix-1-5-0-has-been-released
Astarte 0.11.0 released!
Last week we released Astarte 0.11.0, the last Astarte stable release in the 0.x series. Astarte was born as an IoT platform written in Elixir, but it’s shifting fast towards a full-fledged Data Orchestration platform. Astarte 0.11 provides you with all the IoT commodities you might expect and more, from device management to data collection, and brings in enhanced performance and stability plus a number of additional features such as groups, Prometheus metrics, better scalability, improved device stats and more.
Elixir is a first class citizen in Astarte. Astarte Elixir libraries allow you to easily extend Astarte to implement additional custom services with little effort. Astarte also provides Elixir client libraries, and a dedicated Elixir Device SDK, which can be used with your Nerves embedded projects.
Astarte 0.11 also comes with a completely rewritten Kubernetes Operator, meaning reduced deployment times and reconciliation times (from minutes to seconds), and a more stable experience in cluster management
Last but not least, Astarte has several Device SDKs for different languages, and even device-specific SDKs (e.g.: ESP32). You can find them all at github.com/astarte-platform.
If you are not interested in IoT or data orchestration, we suggest anyway to watch/star our project for updates, since we spin-off shiny new Elixir libraries (or useful modules) as we try to solve some of Astarte’s technical challenges.
Links:
- Website: https://astarte.cloud/
- GitHub: https://github.com/astarte-platform/astarte/tree/release-0.11
- Documentation: https://docs.astarte-platform.org/0.11/001-intro_user.html
- DockerHub: https://hub.docker.com/u/astarte
- Hex: https://hex.pm/users/astarte
Web developer self evaluation
This is a project built with Elixir and Phoenix rather than my usual writing about Elixir and the ecosystem. It is a web developer self-evaluation tool that I think I will recommend to a great many juniors along the way. The idea is to give an idea of what things you might not know and might want to find out about. Web development is wide-ranging and starting out can be hard. I hope this one helps.
Adding custom metrics to a Phoenix 1.5 live dashboard
In this post I’ll walk you through creating custom Telemetry events for your application and adding them to your Phoenix 1.5 live dashboard.
https://medium.com/@marcdel/adding-custom-metrics-to-a-phoenix-1-5-live-dashboard-1b21a8df5cf1
Elixir Wizards Betweenisode
If you missed the live Elixir Wizards broadcast earlier this month, you can catch the whole thing in our podcast stream:
https://podcast.smartlogic.io/s4e0a-betweenisode-part-1https://podcast.smartlogic.io/s4e0b-betweenisode-part-2
With many many special guests: Saśa Jurić, Bruce and Maggie Tate, James Edward Gray II, Jim and Chris Freeze, Frank Hunleth, Chris Keathley, Amos King, Anna Neyzberg, Paul Schoenfelder, Sophie DeBenedetto, Meryl Dakin, Dave Thomas!
Highlander - global singleton processes in your Erlang cluster
I wrote about Highlander, a micro-library for running a single globally unique process in your Erlang cluster! https://moosecode.nl/blog/highlander_there_can_be_only_one
FlakyCI helps you fight test flakiness
Test flakiness is a common problem across every engineering organization but is often ignored and treated as a simple nuisance. With FlakyCI you can take steps right now to reduce or even eliminate it. It’s a project built with elixir and for elixir.
Have a look at https://www.flakyci.com/
