From 0679e91c85f283a527f1db46fb00c6a18f415659 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 10 Mar 2026 18:06:01 +0100 Subject: [PATCH] fix(parser): use firstOrCreate instead of updateOrCreate for environment variables Prevent unnecessary updates to existing environment variable records. The previous implementation would update matching records, but the intent is to retrieve or create the record without modifying existing ones. --- bootstrap/helpers/parsers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/helpers/parsers.php b/bootstrap/helpers/parsers.php index 6b66de8a2..99ce9185a 100644 --- a/bootstrap/helpers/parsers.php +++ b/bootstrap/helpers/parsers.php @@ -1940,7 +1940,7 @@ function serviceParser(Service $resource): Collection } else { $value = generateEnvValue($command, $resource); - $resource->environment_variables()->updateOrCreate([ + $resource->environment_variables()->firstOrCreate([ 'key' => $key->value(), 'resourceable_type' => get_class($resource), 'resourceable_id' => $resource->id,