Fork me on GitHub
#tools-deps
<
2022-01-07
>
socksy13:01:03

Hi there, I don't have JIRA access so I can't comment on the issue, but I can report that at Pitch we are still hitting https://clojure.atlassian.net/browse/TDEPS-153 regularly, with version 1.10.3.967 (the version that is supposed to fix it?). Specifically on CircleCI with the runner using this docker image: circleci/clojure:openjdk-8-tools-deps-1.10.3.967-node . We are just now implementing -Sthreads 1 as a workaround, but figure that the bug report might still be helpful

Alex Miller (Clojure team)13:01:12

There was at least one instance of this fixed after this version but I would expect this to be fixed on the current version (1.10.3.1058). If you have any repro with that version, please file a new issue at https://ask.clojure.org with the stack trace

socksy16:01:51

Thanks for the heads up, we'll check it out next week, and of course add an issue as instructed (if necessary) :)

rickmoynihan16:01:11

What is the best way to debug why deps aren’t being fetched from private s3 buckets?

rickmoynihan16:01:42

I have added my new under :mvn/repos in my deps.edn and have a corresponding ~/.m2/settings.xml

rickmoynihan16:01:20

I should add this works for some s3 buckets I already have… I’m just adding another (so I essentially just copy/edited the config of the previous ones)

rickmoynihan16:01:03

Also all of the 3 repositories are actually in the same s3 bucket; with the same creds… there are just different top level folders in them partitioning the deps as part of a promotion strategy…

rickmoynihan16:01:34

and the original 2 work — but the new 3rd one doesn’t seem to. I should add I deployed the deps via the feature I added last year to deps-deploy… so I may have just misconfigured that somehow; though I can confirm that the dep is in the bucket in what looks to be the right place; but it would be nice to debug it to see which end is at fault (the deployment or the consumption / auth etc.

Alex Miller (Clojure team)16:01:03

can you fetch the dep outside the Clojure CLI using aws?

Alex Miller (Clojure team)16:01:56

and what happens when you use the cli? error?

rickmoynihan16:01:17

clojure  -P
Downloading: com/swirrl/auth0/0.3.build-improvements_local-94a8b78/auth0-0.3.build-improvements_local-94a8b78.pom from swirrl-jars-releases
Downloading: com/swirrl/auth0/0.3.build-improvements_local-94a8b78/auth0-0.3.build-improvements_local-94a8b78.pom from swirrl-jars-branch-builds
Downloading: com/swirrl/auth0/0.3.build-improvements_local-94a8b78/auth0-0.3.build-improvements_local-94a8b78.pom from swirrl-jars-snapshots
Downloading: com/swirrl/auth0/0.3.build-improvements_local-94a8b78/auth0-0.3.build-improvements_local-94a8b78.jar from swirrl-jars-releases
Downloading: com/swirrl/auth0/0.3.build-improvements_local-94a8b78/auth0-0.3.build-improvements_local-94a8b78.jar from swirrl-jars-branch-builds
Downloading: com/swirrl/auth0/0.3.build-improvements_local-94a8b78/auth0-0.3.build-improvements_local-94a8b78.jar from swirrl-jars-snapshots
Error building classpath. Could not find artifact com.swirrl:auth0:jar:0.3.build-improvements_local-94a8b78 in central ()
NOTE the other thing I was going to double check is that the version of this dep is slightly unusual…. i.e. not semver.

rickmoynihan16:01:39

I’m assuming that is allowed… I’ve done stuff like that in the past

rickmoynihan16:01:34

oh actually I pasted a slightly different one there

rickmoynihan16:01:53

that was me testing it via a dirty local build (just installed into .m2)

Alex Miller (Clojure team)16:01:54

it's certainly not sorted in a way you'd expect for version comparison

rickmoynihan16:01:07

basically the setup is that branch builds are building immutable artifacts like this

Alex Miller (Clojure team)16:01:08

maven version is MAJOR.MINOR.INCREMENT-QUALIFIER - if any of the first 3 is not a number, the whole thing is alpha sorted

rickmoynihan16:01:35

ok so I might need an increment too?

Alex Miller (Clojure team)16:01:48

and minor and increment are optional

rickmoynihan17:01:01

the version has major minor

Alex Miller (Clojure team)17:01:11

so just changing the .build to -build would turn the last part into a qualifier

Alex Miller (Clojure team)17:01:34

but I'm not sure that would affect the issue

rickmoynihan17:01:44

me neither — but good to know

rickmoynihan17:01:51

and it’s something I will fix

Alex Miller (Clojure team)17:01:35

in short, I don't know. I would debug it by using tools.deps.alpha and hitting the maven procurer and/or s3 transporter directly

rickmoynihan17:01:44

yeah I could certainly do that

rickmoynihan17:01:15

is there any internal logging that you’re aware of in the java deps, that I could switch on to get an idea? Oh wait IIRC it now uses the cognitect aws stuff is that right?

Alex Miller (Clojure team)17:01:20

don't know, never do that

Alex Miller (Clojure team)17:01:58

maven stuff certainly has some logging stuff but I have never bothered to configure it

rickmoynihan17:01:54

that should certainly make it a little easier to debug at a repl

rickmoynihan17:01:02

Running this at a REPL:

(clojure.tools.deps.alpha/resolve-deps
   {:deps {'com.swirrl/auth0 {:mvn/version "0.3.0-build-improvements-4302ec2"}}
    :mvn/repos {"swirrl-jars-branch-builds" {:url ""}}} nil)
raises this exception:
1. Unhandled clojure.lang.ExceptionInfo
   Could not find artifact
   com.swirrl:auth0:jar:0.3.0-build-improvements-4302ec2 in
   swirrl-jars-branch-builds ()
   {:lib com.swirrl/auth0,
    :coord
    {:mvn/version "0.3.0-build-improvements-4302ec2",
     :deps/manifest :mvn,
     :parents #{[]}}}
                 maven.clj:  167  clojure.tools.deps.alpha.extensions.maven/get-artifact
                 maven.clj:  155  clojure.tools.deps.alpha.extensions.maven/get-artifact
                 maven.clj:  178  clojure.tools.deps.alpha.extensions.maven/eval7338/fn
              MultiFn.java:  244  clojure.lang.MultiFn/invoke
                 alpha.clj:  465  clojure.tools.deps.alpha/download-libs/fn/fn
            concurrent.clj:   35  clojure.tools.deps.alpha.util.concurrent/submit-task/task
                  AFn.java:   18  clojure.lang.AFn/call
           FutureTask.java:  266  java.util.concurrent.FutureTask/run
   ThreadPoolExecutor.java: 1149  java.util.concurrent.ThreadPoolExecutor/runWorker
   ThreadPoolExecutor.java:  624  java.util.concurrent.ThreadPoolExecutor$Worker/run
               Thread.java:  748  java.lang.Thread/run

rickmoynihan17:01:11

Looks like I’m running out of time today… I’ll need to pick this up again next week… Many thanks for your sage advice @alexmiller 🙇

Alex Miller (Clojure team)17:01:04

you want to close the gap from there to what it's looking for in aws

rickmoynihan17:01:37

yes definitely

rickmoynihan17:01:10

I can see it’s calling s3-get-object and it’s raising an exception from in there… looks like I mistyped the artifact id

rickmoynihan17:01:29

yep that’s it… the real artifact was called com.swirrl/swirrl-auth0 facepalm

rickmoynihan17:01:58

thanks for the help… it’s so much easier to debug the s3 stuff now it’s in clojure! 🙇