fix(controlplane): exclude soft-deleted rows when finding a project version by name#3237
Conversation
AI Session Analysis
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | app/controlplane/pkg/biz/projectversion_integration_test.go |
+29 / -0 |
| modified | ai | app/controlplane/pkg/data/projectversion.go |
+1 / -2 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-ecd1a3 |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-ecd1a3 |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-ecd1a3 |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-ecd1a3 |
- |
Powered by Chainloop and Chainloop Trace
…ersion by name FindByProjectAndVersion did not filter out soft-deleted project version rows. When a version name was deleted and recreated, the lookup matched both the soft-deleted and the active row, returning a "not singular" error and crashing the workflow run list when filtering by that version. Closes #3236 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: ecd1a33f-90f2-459f-9510-a5267ef123bd Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
289b3f0 to
a3e2980
Compare
Looking up a project version by name did not exclude soft-deleted rows. When a version name had been deleted and recreated, the lookup matched both the soft-deleted and the active row, causing the workflow run list to fail when filtering by that version.
This change scopes the lookup to non-deleted versions so the active version is returned, consistent with the other project-version queries in the same repository.
Closes #3236
AI disclosure
This change was produced with the assistance of Claude Code.
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri