[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful
Connector Name
source-shopify
Connector Version
4.0.3
What step the error happened?
During the sync
Relevant information
Summary
The order_agreements incremental GraphQL Bulk stream silently returns zero records and is marked as successfully completed when Shopify returns a failed bulk operation without a result URL.
The bulk query is accepted with userErrors: [], but the asynchronous operation later finishes with:
status: FAILEDerrorCode: INTERNAL_SERVER_ERRORurl: nullpartialDataUrl: nullcompletedAt: null
Despite this, Airbyte emits no error, reads zero records, and marks the stream as COMPLETE. This causes silent data loss and prevents the stream cursor from progressing normally.
The affected _on_failed_job code path is still unchanged on the current master branch after the 4.1.0 release.
Affected stream
order_agreements
Shopify Admin API version: 2026-07
Reproduction
The issue can be reproduced with a bulk query that expands:
orders {
edges {
node {
id
agreements {
edges {
node {
id
happenedAt
reason
sales {
edges {
node {
id
}
}
}
}
}
}
}
}
}A single affected order deterministically produces:
{
"id": "gid://shopify/BulkOperation/8398144110644",
"status": "FAILED",
"errorCode": "INTERNAL_SERVER_ERROR",
"objectCount": "252",
"url": null,
"partialDataUrl": null,
"completedAt": null
}A control order executed with the same query completes successfully.
The same affected order can be retrieved through the regular Shopify Admin GraphQL API. Its SalesAgreement.sales connection can also be paginated successfully:
- the first 250 sales are returned;
hasNextPageistrue;- the next page after the returned cursor is also returned successfully.
This shows that the underlying records are readable and that the failure occurs only inside Shopify's Bulk Operations engine.
Connector behavior
ShopifyBulkManager._on_failed_job() raises BulkJobFailed only for streams that do not support checkpointing.
For checkpointable streams, including order_agreements, it assumes that a failed operation has a usable partialDataUrl and calls _job_get_checkpointed_result().
When both url and partialDataUrl are null:
- no result file is downloaded;
_job_result_filenameremains null;_process_bulk_results()returns an empty iterable;- no exception is raised;
- Airbyte marks the stream as complete with zero records.
Expected behavior
When a bulk operation has status FAILED and neither url nor partialDataUrl is available, the connector must raise ShopifyBulkExceptions.BulkJobFailed.
The stream must not be marked as successfully completed when Shopify returned no downloadable result.
The existing checkpoint behavior can remain unchanged when a usable partialDataUrl is present.
Proposed fix
Update ShopifyBulkManager._on_failed_job() so that it:
- processes a partial result only when
partialDataUrlor another usable result URL exists; - otherwise raises
ShopifyBulkExceptions.BulkJobFailed.
Add a unit test for a checkpointable stream receiving:
{
"status": "FAILED",
"errorCode": "INTERNAL_SERVER_ERROR",
"objectCount": "252",
"url": null,
"partialDataUrl": null
}Related issue
Related to #85372, which describes another path where a Shopify bulk operation can produce no downloadable result while the connector silently completes with zero records.
Relevant log output
2026-09-11 08:49:07 info Stream: `order_agreements` requesting BULK Job for period: 2026-09-07T05:33:49+00:00 -- 2026-09-11T05:48:58.244889+00:00. Slice size: `P4.0D`. The BULK checkpoint after `100000` lines.
2026-09-11 08:49:07 info Stream: `order_agreements`, the BULK Job: `gid://shopify/BulkOperation/5948268511284` is CREATED
2026-09-11 08:49:07 info Stream: `order_agreements`, the BULK Job: `gid://shopify/BulkOperation/5948268511284` is FAILED
2026-09-11 08:49:07 info Stream: `order_agreements`, the BULK Job: `gid://shopify/BulkOperation/5948268511284` time elapsed: 3.408 sec. Rows collected: 1631 --> records: `0`.
2026-09-11 08:49:07 info Stream order_agreements, continue from checkpoint: `None`.
2026-09-11 08:49:07 info Read 0 records from order_agreements stream
2026-09-11 08:49:07 info Marking stream order_agreements as STOPPED
2026-09-11 08:49:07 info Finished syncing order_agreements
2026-09-11 08:49:07 info Stream status TRACE received of status: COMPLETE for stream order_agreementsContribute
- Yes, I want to contribute
Source: airbytehq/airbyte