-
Notifications
You must be signed in to change notification settings - Fork 572
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
Check for changed GenConfig remote URL and error out #13724
Check for changed GenConfig remote URL and error out #13724
Conversation
Since we moved GenConfig and some of its associated repositories, get_dependencies.sh should detect and tell the user that they will need to allow it to re-clone them if their remotes are out-of-date. Otherwise pulls can/will fail. Signed-off-by: Samuel E. Browne <[email protected]>
This allows for developers to use a git@ protocol for these repos instead of the HTTPs protocol so they can do development on these GenConfig repos not still be able to run the get_dependencies.sh script. This just makes development and testing easier. Otherwise, you have to switch back and forth between different sets of repos, which is error-prone and clunky. I also reformatted the error message some to make more clear (IMHO). I tested this manually in the following scenarios: 1) Starting with old GenConfig repo with wrong URL. That gave the error message: ERROR: Current remote origin does not match expected! Current Remote: [email protected]:trilinos-devops-consolidation/code/GenConfig.git Expected Remote: https://github.com/sandialabs/GenConfig.git Please remove/move '/scratch/rabartl/Trilinos.base/Trilinos/packages/framework/GenConfig' and re-run this script 2) Starting with no GenConfig repo. That gave seemed to clone the repos correctly. 3) With existing GenConfig repo pointing to the correct URL. This seemed to update the repos correctly. 4) With existing GenConfig repo pointing to the correct URL but now with git@ URL instead of https:// URL and wrong SHA1 for GenConfig repo. This seemed to update the repos correctly. NOTE: The new utility script `normalize_git_repo_url.py` is maintained with unit tests in the little internal repo: * https://gitlab-ex.sandia.gov/rabartl/normalize_git_repo_url That makes this reusable for other such purposes in other projects as well. Signed-off-by: Roscoe A. Bartlett <[email protected]>
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection is Not Necessary for this Pull Request. |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: PR_gcc-openmpi-openmp
Jenkins Parameters
Build InformationTest Name: PR_gcc
Jenkins Parameters
Build InformationTest Name: PR_gcc-openmpi_debug
Jenkins Parameters
Build InformationTest Name: PR_clang
Jenkins Parameters
Build InformationTest Name: PR_cuda
Jenkins Parameters
Build InformationTest Name: PR_intel
Jenkins Parameters
Build InformationTest Name: PR_cuda-uvm
Jenkins Parameters
Using Repos:
Pull Request Author: bartlettroscoe |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: PR_gcc-openmpi-openmp
Jenkins Parameters
Build InformationTest Name: PR_gcc
Jenkins Parameters
Build InformationTest Name: PR_gcc-openmpi_debug
Jenkins Parameters
Build InformationTest Name: PR_clang
Jenkins Parameters
Build InformationTest Name: PR_cuda
Jenkins Parameters
Build InformationTest Name: PR_intel
Jenkins Parameters
Build InformationTest Name: PR_cuda-uvm
Jenkins Parameters
|
Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ sebrowne ]! |
Status Flag 'Pull Request AutoTester' - AutoMerge IS ENABLED, but the Label AT: AUTOMERGE is not set. Either set Label AT: AUTOMERGE or manually merge the PR... |
Internal Issues
Description
This addresses the problem where someone has an existing GenConfig repo clone before the GenConfig repos got moved to GitHub and tries to run the get_dependencies.py tool and gets a strange error message. This PR updates the get_dependencies.py to check that the remote URL of the base GenConfig repo is correct and errors out with a good error message if it does not.
This also normalizes the comparison of the remote URLs too allow for developers to use the git@ protocol to do development on the GenConfig repos and still be able to run the get_dependencies.py as part of there development and testing workflow.
NOTE: The new utility script
normalize_git_repo_url.py
is maintained with unit tests in the little internal repo:That makes this reusable for other such purposes in other projects as well.