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

Hangs during payu clone #536

Open
aidanheerdegen opened this issue Nov 10, 2024 · 3 comments
Open

Hangs during payu clone #536

aidanheerdegen opened this issue Nov 10, 2024 · 3 comments

Comments

@aidanheerdegen
Copy link
Collaborator

@JhanSrbinovsky reported an issue with the process hanging during a payu clone command

payu clone -b sync-and-restart-pruning-expt -B release-preindustrial+concentrations https://github.com/ACCESS-NRI/access-esm1.5-configs preindustrial+concentrations-training-2
Cloned repository from https://github.com/ACCESS-NRI/access-esm1.5-configs to directory: /g/data/YYY/XXXXX/ESM16/PAYU/preindustrial+concentrations-training-2
Created and checked out new branch: sync-and-restart-pruning-expt
laboratory path: /scratch/YYY/XXXXXX/access-esm
binary path: /scratch/YYY/XXXXXX/access-esm/bin
input path: /scratch/YYY/XXXXXX/access-esm/input
work path: /scratch/YYY/XXXXXX/access-esm/work
archive path: /scratch/YYY/XXXXXX/access-esm/archive

The hang was occurring at the point where the updated metadata, with new UUID, was being committed

https://github.com/payu-org/payu/blob/master/payu/metadata.py#L264

Confusingly making the same change and doing a direct git commit from an interactive shell worked.

The proximate cause seemed to be a git configuration customisation that invoked a custom program for git diff, such that this command

https://github.com/payu-org/payu/blob/master/payu/git_utils.py#L105

stalled.

Apologies for the lack of detail, perhaps @JhanSrbinovsky can add more, but I wonder if we can bypass any user customisations?

@aidanheerdegen
Copy link
Collaborator Author

@JhanSrbinovsky provided more detail:

as expected the issue is with the diff wrapper in my .gitconfig

diff .gitconfig .gitconfig.noDiffTool.payu
— .gitconfig 2024-11-11 12:38:49.536897000 +1100
+++ .gitconfig.noDiffTool.payu 2024-08-28 16:14:53.078837000 +1000
@@ -5,9 +5,5 @@
tool = vimdiff
[credential]
helper = cache --timeout 3600
-[difftool]
prompt = false
-[diff]
external = git_diff_wrapper

Still - ignoring local gitconfig would be advantageous. To me especially as I'll have to turn it off and on if I want to use it

@aidanheerdegen
Copy link
Collaborator Author

There are ways to ignore ~/.gitconfig completely

https://superuser.com/a/58287

https://git-scm.com/docs/git#Documentation/git.txt-codeGITCONFIGGLOBALcode

but there is important information contained therein that is used in populating some of the metadata.yaml fields.

Or you can specify the diff tool to use and override user settings

https://superuser.com/a/53077

There doesn't seem to be a setting to override the diff tool in from GitPython

https://gitpython.readthedocs.io/en/stable/reference.html?highlight=config#module-git.diff

@aidanheerdegen
Copy link
Collaborator Author

A work-around for Jhan (and anyone in a similar situation) might be to set the path to the global configuration (default is ~/.gitconfig) to null:

GIT_CONFIG_GLOBAL= payu setup ...

or a path to a safe version of the config without the customisation

GIT_CONFIG_GLOBAL=~/.gitconfig_nocustom payu setup ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant