PG1204 opened a new issue, #8870:
URL: https://github.com/apache/texera/issues/8870

   ### What happened?
   
   `ImageTaskCodegen.parsePython`'s `image-to-image` branch builds a data URL 
from a provider field without checking it (lines 146-147):
   
       if "b64_json" in data[0]:
           return f"data:image/png;base64,{data[0]['b64_json']}"
   
   If a provider returns a 200 whose `b64_json` is null, numeric, or not valid 
base64, that value is spliced in as-is and the result column holds a `data:` 
URL no image element can render - `data:image/png;base64,None`, for example. 
Nothing indicates why the image is blank.
   
   This is the same defect as #8869, in a different codegen. They are filed 
separately because they touch different files and can be reviewed independently.
   
   Note this does not abort the run: `_parse_response` catches `KeyError`, 
`IndexError` and `TypeError`, and the per-row handler catches the rest, so the 
effect is a corrupt cell rather than a failure.
   
   
   ### How to reproduce?
   
   Run the operator with `image-to-image` against a provider that returns a 200 
whose `b64_json` is null, a number, or not valid base64. The result column 
receives a data URL built from that value instead of falling back to the 
serialized body.
   
   ### Version/Branch
   
   1.4.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash (Optional)
   
   _No response_
   
   ### What browsers are you seeing the problem on?
   
   _No response_
   
   ### Relevant log output
   
   ```shell
   
   ```


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