From 5ff8f06f287aab9e27eede0b5aca49f507cfc805 Mon Sep 17 00:00:00 2001 From: Rada Kamysheva Date: Tue, 21 Jul 2026 08:49:08 +0000 Subject: [PATCH 1/2] Preserve trace_location on experiment create in test server The fake ExperimentCreate rebuilt the stored experiment field-by-field and never copied TraceLocation from the request. TraceLocation is immutable and the real GetExperiment echoes it back, so the direct-engine diff saw the field as local-present vs remote-absent and spuriously recreated the experiment on every subsequent plan/deploy. Copy TraceLocation through so the fake mirrors backend behaviour. --- libs/testserver/experiments.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/testserver/experiments.go b/libs/testserver/experiments.go index e35967deed1..13b15110a02 100644 --- a/libs/testserver/experiments.go +++ b/libs/testserver/experiments.go @@ -71,6 +71,10 @@ func (s *FakeWorkspace) ExperimentCreate(req Request) Response { ArtifactLocation: experiment.ArtifactLocation, Tags: append(experiment.Tags, appendTags...), LifecycleStage: "active", + // TraceLocation is immutable and echoed back by the real GetExperiment. + // Dropping it here makes the direct-engine diff see local-present vs + // remote-absent and spuriously recreate the experiment. + TraceLocation: experiment.TraceLocation, } s.Experiments[experimentId] = ml.GetExperimentResponse{ From 50c0e74598f095a042a42020e844cbccfe2de3a1 Mon Sep 17 00:00:00 2001 From: Rada Kamysheva Date: Tue, 21 Jul 2026 08:51:55 +0000 Subject: [PATCH 2/2] Shorten trace_location comment --- libs/testserver/experiments.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/testserver/experiments.go b/libs/testserver/experiments.go index 13b15110a02..c7c3fa6c77d 100644 --- a/libs/testserver/experiments.go +++ b/libs/testserver/experiments.go @@ -71,9 +71,7 @@ func (s *FakeWorkspace) ExperimentCreate(req Request) Response { ArtifactLocation: experiment.ArtifactLocation, Tags: append(experiment.Tags, appendTags...), LifecycleStage: "active", - // TraceLocation is immutable and echoed back by the real GetExperiment. - // Dropping it here makes the direct-engine diff see local-present vs - // remote-absent and spuriously recreate the experiment. + // Echo back like the real GetExperiment; omitting this immutable field triggers a spurious recreate. TraceLocation: experiment.TraceLocation, }