Stuck on Redis Clojure Replication #BW1

I’m stuck on Replication > Stage 1.

Not exactly sure what’s going on.

there are quite a few retries that get triggered (probably because downloading the dependencies take a bit of time, since spawn_redis_server.sh uses lein run "$@")

But eventually it manages to connect.

Afterwords the tests try to run “Stage 7” that it looks like it can’t connect.

The reason for the deps is i’m using aleph (clojure non blocking tcp lib)

Here are my relevant bit of my logs logs:

[your_program] Retrieving clj-tuple/clj-tuple/0.2.2/clj-tuple-0.2.2.jar from clojars
[your_program] Retrieving fipp/fipp/0.6.26/fipp-0.6.26.jar from clojars
[your_program] Retrieving org/clj-commons/dirigiste/1.0.3/dirigiste-1.0.3.jar from clojars
[your_program] Retrieving mvxcvi/arrangement/2.1.0/arrangement-2.1.0.jar from clojars
[your_program] Retrieving borkdude/dynaload/0.3.5/dynaload-0.3.5.jar from clojars
[your_program] Retrieving borkdude/edamame/1.3.20/edamame-1.3.20.jar from clojars
[replication-1] Failed to connect to port 6381, retrying in 1s
[replication-1] Failed to connect to port 6381, retrying in 1s
[replication-1] Failed to connect to port 6381, retrying in 1s
[replication-1] Failed to connect to port 6381, retrying in 1s
[replication-1] Failed to connect to port 6381, retrying in 1s
[your_program] starting server on port 6381
[replication-1] Test passed.

[stage-7] Running tests for Stage #7: Expiry
[stage-7] $ ./spawn_redis_server.sh
[stage-7] dial tcp [::1]:6379: connect: connection refused
[stage-7] Test failed (try setting 'debug: true' in your codecrafters.yml to see more details)

View our article on debugging test failures: https://codecrafters.io/debug

Hey @boogie-bugarschi,

Thanks for reporting this. Definitely looks like something wrong with the way we handle building/caching clojure code. We’ll look into this!

We should have a fix for this out by the end of next week!

We’re a bit late on this, but aiming to have a fix out this week! We ran into some unexpected issues trying to figure out the caching bug here.

Okay we’ve fixed this for newer clojure versions: CC-1213: add caching to clojure builds by ryan-gang · Pull Request #198 · codecrafters-io/build-your-own-redis · GitHub. This week we’ll see if we can backport the fix to older clojure versions. In the meantime, if you create a new repository and copy your code in everything should work!

Note: I’ve updated the title of this post to include the stage ID (#BW1). You can learn about the stages rename here: Upcoming change: Stages overhaul.

This has now been backported to older clojure versions too! Marking as closed, please do leave a comment here if you’re still running into this.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.