From 0192b7e2adc4fe7bb454809c5ad88c98148eb6f6 Mon Sep 17 00:00:00 2001 From: yoshifuminakamura Date: Wed, 5 Aug 2026 16:40:46 +0900 Subject: [PATCH] Clarify portal GitLab trigger scope Signed-off-by: yoshifuminakamura --- .../portal-execution-profiles-handoff.md | 5 +++++ result_server/routes/admin.py | 13 +++++++++++ .../templates/admin_execution_profiles.html | 22 ++++++++++++------- .../tests/test_execution_profiles.py | 7 ++++++ 4 files changed, 39 insertions(+), 8 deletions(-) diff --git a/docs/guides/portal-execution-profiles-handoff.md b/docs/guides/portal-execution-profiles-handoff.md index 3b78778..1c28ea6 100644 --- a/docs/guides/portal-execution-profiles-handoff.md +++ b/docs/guides/portal-execution-profiles-handoff.md @@ -42,6 +42,11 @@ GitLab schedules should not be the primary governance point. The Portal should own periodic and event-triggered execution decisions, then trigger GitLab CI with resolved site-local variables. +The current GitLab CI entry point consumes `code`, `system`, BenchPark controls, +and optional scheduler extra args. Execution profile fields such as `exp` remain +Portal-side matching and audit metadata until the GitLab matrix generator grows +a matching selector. + ## GitLab Pipeline Trigger Configuration Dry-run payload rendering requires: diff --git a/result_server/routes/admin.py b/result_server/routes/admin.py index d5fa851..fe0d8a8 100644 --- a/result_server/routes/admin.py +++ b/result_server/routes/admin.py @@ -166,6 +166,10 @@ def _build_execution_pipeline_plan(store): scheduler_extra_args=resolve_result.scheduler_extra_args, target_id=gitlab_target.id if gitlab_target else gitlab_target_id, ) + if exp: + plan.warnings.append( + "Profile Exp is used for Portal profile matching and is not sent to GitLab CI." + ) return { "target_ref": target_ref, "profile_id": profile_id, @@ -321,6 +325,9 @@ def dry_run_execution_profile_submit(): payload={ "api_url": plan.api_url, "gitlab_target": gitlab_target_id, + "gitlab_project": submit_plan["gitlab_target"].repo + if submit_plan["gitlab_target"] + else "", "payload": plan.payload, }, errors=errors, @@ -353,6 +360,9 @@ def dry_run_execution_profile_submit(): "profile": profile, "api_url": plan.api_url, "gitlab_target": gitlab_target_id, + "gitlab_project": submit_plan["gitlab_target"].repo + if submit_plan["gitlab_target"] + else "", "payload_json": json.dumps(plan.payload, indent=2, sort_keys=True), "errors": errors, "warnings": plan.warnings, @@ -401,6 +411,8 @@ def submit_execution_profile_pipeline(): payload = {"api_url": plan.api_url, "payload": plan.payload} if gitlab_target_id: payload["gitlab_target"] = gitlab_target_id + if gitlab_target: + payload["gitlab_project"] = gitlab_target.repo if submit_result is not None: payload["submit"] = { "status_code": submit_result.status_code, @@ -449,6 +461,7 @@ def submit_execution_profile_pipeline(): "profile": profile, "api_url": plan.api_url, "gitlab_target": gitlab_target_id, + "gitlab_project": gitlab_target.repo if gitlab_target else "", "payload_json": json.dumps(plan.payload, indent=2, sort_keys=True), "errors": errors, "warnings": plan.warnings, diff --git a/result_server/templates/admin_execution_profiles.html b/result_server/templates/admin_execution_profiles.html index 9f2dde0..3df3a1a 100644 --- a/result_server/templates/admin_execution_profiles.html +++ b/result_server/templates/admin_execution_profiles.html @@ -251,8 +251,8 @@

Create / Update Profile

GitLab Pipeline Trigger

- Resolve an approved profile for a target scope and preview the GitLab - pipeline trigger request before submitting it. + Trigger the current GitLab CI entry point with project, ref, code, + system, and BenchPark controls.

{% if csrf_token is defined %}{% endif %} @@ -265,7 +265,7 @@

GitLab Pipeline Trigger

{% if gitlab_targets %} {% else %} @@ -285,8 +285,8 @@

GitLab Pipeline Trigger