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


##########
superset/commands/tag/create.py:
##########
@@ -97,9 +99,14 @@ def _validate_object_access(
                         f"Access validation not supported for {object_type}"
                     )
                 )
-        except SupersetSecurityException:
+        except (SupersetSecurityException, TemplateError):

Review Comment:
   **Suggestion:** The exception handling still omits `SupersetParseError`, 
which `process_jinja_sql()` raises when a saved query contains an unresolvable 
partition macro. That exception escapes `_validate_object_access()` instead of 
being appended to `exceptions`, so tagging such a query bypasses the command's 
`TagInvalidError` validation response. Catch `SupersetParseError` here as well 
and map it into the collected validation errors. [incomplete implementation]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ❌ Tagging affected SQL Lab queries returns an unhandled server error.
   - ⚠️ Tag API misses its expected validation response.
   - ⚠️ Queries using dynamic partition macros cannot be tagged reliably.
   ```
   </details>
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/commands/tag/create.py
   **Line:** 102:102
   **Comment:**
        *Incomplete Implementation: The exception handling still omits 
`SupersetParseError`, which `process_jinja_sql()` raises when a saved query 
contains an unresolvable partition macro. That exception escapes 
`_validate_object_access()` instead of being appended to `exceptions`, so 
tagging such a query bypasses the command's `TagInvalidError` validation 
response. Catch `SupersetParseError` here as well and map it into the collected 
validation errors.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43423&comment_hash=57442ba1d874708121e7940e9d03e1d73eb7b6071963000ad01cda568d0318be&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43423&comment_hash=57442ba1d874708121e7940e9d03e1d73eb7b6071963000ad01cda568d0318be&reaction=dislike'>👎</a>



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