Skip to content
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

[BE] Problem during repos checkout #53

Open
nnzJd opened this issue Nov 24, 2022 · 2 comments
Open

[BE] Problem during repos checkout #53

nnzJd opened this issue Nov 24, 2022 · 2 comments
Labels
bug Something isn't working da analizzare

Comments

@nnzJd
Copy link
Contributor

nnzJd commented Nov 24, 2022

Comportamento atteso

Viene clonato il repo

Comportamento attuale

In alcuni casi, viene lanciata la seguente eccezione :

2022-11-24 16:23:32.326 ERROR 1 --- [tributeWriter-2] org.eclipse.jgit.util.FS                 : Cannot save config file 'FileBasedConfig[/.config/jgit/config]'

java.io.IOException: Creating directories for /.config/jgit failed
	at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:412) ~[org.eclipse.jgit-5.13.0.202109080827-r.jar:5.13.0.202109080827-r]
	at org.eclipse.jgit.internal.storage.file.LockFile.lock(LockFile.java:138) ~[org.eclipse.jgit-5.13.0.202109080827-r.jar:5.13.0.202109080827-r]
	at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:219) ~[org.eclipse.jgit-5.13.0.202109080827-r.jar:5.13.0.202109080827-r]
	at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(FS.java:740) ~[org.eclipse.jgit-5.13.0.202109080827-r.jar:5.13.0.202109080827-r]
	at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$4(FS.java:426) ~[org.eclipse.jgit-5.13.0.202109080827-r.jar:5.13.0.202109080827-r]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]

Contesto

Riscontrato in ambiente Dev

@ioggstream
Copy link
Contributor

ioggstream commented Nov 24, 2022

in dev/ we fixed it setting XDG_CONFIG_HOME to a writable directory of the container. This should be better addressed via a suitable default value in the application.

See https://stackoverflow.com/questions/65731005/jgit-throws-java-io-ioexception-creating-directories-for-config-jgit-failed

@ioggstream ioggstream added the bug Something isn't working label Nov 24, 2022
@Clou-dia Clou-dia changed the title Problem during repos checkout [BE] Problem during repos checkout Nov 2, 2023
@ioggstream
Copy link
Contributor

ioggstream commented Apr 10, 2024

This issue should be re-titled as:

"The harvester cannot clone a repository because of a read-only workdir" or something like that.

The fixing line is here https://github.com/teamdigitale/dati-semantic-kubernetes/blob/dev/dati-semantic-backend/deploymentConfig.yaml#L71

If everything works, I think we can close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working da analizzare
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants