batches: Make relation between batch spec and batch change explicit in server-side execution #38921
Conversation
def60dc to
586158e
Compare
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff bdb58fd...29a7911.
|
eseliger
left a comment
There was a problem hiding this comment.
Great, this does feel much less bad than I thought it might!
I think service.CreateEmptyBatchChange should also set the batch spec id, wdyt? It's a bit annoying to do because there's a circular reference in our DB schema rn with this change, but with the initially deferred constraints, it shouldn't be a big problem.
@eseliger |
6d2d345 to
c12cc90
Compare
d836dab to
20347b5
Compare
LawnGnome
left a comment
There was a problem hiding this comment.
+1, pending the lint errors being fixed. Nice job!
|
@eseliger That'd mean that service.CreateEmptyBatchChange would have a flow similar to:
I didn't go that route because the first batch spec for an empty batch change is usually non-executable and just a placeholder until something else gets added. I don't feel strongly about this though but I'm curious as to what you think of the above flow. |
|
Yeah that's what I meant with "cyclic" :( |
Yes yes. However, something that could help #38610 is maybe excluding batch specs that have a |
ebf4f23 to
29a7911
Compare
Closes #36543
Test plan
Context
This PR adds a new
NULLABLEcolumn tobatch_specstable that points tobatch_changes.idfield in thebatch_changestable. This column will be populated when the batch spec is created withcreateBatchSpecFromRawand when it's not it'll have a value ofNULL.