You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "felipearcaro-buildium (via GitHub)" <gi...@apache.org> on 2026/03/19 13:29:50 UTC

[I] Upsert and update operations on SalesforceBulkOperator fail silently [airflow]

felipearcaro-buildium opened a new issue, #63930:
URL: https://github.com/apache/airflow/issues/63930

   ### Apache Airflow Provider(s)
   
   salesforce
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-salesforce 5.12.2
   
   ### Apache Airflow version
   
   2.11.0
   
   ### Operating System
   
   Windows 11
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   When using the `SalesforceBulkOperator` operator, `upsert` and `update` operations fail silently.
   
   ### What you think should happen instead
   
   When `upsert` or `update` operations fail, a `SalesforceGeneralError` (or a more specific error) should be raised.
   
   ### How to reproduce
   
   Create a DAG task and provide a payload that doesn't match the Asset object in Salesforce:
   
   ```python
   outbound_task = SalesforceBulkOperator(
     task_id="test_task_id",
     operation="update",
     object_name="Asset"
     payload=[{"Wrong_Asset_Key": "Account One"}],
     batch_size=200
   )
   ```
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Upsert and update operations on SalesforceBulkOperator fail silently [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on issue #63930:
URL: https://github.com/apache/airflow/issues/63930#issuecomment-4092593781

   > When upsert or update operations fail, a SalesforceGeneralError (or a more specific error) should be raised.
   
   Airflow only invoke Salesforce bulk api via `SFBulkHandler`:
   
   https://github.com/apache/airflow/blob/d22813d0e3fdc12e4d6b08cca6871b8dc3ed3b6c/providers/salesforce/src/airflow/providers/salesforce/operators/bulk.py#L97-L119
   
   So I think you should submit the request to [simple_salesforce](https://github.com/simple-salesforce/simple-salesforce) library asking them to raise error. If Salesforce will raise error it will be handled by Airflow automatically, if salesforce silent fail so will Airflow. Thus this is a feature/bug fix request to salesforce library.
   
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Upsert and update operations on SalesforceBulkOperator fail silently [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on issue #63930:
URL: https://github.com/apache/airflow/issues/63930#issuecomment-4097827754

   I suggest to open an issue for the upstream library. It would be easier after we hear what they have to say on the issue.
   Noting that Airflow has a shared governance model as listed in:
   https://github.com/apache/airflow/blob/main/providers/PROVIDER_GOVERNANCE.rst
   So Salesforce can always take a more active role in the project to benefit with their users. It's much easier when the provider professionals give recommendations and reasoning. 
   
   I'd like also to point that you are not blocked by this issue you can always subclass the operator and change the behavior as you see fit.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Upsert and update operations on SalesforceBulkOperator fail silently [airflow]

Posted by "felipearcaro-buildium (via GitHub)" <gi...@apache.org>.
felipearcaro-buildium commented on issue #63930:
URL: https://github.com/apache/airflow/issues/63930#issuecomment-4099114561

   I just created an [issue on simple-salesforce repo](https://github.com/simple-salesforce/simple-salesforce/issues/817). 
   
   Yes, I've already subclassed the provider and implemented the suggested fix on my end but I raised the issue because I thought other people might have their Salesforce tasks failing silently as well. I'll update it here when I hear back from them. Thanks! 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Upsert and update operations on SalesforceBulkOperator fail silently [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #63930:
URL: https://github.com/apache/airflow/issues/63930#issuecomment-4227455786

   This issue has been closed because it has not received response from the issue author.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Upsert and update operations on SalesforceBulkOperator fail silently [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #63930: Upsert and update operations on SalesforceBulkOperator fail silently
URL: https://github.com/apache/airflow/issues/63930


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Upsert and update operations on SalesforceBulkOperator fail silently [airflow]

Posted by "felipearcaro-buildium (via GitHub)" <gi...@apache.org>.
felipearcaro-buildium commented on issue #63930:
URL: https://github.com/apache/airflow/issues/63930#issuecomment-4097710526

   @eladkal I understand your point, but the current behavior still seems semantically wrong to me - we either don't see logs, or we get an XCom (`do_xcom_push=True`) with the following information: `[{'success': False, 'created': False, 'id': None, 'errors': [{'statusCode': 'INVALID_FIELD', 'message': "Unexpected JsonMappingException: No such column 'Wrong_Asset_Key' on sobject of type Asset", 'fields': []}]}]` but the task still succeeds.
   
   I already have a suggested fix in place that would (at least) log something like this:
   ```
   [2026-03-20, 09:34:33 -03] {custom_salesforce_bulk_operator.py:42} INFO - Salesforce Bulk API operation completed: 0/1 successful
   [2026-03-20, 09:34:33 -03] {custom_salesforce_bulk_operator.py:51} INFO - Salesforce Bulk API operation failed for 1 records:
     - {'success': False, 'created': False, 'id': None, 'errors': [{'statusCode': 'INVALID_FIELD', 'message': "Unexpected JsonMappingException: No such column 'Wrong_Asset_Key' on sobject of type Asset", 'fields': []}]}
   ```
   
   What do you think?
   
   I agree that raising an `AirflowException` is debatable, considering that's a design choice in the simple_salesforce library, though.
   
   
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Upsert and update operations on SalesforceBulkOperator fail silently [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #63930:
URL: https://github.com/apache/airflow/issues/63930#issuecomment-4185787010

   This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org