-
Notifications
You must be signed in to change notification settings - Fork 566
[PFS-171] Update onUpsert Interface, Refactor StartCommit #10253
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
size-limit report 📦
|
4cc2fcd
to
fd86c75
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10253 +/- ##
==========================================
- Coverage 58.77% 58.70% -0.07%
==========================================
Files 637 637
Lines 77027 77033 +6
==========================================
- Hits 45271 45223 -48
- Misses 31198 31251 +53
- Partials 558 559 +1 ☔ View full report in Codecov by Sentry. |
return errors.Wrap(err, "update commit") | ||
} | ||
if err := atomicUpsertBranchAndCommitBranch(ctx, txnCtx.SqlTx, branchInfo, newHead.ID); err != nil { | ||
return errors.Wrap(err, "fill new branches") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel callers of fillNewBranches may wrap the error around "fill new branches". So it might better if it can indicate upsert branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like "fill new branches: upsert branch"?
} | ||
|
||
func (a *apiServer) validateStartCommitArgs(ctx context.Context, txnCtx *txncontext.TransactionContext, branchHandle *pfs.Branch) error { | ||
// Validate arguments: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment might be unnecessary now. The err msg and function name indicate the purpose
The next PR will be an update that actually creates an internal commit model that we can use. This will be handiest in functions like inspect commit which have to re-resolve the commit handles for provenance and such.