fix: enrichment metadata causing permanent redeploy indicator#55
fix: enrichment metadata causing permanent redeploy indicator#55TerrifiedBug merged 1 commit intomainfrom
Conversation
The pipeline list's change detection regenerates YAML from the graph and compares it to the stored version YAML. When enrichMetadata is enabled, the stored YAML includes the injected vectorflow_metadata_enrich transform, but the comparison YAML did not — causing a permanent "Pending deploy" indicator. Pass the same enrichment param (environment name + version number) to generateVectorYaml in the comparison path so both sides match.
Greptile SummaryThis PR fixes a false-positive "Pending deploy" indicator that persisted permanently when the "Enrich with VectorFlow metadata" option was enabled on a pipeline. The root cause was that the Key changes:
Correctness of the approach: The deployed YAML stored in Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant PipelineList as pipeline.list (tRPC)
participant DeployAgent as deploy.agent (tRPC)
participant CreateVersion as createVersion()
participant GenYaml as generateVectorYaml()
participant DB as PostgreSQL
Note over DeployAgent,CreateVersion: At deploy time (enrichMetadata = true)
DeployAgent->>GenYaml: generateVectorYaml(nodes, edges, globalConfig, {environmentName, pipelineVersion: N+1})
GenYaml-->>DeployAgent: configYaml (with .vectorflow.pipeline_version = N+1)
DeployAgent->>CreateVersion: createVersion(pipelineId, (v) => buildYaml(v), ...)
CreateVersion->>GenYaml: builder(N+1) → YAML embedded with version N+1
CreateVersion->>DB: PipelineVersion { version: N+1, configYaml: "...pipeline_version = N+1..." }
Note over PipelineList,DB: At pipeline.list query time (BEFORE this fix)
PipelineList->>DB: SELECT latestVersion (version=N+1, configYaml)
PipelineList->>GenYaml: generateVectorYaml(nodes, edges, globalConfig, null)
GenYaml-->>PipelineList: currentYaml (NO enrichment transform)
PipelineList->>PipelineList: currentYaml ≠ latestVersion.configYaml → hasUndeployedChanges = TRUE (false positive!)
Note over PipelineList,DB: At pipeline.list query time (AFTER this fix)
PipelineList->>DB: SELECT latestVersion (version=N+1, configYaml) + enrichMetadata + environment.name
PipelineList->>GenYaml: generateVectorYaml(nodes, edges, globalConfig, {environmentName, pipelineVersion: N+1})
GenYaml-->>PipelineList: currentYaml (with matching enrichment transform)
PipelineList->>PipelineList: currentYaml === latestVersion.configYaml → hasUndeployedChanges = FALSE ✓
Last reviewed commit: 13797b3 |
Summary
hasUndeployedChangescheck inpipeline.listcallsgenerateVectorYaml()without the enrichment param, but the stored version YAML includes the injectedvectorflow_metadata_enrichtransform — so they never match, causing a permanent "Pending deploy" indicatorenrichmentparam (environment name + deployed version number) to the comparison YAML generation so both sides are identical when no real changes existenrichMetadataandenvironment.nameto the pipeline list query selectTest plan