carloea2 opened a new pull request, #8159:
URL: https://github.com/apache/texera/pull/8159

   ### What changes were proposed in this PR?
   
   Return zero for missing hub view counts without inserting a database row 
during the GET request.
   
   Before: unknown entity view count -> zero-row insert -> foreign-key failure 
-> 500
   After: unknown entity view count -> zero in response without a write -> 200
   
   ### Any related issues, documentation, discussions?
   
   Closes #8158
   
   ### How was this PR tested?
   
   Updated the existing database integration coverage to require no write for 
an unviewed entity and added an unknown-ID regression case. The suite also 
retains coverage for stored counts, both entity types, action filters, and 
mixed batches.
   
   `sbt "WorkflowExecutionService / Test / testOnly 
org.apache.texera.web.resource.dashboard.hub.HubResourceSpec"`
   
   `sbt scalafmtCheckAll`
   
   `sbt "scalafixAll --check"`
   
   The focused suite passed all 50 tests.
   
   Live local checks against the built branch:
   
   | Request | Before | After |
   | --- | --- | --- |
   | unknown workflow view count | 500 | 200 with zero |
   | unknown dataset view count | 500 | 200 with zero |
   | unknown workflow like count | 200 with zero | 200 with zero |
   
   A read-only database check after both view requests returned zero stored 
rows for both IDs.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Codex


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to