Skip to content

fix: workflow deploy nil svc error#4797

Open
Cynthia-0203 wants to merge 5 commits into
koderover:mainfrom
Cynthia-0203:fix/workflow-deploy-nil-svc-error
Open

fix: workflow deploy nil svc error#4797
Cynthia-0203 wants to merge 5 commits into
koderover:mainfrom
Cynthia-0203:fix/workflow-deploy-nil-svc-error

Conversation

@Cynthia-0203

@Cynthia-0203 Cynthia-0203 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What this PR does / Why we need it:

Fixes a panic when creating a workflow task for Helm services with values auto-sync enabled, where the selected service has not been deployed to the target environment yet.

Previously, the deploy job assumed the service already existed in the environment and accessed its render data directly during auto-sync. For first-time deployments, the environment service does not exist yet, causing a nil pointer panic and a 500 response.

This PR allows first-time Helm service deployments to proceed with the submitted values, while preserving source metadata after deployment so future auto-sync runs can fetch the latest values correctly.

What is changed and how it works?

If the service is not deployed yet, sync the latest values from the template service's helm source so the deploy is not driven by empty/stale user input. A new ValuesSyncedFromSource flag on JobTaskHelmDeploySpec records that the values came from source. At deploy time, for a newly deployed service whose values were synced from source, the new render's AutoSyncYaml is seeded with the pure source values so future auto-sync runs compare against a clean baseline. If the template service has no source configured, it falls back to the submitted values — no regression.

Does this PR introduce a user-facing change?

  • API change
  • database schema change
  • upgrade assistant change
  • change in non-functional attributes such as efficiency or availability
  • fix of a previous issue

This change is Reviewable

Signed-off-by: Cynthia <chenchen@koderover.com>
… auto mode

Signed-off-by: Cynthia <chenchen@koderover.com>
@Cynthia-0203 Cynthia-0203 changed the title Fix/workflow deploy nil svc error fix: workflow deploy nil svc error Jul 2, 2026
Signed-off-by: Cynthia <chenchen@koderover.com>
Signed-off-by: Cynthia <chenchen@koderover.com>
Signed-off-by: Cynthia <chenchen@koderover.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant