-
Notifications
You must be signed in to change notification settings - Fork 146
fix: migrations number drift #1226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedFailed to post review comments WalkthroughThis PR introduces comprehensive changes across multiple domains: adding idempotency-hit tracking to controller methods with HTTP header propagation, implementing a new exporter update API, refactoring Pulumi image configuration, updating storage queries with scoped selects, modifying transaction query parameters (timestamp instead of date), adding balance filter support for big integers, updating mock generation with -typed flag, and expanding test coverage for new features. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Handler as V2 Handler
participant Controller as Ledger Controller
participant Store as Storage Layer
participant Processor as Log Processor
Client->>Handler: CreateTransaction Request<br/>(with Idempotency-Key)
Handler->>Controller: CreateTransaction(ctx, params)
Controller->>Processor: forgeLog(ctx, store, params, fn)
alt Idempotency Key Found
Processor->>Store: GetLogByIdempotencyKey(key)
Store-->>Processor: (log, output, nil)
Processor-->>Controller: (log, output, true, nil)
else First Request
Processor->>Processor: Execute transaction processing
Processor->>Store: PersistLog(...)
Store-->>Processor: (success)
Processor-->>Controller: (log, output, false, nil)
end
Controller->>Handler: Return (log, output, idempotencyHit, error)
alt idempotencyHit == true
Handler->>Handler: Set Header "Idempotency-Hit: true"
else idempotencyHit == false
Handler->>Handler: (No Idempotency-Hit header)
end
Handler-->>Client: Response with Headers
sequenceDiagram
participant Admin
participant API as V2 UpdateExporter Endpoint
participant Manager as Replication Manager
participant Storage
participant Pipeline
participant Driver
Admin->>API: PUT /exporters/{id} (new config)
API->>Manager: UpdateExporter(ctx, id, config)
Manager->>Manager: ValidateDriver(config.Driver)
alt Invalid Driver
Manager-->>API: ErrInvalidDriverConfiguration
API-->>Admin: 400 Bad Request
else Not Found
Manager-->>API: ErrExporterNotFound
API-->>Admin: 404 Not Found
else Valid
Manager->>Manager: stopExporter(id)
Manager->>Pipeline: Stop pipelines using exporter
Pipeline->>Driver: Stop()
Manager->>Storage: UpdateExporter(exporter)
Storage-->>Manager: Success
Manager->>Manager: synchronizePipelines()
Manager-->>API: nil
API-->>Admin: 204 No Content
end
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
No description provided.