Skip to content

Mirror repo name#215

Open
ericaneininger wants to merge 5 commits intoMetOffice:mainfrom
ericaneininger:mirror_repo_name
Open

Mirror repo name#215
ericaneininger wants to merge 5 commits intoMetOffice:mainfrom
ericaneininger:mirror_repo_name

Conversation

@ericaneininger
Copy link
Contributor

@ericaneininger ericaneininger commented Mar 17, 2026

PR Summary

Sci/Tech Reviewer:
Code Reviewer: @james-bruten-mo

Extract the repository name from the merge source string, rather than passing down the name of the destination directory. This allows source to be extracted from a mirror even when the destination directory name does not match the name of the repository.

Null change except when using localmirrors:.

closes #212

Code Quality Checklist

  • have performed a self-review of my own code
  • My code follows the project's style guidelines
  • Comments have been included that aid understanding and enhance the readability of the code
  • My changes generate no new warnings
  • All automated checks in the CI pipeline have completed successfully

Testing

  • This change has been tested appropriately (please describe)
    Tested with rose-stem:
  • UM rose-stem was modified to extract SimSys_scripts from a working copy, and MOCI from a branch.
    • Run with group=scripts
    • Extract from log extract_source/job.err of UM rose-stem:
INFO:get_git_sources:[2026-03-17 11:44:28] Cloning moci from git@github.com:ericaneininger/moci.git at ref fcm_make_redundancy
...
INFO:get_git_sources:[2026-03-17 11:44:58] Syncing SimSys_Scripts at ref 
  • MOCI rose-stem was modified to extract from mirrors with SimSys_scripts.git repo from a working copy of this branch into a directory called "Git_Scripts" and jules-internal.git repo into a directory called "jules"
    • Run with group=tests
    • Extract from log extract_source/job.err of MOCI rose-stem:
INFO:get_git_sources:[2026-03-17 11:48:51] Syncing Git_Scripts at ref
INFO:get_git_sources:[2026-03-17 11:48:57] Cloning jules from localmirrors: at ref vn7.1

Further testing with a branch of a UKESM suite:
https://code.metoffice.gov.uk/trac/roses-u/browser/d/x/0/3/3/double_moci_extract
This suite uses a single stage extract direct onto HPC and therefore exclusively uses localmirrors. The branch has been set up to extract and run with 2 moci.git extracts into

  • moci_postproc - with an additional branch source merged from Git mirrors
  • moci_drivers - with an additional merged source from a local working copy
    Extract from log extract/job.err:
...
INFO:get_git_sources:[2026-03-17 10:13:23] Cloning moci_postproc from localmirrors: at ref 2025.12.1
INFO:get_git_sources:[2026-03-17 10:13:24] Merging git@github.com:ericaneininger/moci.git at ref fcm_make_redundancy into moci_postproc
INFO:get_git_sources:[2026-03-17 10:13:25] Cloning moci_drivers from localmirrors: at ref 2025.12.1
INFO:get_git_sources:[2026-03-17 10:13:25] Merging cazld000038:/data/users/erica.neininger/Git_Repos/MyForks/MOCI_efnp at ref main into moci_drivers
...

Security Considerations

  • I have reviewed my changes for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

AI Assistance and Attribution

  • Some of the content of this change has been produced with the assistance of Generative AI tool name (e.g., Met Office Github Copilot Enterprise, Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the Simulation Systems AI policy (including attribution labels)

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

(Please alert the code reviewer via a tag when you have approved the SR)

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Security considerations have been addressed
  • Performance impact is acceptable

Copy link
Collaborator

@james-bruten-mo james-bruten-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks a sensible. I've checked it works in rose stem and suites, and with the jules-internal repo

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.

get_git_sources assumes the name of the repo based on directory name using mirrors

3 participants