From 393e704a4a2f58ab8a41f9a2c3c41a8791cc887c Mon Sep 17 00:00:00 2001 From: Christophe Haen Date: Thu, 4 Jun 2026 11:35:19 +0200 Subject: [PATCH 1/3] docs: document how to test diracx-charts changes --- .github/workflows/main.yml | 6 ++++- .../how-to/test-changes-in-diracx-charts.md | 26 +++++++++++++++++++ mkdocs.yml | 1 + 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 docs/dev/how-to/test-changes-in-diracx-charts.md diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ed7ffa11a..d34808c42 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + DIRACX_CHARTS_REPOSITORY: https://github.com/DIRACGrid/diracx-charts.git + DIRACX_CHARTS_BRANCH: main + jobs: shellcheck: runs-on: ubuntu-latest @@ -168,7 +172,7 @@ jobs: docker image ls -a - name: Start demo run: | - git clone https://github.com/DIRACGrid/diracx-charts.git ../diracx-charts + git clone --branch "$DIRACX_CHARTS_BRANCH" --single-branch "$DIRACX_CHARTS_REPOSITORY" ../diracx-charts declare -a demo_args=() demo_args+=("--enable-open-telemetry") diff --git a/docs/dev/how-to/test-changes-in-diracx-charts.md b/docs/dev/how-to/test-changes-in-diracx-charts.md new file mode 100644 index 000000000..eedf71aca --- /dev/null +++ b/docs/dev/how-to/test-changes-in-diracx-charts.md @@ -0,0 +1,26 @@ +# Testing against changes in diracx-charts + +Changes in `diracx` may require corresponding changes in `diracx-charts` (typically adding a new database for example). + +## Testing locally + +[run_demo.sh](../explanations/run_demo.md) allows to specify your local version of `diracx`, or `diracx-web`. + +```bash +$ cd diracx-charts/ +$ ./run_demo.sh ../diracx +``` + +See the [tutorial](../tutorials/run-locally.md) for detailed example. + +## Running the CI + +Since the changes are interdependent, it is expected the `diracx` CI to fail. The good practice here is to add a separate commit to your `diracx` PR to point the CI to your own `diracx-charts` branch instead of the master. + +This is done in `.github/workflows/main.yml`: + +```yaml +env: + DIRACX_CHARTS_REPOSITORY: https://github.com/DIRACGrid/diracx-charts.git + DIRACX_CHARTS_BRANCH: main +``` diff --git a/mkdocs.yml b/mkdocs.yml index d20d02ffe..8bb9b40ce 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -174,6 +174,7 @@ nav: - New DB: dev/how-to/add-a-db.md - New settings: dev/how-to/add-a-setting.md - Add a test: dev/how-to/add-a-test.md + - Test against changes in diracx-charts: dev/how-to/test-changes-in-diracx-charts.md - Extend DiracX: - dev/how-to/extend-diracx/index.md - Develop legacy DIRAC: dev/how-to/develop-legacy-dirac.md From afb51c1089c44040da6ea63108e59596c8b4639c Mon Sep 17 00:00:00 2001 From: Christophe Haen Date: Fri, 5 Jun 2026 11:12:40 +0200 Subject: [PATCH 2/3] docs: fix documentation of DIRACX_SERVICE_AUTH_DIRAC_CLIENT_ID --- diracx-core/src/diracx/core/settings.py | 4 ++-- docs/admin/reference/env-variables.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/diracx-core/src/diracx/core/settings.py b/diracx-core/src/diracx/core/settings.py index dd55a88a8..0b5c7661a 100644 --- a/diracx-core/src/diracx/core/settings.py +++ b/diracx-core/src/diracx/core/settings.py @@ -175,9 +175,9 @@ def check_retention_greater_than_expiration(self) -> Self: ) dirac_client_id: str = "myDIRACClientID" - """OAuth2 client identifier for DIRAC services. + """OAuth2 client identifier for DIRAC clients (cli, web) to DIRAC services. - This should match the client ID registered with the identity provider. + There is no real reason to change that. """ allowed_redirects: list[str] = [] diff --git a/docs/admin/reference/env-variables.md b/docs/admin/reference/env-variables.md index ea9a04a49..b9e0ec13c 100644 --- a/docs/admin/reference/env-variables.md +++ b/docs/admin/reference/env-variables.md @@ -25,9 +25,9 @@ Settings for the authentication service. *Optional*, default value: `myDIRACClientID` -OAuth2 client identifier for DIRAC services. +OAuth2 client identifier for DIRAC clients (cli, web) to DIRAC services. -This should match the client ID registered with the identity provider. +There is no real reason to change that. ### `DIRACX_SERVICE_AUTH_ALLOWED_REDIRECTS` From c8bb04654ad89704f165356dacce77a17e7583ea Mon Sep 17 00:00:00 2001 From: Christophe Haen Date: Fri, 5 Jun 2026 17:27:16 +0200 Subject: [PATCH 3/3] fixup! docs: document how to test diracx-charts changes --- .github/workflows/main.yml | 2 +- docs/dev/how-to/test-changes-in-diracx-charts.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d34808c42..0f027575a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ concurrency: env: DIRACX_CHARTS_REPOSITORY: https://github.com/DIRACGrid/diracx-charts.git - DIRACX_CHARTS_BRANCH: main + DIRACX_CHARTS_BRANCH: master jobs: shellcheck: diff --git a/docs/dev/how-to/test-changes-in-diracx-charts.md b/docs/dev/how-to/test-changes-in-diracx-charts.md index eedf71aca..f792553bb 100644 --- a/docs/dev/how-to/test-changes-in-diracx-charts.md +++ b/docs/dev/how-to/test-changes-in-diracx-charts.md @@ -22,5 +22,5 @@ This is done in `.github/workflows/main.yml`: ```yaml env: DIRACX_CHARTS_REPOSITORY: https://github.com/DIRACGrid/diracx-charts.git - DIRACX_CHARTS_BRANCH: main + DIRACX_CHARTS_BRANCH: master ```