#86962·airbyte

[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful

Author: YancharskiCreated Sep 24, 2026Updated Sep 24, 2026
Labelstype/bugarea/connectorscommunityneeds-triageconnectors/source/shopifyautoteamteam/use

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: FAILED
  • errorCode: INTERNAL_SERVER_ERROR
  • url: null
  • partialDataUrl: null
  • completedAt: 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:

graphql
orders {
  edges {
    node {
      id
      agreements {
        edges {
          node {
            id
            happenedAt
            reason
            sales {
              edges {
                node {
                  id
                }
              }
            }
          }
        }
      }
    }
  }
}

A single affected order deterministically produces:

json
{
  "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;
  • hasNextPage is true;
  • 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:

  1. no result file is downloaded;
  2. _job_result_filename remains null;
  3. _process_bulk_results() returns an empty iterable;
  4. no exception is raised;
  5. 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:

  1. processes a partial result only when partialDataUrl or another usable result URL exists;
  2. otherwise raises ShopifyBulkExceptions.BulkJobFailed.

Add a unit test for a checkpointable stream receiving:

json
{
  "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

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

Contribute

  • Yes, I want to contribute