fix(flows): allow pending trace IDs in flow responses - #382
Merged
asdek merged 1 commit intoAug 3, 2026
Merged
Conversation
N1neSun
force-pushed
the
fix/allow-null-flow-trace-id
branch
from
July 30, 2026 08:29
1154a81 to
2137aa5
Compare
N1neSun
force-pushed
the
fix/allow-null-flow-trace-id
branch
from
July 30, 2026 08:36
2137aa5 to
3068b62
Compare
Contributor
|
hey @N1neSun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
Problem
The database schema allows
flows.trace_idto beNULL, which can occur while observability initialization is still pending. However, the server-sideFlowmodel treatedtrace_idas required and declared the column asNOT NULL.As a result, valid flow records with a pending trace ID could fail model validation when returned by endpoints such as
GET /flows.Solution
This change aligns the server model with the existing nullable database schema:
Flow.TraceIDoptional while retaining the 70-character maximum length validation.NOT NULLGORM constraint.trace_idis no longer required.GET /flowsreturns flows with pending trace IDs successfully.Type of Change
Areas Affected
Testing and Verification
Test Configuration
Test Steps
Run the flow model validation tests:
Run the flow service regression test:
Run static analysis for the affected packages:
Test Results
All tests and static analysis relevant to this change passed:
The complete services test suite has unrelated Windows-specific failures involving path separators and filename handling. The new regression test passes independently.
Security Considerations
This change does not modify authentication, authorization, permissions, or sensitive-data handling.
Allowing a temporarily missing trace ID does not bypass any access controls. The existing maximum-length validation remains in place when a trace ID is provided.
Performance Impact
No measurable performance impact is expected. The change only adjusts validation and schema metadata for one optional field and does not add database queries or processing overhead.
Documentation Updates
The generated Swagger JSON, YAML, and Go documentation have been updated to represent
trace_idas optional.Deployment Notes
No special deployment steps, environment variables, configuration changes, or database migrations are required.
The existing database migration already defines
flows.trace_idas nullable.Checklist
Code Quality
go fmtandgo vet(for Go code)pnpm run lint(for TypeScript/JavaScript code)Security
Compatibility
Documentation
Additional Notes
The
flows.trace_iddatabase column was already nullable. This change corrects the server model and API schema so they accurately reflect the existing database behavior.