build out bulk overwrite - #97
Conversation
✅ Deploy Preview for drs-server ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f84dcdef65
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| candidates := make([]models.InternalObject, 0, len(req.Records)) | ||
| now := time.Now().UTC() | ||
| for i, record := range req.Records { | ||
| obj, err := core.InternalRecordToInternalObject(record, now) |
There was a problem hiding this comment.
Apply the bulk scope when building overwrite records
When a client sends the documented bulk shape with organization/project only at the top level, each InternalRecord is converted unchanged here, so InternalRecordToInternalObject never adds the target project resource. BulkOverwriteObjects then rejects the candidate as missing the target project, and because that validation error is not wrapped as a conflict or invalid input it is returned as a 500; generated clients can therefore fail for a request that satisfies the new BulkOverwriteRequest schema unless every record redundantly repeats controlled_access or per-record scope.
Useful? React with 👍 / 👎.
No description provided.