Releases: Strech/avrora
Another one fix 🎯
In this release, another issue was fixed. Due to mocking the entire HTTP client the guard clause in post
method was wrong, but thanks to @azeemchauhan is fixed now.
In addition, we start deprecation of Avrora.Codec.is_decodable/1
in favor of Avrora.Codec.is_decodable?/1
🙌🏼
Happy coding! 💧
A regression fix 🪛
In 0.29.0 I've overlooked a small issue which cause some troubles, but thanks to @lucas-nelson for the heads up and @woylie for the quick fix.
Happy coding 🍡
Less warnings ⚠️ in Elixir 1.18
A few fixes with a help of amazing folks! @sstoltze for fixing charlist warning and @rockneurotiko for moving conditional Avrora.Client
methods to be compile-time instead.
Happy programming in 2025 🎉
New SSL configuration options 🔐
In version 0.28 two new configuration options were added: registry_ssl_cacerts
and registry_ssl_cacert_path
both used for controlling SSL verification of the Schema Registry connection.
If both options are set, the registry_ssl_cacerts
takes precedence over registry_ssl_cacert_path
, also registry_ssl_cacerts
is a DER-encoded certificate, when registry_ssl_cacert_path
is a PEM-encoded certificate file.
As always feel free to share your feedback or issues and happy coding 🤗
Bump the minimal supported version of Elixir to 1.12+
To reduce noise about deprecation of Logger.warn/1
and refresh the CI setup together with local dependencies we have new this release.
Enjoy! 🎉
Custom configuration for the mix task
In this release, @emilianobovetti fixed an issue with custom configurations for the registration mix task. If you want to use your special config, let's say config/runtime.exs
, now you can specify it via --appconfig
option, like that
mix avrora.reg.schema --name io.confluent.Payment --appconfig runtime
schema `io.confluent.Payment' will be registered
it will be loaded in addition to the default one (if it's present)
Enjoy! Thanks to @emilianobovetti 💙
HTTP 🎧 headers with 🕵🏼♀️ agents
Starting this release each request to the Schema Registry will have an additional header User-Agent
. It's done in response to issue #101 when the AWS setup rejects the request.
The default value will contain the current version of the library, its name, and the language, for example: Avrora/0.25.0 Elixir
If you want the previous behaviour, i.e no User-Agent
header or your custom header value, then you can adjust it via the registry_user_agent
configuration option by setting it to nil
or your String respectively.
defmodule MyClient
use Avrora.Client, registry_user_agent: "Hello world" # you can set it to whatever you like
end
defmodule MyClientWithoutUserAgent
use Avrora.Client, registry_user_agent: nil # or you can disable User-Agent header
end
Thanks to @azeemchauhan for bringing it up 💟
No means NO 🙅🏼
It turns out that Avrora.Config.registry_schemas_autoreg/0
configuration option was not returning false
values if the library is configured and a private client is not used. And the only way to set it to false
was to create your client and configure it like
defmodule MyClient do
use Avrora.Client, registry_schemas_autoreg: false
end
Thanks to @ankhers it's fixed now! Enjoy folks! 🚢
To be explicit 🔒
In this release, we explicitly set the SSL option verify
to be verify_none
to reflect the changed default in OTP25. To avoid the false sense of security OTP25 has changed the default value for SSL verify
to be verify_peer
which requires you to source it certs.
We are going to add secure option in the next release, but for now let's keep it as it was 🤷🏼
Thanks to @goozzik for pointing this out!
Decoder hook 🪝 finnaly available
Initially, the decoder hook was done as a non-configurable no-op function due to clarity – how much it will be used and will be at all?. Seems the time has come, thanks to the @LostKobrakai 💜
The very first use-case is tagging unions, check this out:
defmodule MyClient do
use Avrora.Client,
decoder_hook: &__MODULE__.hook/4
def hook(type, sub_name_or_index, data, decode_fun) do
tag_unions_hook = :avro_decoder_hooks.tag_unions()
tag_unions_hook.(type, sub_name_or_index, data, decode_fun)
end
end
Now all the complex unions will be tagged and result will be passed to the "private" Avrora decoder hook. But there is no limit on what you can do with it, just don't forget to call at the end decode_fun.(data)
😉
Have fun 🐟 🪝