-
Notifications
You must be signed in to change notification settings - Fork 33
feat: allow git commit hash usage in config source revision #726
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
base: main
Are you sure you want to change the base?
feat: allow git commit hash usage in config source revision #726
Conversation
| TEST_REPO = "git+https://github.com/DIRACGrid/diracx-charts.git" | ||
| TEST_REPO_SPECIFIC_BRANCH = TEST_REPO + "?branch=master" | ||
| COMMIT_HASH = "03c5a890d1af4a0a0fb934acea8f538ba08ec68c" | ||
| TEST_REPO_SPECIFIC_COMMIT_HASH = TEST_REPO + f"?commit_hash={COMMIT_HASH}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would branch={COMMIT_HASH} work? I wonder if we should rename branch to revision
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed there is no need to parse an additional query param containing the commit hash. I just rename branch by revision then.
Documentation build overview
Show files changed (4 files in total): 📝 4 modified | ➕ 0 added | ➖ 0 deleted
|
|
|
||
| @pytest.mark.skipif(github_is_down(), reason="Github unavailble") | ||
| @pytest.mark.parametrize("repo_url", [TEST_REPO, TEST_REPO_SPECIFIC_BRANCH]) | ||
| @pytest.mark.parametrize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor comment, I think it would be clearer to have 2 different tests (1 per use case): that would avoid the conditions within the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment. Does it look better now?
|
Should I document this somewhere? |
Good point yes! I think you can probably add a section in https://github.com/DIRACGrid/diracx/blob/b71738f4823d5511dfcef63ce014564e3f946c0e/docs/admin/explanations/configuration.md |
Allow to specify a git commit hash in the config backend url using query paramters (
?commit_hash=a8f538) used for the latest config revision.Closes #680