https://clojurians.slack.com/archives/C015AL9QYH1/p1738270954993799
Oh crap! With 0.8.730-beta01:
ERROR in (process!-test) (http.clj:75)
Uncaught exception, not in assertion.
expected: nil
actual: java.lang.RuntimeException: Could not find cognitect_aws_http.edn on classpath.
at cognitect.aws.http$configured_client.invokeStatic (http.clj:75)
cognitect.aws.http$configured_client.invoke (http.clj:66)
cognitect.aws.http$resolve_http_client.invokeStatic (http.clj:87)
cognitect.aws.http$resolve_http_client.invoke (http.clj:81)
cognitect.aws.client.shared$fn__11986.invokeStatic (shared.clj:14)
cognitect.aws.client.shared/fn (shared.clj:14)
clojure.lang.Delay.realize (Delay.java:44)
clojure.lang.Delay.deref (Delay.java:59)
clojure.core$deref.invokeStatic (core.clj:2337)
clojure.core$deref.invoke (core.clj:2323)
cognitect.aws.client.shared$http_client.invokeStatic (shared.clj:22)
With 0.8.723 , same error
ERROR in (process!-test) (http.clj:75)
Uncaught exception, not in assertion.
expected: nil
actual: java.lang.RuntimeException: Could not find cognitect_aws_http.edn on classpath.
at cognitect.aws.http$configured_client.invokeStatic (http.clj:75)
cognitect.aws.http$configured_client.invoke (http.clj:66)
cognitect.aws.http$resolve_http_client.invokeStatic (http.clj:87)
cognitect.aws.http$resolve_http_client.invoke (http.clj:81)
cognitect.aws.client.shared$fn__11986.invokeStatic (shared.clj:14)
cognitect.aws.client.shared/fn (shared.clj:14)
clojure.lang.Delay.realize (Delay.java:44)
clojure.lang.Delay.deref (Delay.java:59)
clojure.core$deref.invokeStatic (core.clj:2337)
clojure.core$deref.invoke (core.clj:2323)
cognitect.aws.client.shared$http_client.invokeStatic (shared.clj:22)
cognitect.aws.client.shared$http_client.invoke (shared.clj:22
With 0.8.692 , it works again 😐
In conjunction with:
[com.cognitect.aws/endpoints "871.2.30.22"]
[com.cognitect.aws/s3 "871.2.30.22"]
[com.cognitect.aws/sns "871.2.30.11"]
[com.cognitect.aws/ssm "871.2.29.35"]
openjdk 17.0.14 2025-01-21
OpenJDK Runtime Environment (build 17.0.14+7-Ubuntu-124.04)
OpenJDK 64-Bit Server VM (build 17.0.14+7-Ubuntu-124.04, mixed mode, sharing)Occurred during a lein test
But services are working
FYI: @scottbale
This looks like a different issue than https://github.com/cognitect-labs/aws-api/issues/265. That exception you're seeing
actual: java.lang.RuntimeException: Could not find cognitect_aws_http.edn on classpath.
at cognitect.aws.http$configured_client.invokeStatic (http.clj:75)
is being thrown while trying to initialize the default shared http client. That's how it worked https://github.com/cognitect-labs/aws-api/blob/v0.8.692/src/cognitect/aws/http.clj#L76. But in version https://github.com/cognitect-labs/aws-api/blob/v0.8.711/src/cognitect/aws/http.clj#L76-L80 - it no longer throws an exception if a cognitect_aws_http.edn file is not found, instead it just uses a default.
So you must be inadvertantly using version 0.8.692 or older, when you are seeing that exception being thrown.Ah, finally! Adding [com.cognitect/http-client "1.0.127"] did the trick.
Not gonna lie, though, this feels a bit like a landmine. If breaking changes like this are introduced, it would help if they came with clear migration notes. A minor version bump requiring explicit HTTP client configuration (without a fallback) is unexpected, especially since older versions worked without it.
That said, I see the rationale behind modularizing the HTTP layer, and it does provide flexibility. Still, a smoother transition (like a deprecation warning before enforcing the change) would have saved some troubleshooting time.
Anyway, for anyone else running into this: if you're on 0.8.711+ and getting Could not find cognitect_aws_http.edn, make sure to add an explicit HTTP client dependency. Otherwise, enjoy your debugging adventure. 😅
And thank you @scottbale for patience like a lighthouse in the middle of a storm, guiding lost ships safely through the fog of breaking changes. Truly appreciated!
@caio.cascaes you're welcome, but I'm afraid your previous post contains mistakes. Let's walk through them:
> Anyway, for anyone else running into this: if you're on *0.8.711+* and getting Could not find cognitect_aws_http.edn
If you're getting Could not find cognitect_aws_http.edn exception you are not on *0.8.711+*.
Version 0.8.711 and newer no longer throws that exception (https://github.com/cognitect-labs/aws-api/blob/v0.8.711/src/cognitect/aws/http.clj#L76-L80). That exception is coming from aws-api version 0.8.692 or previous (https://github.com/cognitect-labs/aws-api/blob/v0.8.692/src/cognitect/aws/http.clj#L76).
Something must be wrong with your application's classpath or build. Is it possible you have an older aws-api artifact, or classes from an older aws-api artifact, in your classpath?
> If breaking changes like this are introduced, it would help if they came with clear migration notes.
There are 0.8.711 upgrade notes https://github.com/cognitect-labs/aws-api/blob/main/UPGRADE.md#08711--2024-12-03, linked to from 0.8.711 changelog https://github.com/cognitect-labs/aws-api/blob/main/CHANGES.md#08711--2024-12-03.
> A minor version bump requiring explicit HTTP client configuration (without a fallback) is unexpected, especially since older versions worked without it.
As the release and upgrade notes explain, 0.8.711 requires explicit http client configuration only if you are running on Java 8 or if you want to use the old com.cognitect/http-client, otherwise no special configuration is required.