Skip to content

bug: failed prebuilds in parameter resolution endlessly fail #21237

@Emyrk

Description

@Emyrk

Related: #19864

We have a template with 5 prebuilds that all fail in parameter resolution

https://grafana.dev.coder.com/goto/-_pGpdMvg?orgId=1

2025-12-11 21:19:49.790 [erro]  coderd.prebuilds: failed to create prebuild  template_id=60105985-4e4f-4a8a-b64f-7fe8a6e01c5d  template_name=coder-copy-test  template_version_id=923ddc01-bf94-4154-a720-62d9bab38ee5  template_version_name=dreamy_ramanujan3  preset_id=f9310d5d-b749-4115-83ce-72219d3a5713  preset_name=Pittsburgh ...
    error= execute transaction:
               github.com/coder/coder/v2/coderd/database.(*sqlQuerier).runTx
                   /home/runner/work/coder/coder/coderd/database/db.go:213
             - provision workspace:
               github.com/coder/coder/v2/enterprise/coderd/prebuilds.(*StoreReconciler).provision
                   /home/runner/work/coder/coder/enterprise/coderd/prebuilds/reconcile.go:933
             - build tx:
               github.com/coder/coder/v2/coderd/wsbuilder.(*Builder).Build
                   /home/runner/work/coder/coder/coderd/wsbuilder/wsbuilder.go:316
             - execute transaction:
               github.com/coder/coder/v2/coderd/database.(*sqlQuerier).runTx
                   /home/runner/work/coder/coder/coderd/database/db.go:193
             - get provisioner tags:
               github.com/coder/coder/v2/coderd/wsbuilder.(*Builder).getProvisionerTags
                   /home/runner/work/coder/coder/coderd/wsbuilder/wsbuilder.go:1010
             - tags render:
               github.com/coder/coder/v2/coderd/wsbuilder.(*Builder).getDynamicProvisionerTags
                   /home/runner/work/coder/coder/coderd/wsbuilder/wsbuilder.go:1038
             - get parameters:
               github.com/coder/coder/v2/coderd/wsbuilder.(*Builder).getParameters
                   /home/runner/work/coder/coder/coderd/wsbuilder/wsbuilder.go:785
             - resolve parameters:
               github.com/coder/coder/v2/coderd/wsbuilder.(*Builder).getDynamicParameters
                   /home/runner/work/coder/coder/coderd/wsbuilder/wsbuilder.go:819
             - <nil>: Required parameter not provided; parameter value is null, and 1 other diagnostic(s)
Image

Reconciliation fails on all 5 with a 1min reconciliation loop across 3 coder nodes.

5 (per template) x 60 (per hour) x 3 (coderds) = 900 per hour. Which is taking up 28% CPU & ~50% memory object allocation

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions