fix: require non-null uid in insertNewExecution#5300
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5300 +/- ##
============================================
- Coverage 49.97% 49.95% -0.02%
+ Complexity 2421 2417 -4
============================================
Files 1052 1052
Lines 40780 40786 +6
Branches 4356 4357 +1
============================================
- Hits 20378 20376 -2
- Misses 19193 19198 +5
- Partials 1209 1212 +3
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Yicong-Huang
requested changes
May 31, 2026
Contributor
Yicong-Huang
left a comment
There was a problem hiding this comment.
Left comments inline. we should reject bad frontend requests.
Yicong-Huang
approved these changes
Jun 1, 2026
Contributor
Yicong-Huang
left a comment
There was a problem hiding this comment.
Approved with a nit, see inline.
Updated documentation to clarify that uid is required. Signed-off-by: Matthew B. <mgball@uci.edu>
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.
What changes were proposed in this PR?
ExecutionsMetadataPersistService.insertNewExecutionkept itsuid: Option[Integer]signature but replacedsetUid(uid.orNull)withsetUid(uid.getOrElse(throw new IllegalArgumentException(...))), so a missing uid is rejected with a clear error instead of writing null into the NOT NULLworkflow_executions.uidcolumn (which produced a cryptic jOOQ DataAccessException)..orNullis used; the caller (WorkflowService.initExecutionService) passes theOptionthrough unchanged.ExecutionsMetadataPersistServiceSpec: the missing-uid case now passesNoneand asserts anIllegalArgumentExceptionis raised.Any related issues, documentation, or discussions?
Closes: #5212
How was this PR tested?
WorkflowExecutionService/testOnly ...ExecutionsMetadataPersistServiceSpec: all 9 tests pass.sbt scalafmtAll(clean).Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF