Skip to content

Conversation

@natthan-pigoux
Copy link
Contributor

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

@natthan-pigoux natthan-pigoux marked this pull request as draft January 15, 2026 14:03
@natthan-pigoux natthan-pigoux marked this pull request as ready for review January 16, 2026 08:33
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}"
Copy link
Member

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

Copy link
Contributor Author

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.

@read-the-docs-community
Copy link

read-the-docs-community bot commented Jan 22, 2026

Documentation build overview

📚 diracx | 🛠️ Build #31108502 | 📁 Comparing e3f3782 against latest (ccb1f48)


🔍 Preview build

Show files changed (4 files in total): 📝 4 modified | ➕ 0 added | ➖ 0 deleted
File Status
admin/reference/env-variables/index.html 📝 modified
dev/reference/env-variables/index.html 📝 modified
dev/reference/pixi-tasks/index.html 📝 modified
dev/explanations/components/routes/index.html 📝 modified


@pytest.mark.skipif(github_is_down(), reason="Github unavailble")
@pytest.mark.parametrize("repo_url", [TEST_REPO, TEST_REPO_SPECIFIC_BRANCH])
@pytest.mark.parametrize(
Copy link
Contributor

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.

Copy link
Contributor Author

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?

@natthan-pigoux
Copy link
Contributor Author

Should I document this somewhere?

@aldbr
Copy link
Contributor

aldbr commented Jan 23, 2026

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

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.

Add a setting for running a specific version of the config

3 participants