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

Add case git #4660

Merged
merged 24 commits into from
Aug 14, 2024
Merged

Add case git #4660

merged 24 commits into from
Aug 14, 2024

Conversation

jedwards4b
Copy link
Contributor

Had to be reopened as a branch of escomp to run docker tests. replaces #4655

This PR adds a case interface to git. It creates a local git repository when case.setup is run and updates that repository with each action that triggers an update of the CaseStatus file. Optionally a remote repository can be attached by setting CASE_GIT_REPOSITORY to the name of the remote repository. The case name is used as the repository branch name and if the branch already exists in the remote an error is generated. So multiple cases can exist in the same remote repository and each case is a branch of that repo. The new file gitinterface.py can interact with git in two ways:

If the python git module is found it will be used.
If the python git module is not found git commands will be run through shell commands.

Note that the variable CASE_GIT_REPOSITORY must be defined in your driver config_component.xml in order to use this feature, it should be defined as follows:

char case_git env_build.xml Remote git repository used for this case

I have tested this code on three systems: derecho (with python git module)
izumi (without python git module)
TACC vista (grace-hopper system no python git module)

Test suite: scripts_regression_tests on the three systems listed above
Test baseline:
Test namelist changes:
Test status: bit for bit

User interface changes?: Users who wish to use the CASE_GIT_REPOSITORY feature must have write permissions to the remote repository and it is recommended that the ssh interface to that repository be used to avoid frequent prompts for github tokens.

Update gh-pages html (Y/N)?:

@jedwards4b jedwards4b mentioned this pull request Aug 9, 2024
@jedwards4b
Copy link
Contributor Author

The e3sm fail in this PR is expected. Some of the routines from file CIME/utils.py had to be moved to a new file CIME/status.py to avoid circular dependancies. E3SM will have to update import for these routines.

@jedwards4b jedwards4b self-assigned this Aug 9, 2024
@jasonb5
Copy link
Collaborator

jasonb5 commented Aug 14, 2024

@jedwards4b Go ahead and merge, I'll push a change to the e3sm repo to fix the failing test.

@jedwards4b jedwards4b merged commit 22eed88 into master Aug 14, 2024
6 of 7 checks passed
@jedwards4b jedwards4b deleted the add_case_git branch August 14, 2024 15:35
rljacob added a commit to E3SM-Project/E3SM that referenced this pull request Oct 8, 2024
CIME.utils.append_testlog was moved in ESMCI/cime#4660
This updates the MVKO test to use that method (other CIME SystemTests were updated in that PR)
[bfb]
rljacob added a commit to E3SM-Project/E3SM that referenced this pull request Oct 9, 2024
CIME.utils.append_testlog was moved in ESMCI/cime#4660
This updates the MVKO test to use that method (other CIME SystemTests were updated in that PR)

[BFB]
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

Successfully merging this pull request may close these issues.

3 participants