Fix bundled workflow activation + add connection error logging
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 5s
CI/CD / test-runners (pull_request) Has been skipped
CI/CD / test-frontend (pull_request) Successful in 6s
CI/CD / test-go-pg (pull_request) Successful in 2m46s
CI/CD / test-sqlite (pull_request) Successful in 2m54s
CI/CD / build-and-deploy (pull_request) Successful in 1m11s

1. Bundled workflow packages now publish version 1 and set IsActive=true
   after stage creation, so workflows like Content Approval are usable
   immediately — fixes "workflow is not active" test failure.

2. Add error logging to ListConnections handler to diagnose the 500
   error in sdk/connections tests (query and schema look correct but
   the error was being swallowed).

3. Separate "Run All" button text from suite count label.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 11:47:21 +00:00
parent daf6b09dd3
commit 6ebffc1078
2 changed files with 19 additions and 0 deletions

View File

@@ -253,6 +253,23 @@ func InstallWorkflowFromManifest(ctx *gin.Context, stores store.Stores, pkgID st
}
}
// Publish version 1 (snapshot of stages) and activate the workflow
// so it's immediately usable after install.
stages, _ := stores.Workflows.ListStages(reqCtx, workflowID)
snapshot, _ := json.Marshal(stages)
ver := &models.WorkflowVersion{
WorkflowID: workflowID,
VersionNumber: 1,
Snapshot: snapshot,
}
if err := stores.Workflows.Publish(reqCtx, ver); err != nil {
log.Printf("[workflow-pkg] failed to publish version for %s: %v", pkgID, err)
}
active := true
if err := stores.Workflows.Update(reqCtx, workflowID, models.WorkflowPatch{IsActive: &active}); err != nil {
log.Printf("[workflow-pkg] failed to activate %s: %v", pkgID, err)
}
// Store workflow_id in package_settings for reference
settingsJSON, _ := json.Marshal(map[string]string{"workflow_id": workflowID})
stores.Packages.SetPackageSettings(reqCtx, pkgID, json.RawMessage(settingsJSON))