codeant-ai-for-open-source[bot] commented on code in PR #45532:
URL: https://github.com/apache/superset/pull/45532#discussion_r4331563325


##########
superset/semantic_layers/api.py:
##########
@@ -379,13 +415,32 @@ def post(self) -> Response:
 
         body = request.json or {}
         views_data = body.get("views", [])
-        if not views_data:
-            return self.response_400(message="No views provided")
+        if refusal := _bulk_create_refusal(views_data):
+            return self.response_400(message=refusal)
 
         schema = SemanticViewPostSchema()
         created = []
         errors = []
+        # Checked between lookups only: an in-flight provider call is bounded 
by
+        # the semantic layer's own timeouts.
+        deadline = (
+            time.monotonic() + 
current_app.config["SEMANTIC_VIEW_BULK_CREATE_TIMEOUT"]
+        )
+        timed_out = 0
         for view_data in views_data:
+            if time.monotonic() >= deadline:

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not flag the bulk-create deadline for failing to interrupt an in-flight 
provider lookup; it is checked between lookups, while individual provider calls 
are bounded by provider transport timeouts.
   
   **Applied to:**
     - `superset/semantic_layers/api.py`
   
   ---
   💡 *To manage or update this instruction, visit: [CodeAnt AI 
Settings](https://app.codeant.ai/org/settings/learnings)*



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to