check_uploders_s3_public_endpoint(),
check_quarantined_instances_tuples(),
check_transparency_exclusions_tuples(),
- check_simple_policy_tuples()
+ check_simple_policy_tuples(),
+ check_http_adapter()
]
|> Enum.reduce(:ok, fn
:ok, :ok -> :ok
end
end
+ def check_http_adapter do
+ http_adapter = Application.get_env(:tesla, :adapter)
+
+ case http_adapter do
+ {Tesla.Adapter.Finch, _} ->
+ :ok
+
+ Tesla.Mock ->
+ # tests do be testing
+ :ok
+
+ _anything_else ->
+ Logger.error("""
+ !!!CONFIG ERROR!!!
+ Your config is using a custom tesla adapter, this was standardised
+ to finch in 2022.06, and alternate adapters were removed in 2023.02.
+ Please ensure you either:
+ \n* do not have any custom value for `:tesla, :adapter`, or
+ \n* have `config :tesla, :adapter, {Tesla.Adapter.Finch, name: MyFinch}`
+ (your current value is #{inspect(http_adapter)})
+ """)
+
+ :error
+ end
+ end
+
def check_old_mrf_config do
warning_preface = """
!!!DEPRECATION WARNING!!!