-
-
Notifications
You must be signed in to change notification settings - Fork 35
workaround for failing to download deps during win int testing #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workaround for failing to download deps during win int testing #187
Conversation
|
Awesome! this error was pissing me off for some time in clojure-lsp as well FYI @borkdude about babashka not downloading the deps, I saw that multiple times already. |
|
@ikappaki @ericdallo Please create a repro in babashka or deps.clj. Not sure why/where it uses temp files. Perhaps during the installation of the tools jar? |
|
No, it's not that. The stack trace shows tools.deps usage. If you can repro this using deps.clj please let me know. |
|
Just a quick update. It is @Override
073 public Properties update(File file, Map<String, String> updates) {
074 Properties props = new Properties();
075
076 try {
077 Files.createDirectories(file.getParentFile().toPath());
078 } catch (IOException e) {
079 LOGGER.warn("Failed to create tracking file parent '{}'", file, e);
080 throw new UncheckedIOException(e);
081 }
082
083 synchronized (getMutex(file)) {
084 try (RandomAccessFile raf = new RandomAccessFile(file, "rw");
085 FileLock unused = fileLock(raf.getChannel(), Math.max(1, raf.length()), false)) {
086 if (raf.length() > 0) {
087 byte[] buffer = new byte[(int) raf.length()];
088 raf.readFully(buffer);
089 props.load(new ByteArrayInputStream(buffer));
090 }
091
092 for (Map.Entry<String, String> update : updates.entrySet()) {
093 if (update.getValue() == null) {
094 props.remove(update.getKey());
095 } else {
096 props.setProperty(update.getKey(), update.getValue());
097 }
098 }
099
100 LOGGER.debug("Writing tracking file '{}'", file);
101 ByteArrayOutputStream stream = new ByteArrayOutputStream(1024 * 2);
102 props.store(
103 stream,
104 "NOTE: This is a Maven Resolver internal implementation file"
105 + ", its format can be changed without prior notice.");
106 raf.seek(0L);
107 raf.write(stream.toByteArray());
108 raf.setLength(raf.getFilePointer());
109 } catch (IOException e) {
110 LOGGER.warn("Failed to write tracking file '{}'", file, e);
111 throw new UncheckedIOException(e);
112 }
113 }
114
115 return props;
116 }(1): java "-XX:-OmitStackTraceInFastThrow" "-Dclojure.basis=.cpcache\\B5DF661B23A3C0074648F59E0423B4DC.basis" "-classpath" "resources;.;C:\\Users\\ikappaki\\.m2\\repository\\babashka\\fs\\0.5.22\\fs-0.5.22.jar;C:\\Users\\ikappaki\\.m2\\repository\\babashka\\process\\0.6.23\\process-0.6.23.jar;C:\\Users\\ikappaki\\.m2\\repository\\ch\\qos\\logback\\logback-classic\\1.4.14\\logback-classic-1.4.14.jar;C:\\Users\\ikappaki\\.m2\\repository\\com\\github\\ericdallo\\deps-bin\\1.0.0\\deps-bin-1.0.0.jar;C:\\Users\\ikappaki\\.gitlibs\\libs\\io.github.clojure\\tools.build\\573711ea65f7d324a6a6cdd3ac20cb30bba47e48\\src\\main\\clojure;C:\\Users\\ikappaki\\.gitlibs\\libs\\io.github.clojure\\tools.build\\573711ea65f7d324a6a6cdd3ac20cb30bba47e48\\src\\main\\resources;C:\\Users\\ikappaki\\.m2\\repository\\org\\clojure\\clojure\\1.12.0\\clojure-1.12.0.jar;...;C:\\Users\\ikappaki\\.m2\\repository\\org\\codehaus\\plexus\\plexus-container-default\\1.0-alpha-9-stable-1\\plexus-container-default-1.0-alpha-9-stable-1.jar;C:\\Users\\ikappaki\\.m2\\repository\\org\\clojure\\core.cache\\1.1.234\\core.cache-1.1.234.jar;C:\\Users\\ikappaki\\.m2\\repository\\classworlds\\classworlds\\1.1-alpha-2\\classworlds-1.1-alpha-2.jar;C:\\Users\\ikappaki\\.m2\\repository\\junit\\junit\\3.8.1\\junit-3.8.1.jar;C:\\Users\\ikappaki\\.m2\\repository\\org\\clojure\\data.priority-map\\1.2.0\\data.priority-map-1.2.0.jar;C:\\Users\\ikappaki\\scoop\\apps\\clj-deps\\current\\exec.jar" "clojure.main" "-m" "clojure.run.exec" "prod-cli"(2): Lines 25 to 39 in 6969f56
|
|
Likely a |
HI,
could you please consider a workaround for the
prod-clibuild step failing on Windows during CI integration test setup?The issue seems to stem from
babashka.deps/clojure, which builds the uberjar. On Windows, it occasionally fails to download dependencies due to anAccessDeniedExceptionwhen renaming a temporary file during the downloads. The exact cause is unclear, but pre downloading some of the dependencies using the clojure CLI directly appears to avoidthe problem.stack trace of the error: