Skip to content

fix(source-shopify): add missing format: date-time annotations to datetime schema fields#81339

Open
devin-ai-integration[bot] wants to merge 3 commits into
masterfrom
devin/1782841063-fix-shopify-datetime-format
Open

fix(source-shopify): add missing format: date-time annotations to datetime schema fields#81339
devin-ai-integration[bot] wants to merge 3 commits into
masterfrom
devin/1782841063-fix-shopify-datetime-format

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What

Resolves https://github.com/airbytehq/oncall/issues/13019:

Related OSS issue: #81338

Several datetime fields in the orders, order_refunds, and draft_orders schemas are missing "format": "date-time" annotations. This causes typed destinations (e.g. PostgreSQL) to create varchar columns instead of timestamptz, preventing optimized date queries.

How

Added "format": "date-time" to 8 fields across 3 schema files, matching the pattern already used by 17+ other datetime fields in the same schemas (e.g. cancelled_at, closed_at, created_at, updated_at).

orders.json (4 fields):

  • processed_at (top-level)
  • customer.accepts_marketing_updated_at
  • refunds[].transactions[].created_at
  • refunds[].transactions[].processed_at

order_refunds.json (3 fields):

  • processed_at (top-level)
  • transactions[].created_at
  • transactions[].processed_at

draft_orders.json (1 field):

  • customer.accepts_marketing_updated_at

Declarative-First Evaluation

Not applicable — this connector is Python CDK-based (cdk:python tag), not declarative/manifest-only. The fix is purely in JSON schema files.

Test Coverage

Added test_schema_datetime_format.py with 8 parametrized test cases (one per fixed field) that verify each field has "format": "date-time" in its schema definition.

Review guide

  1. source_shopify/schemas/orders.json — 4 fields gain "format": "date-time"
  2. source_shopify/schemas/order_refunds.json — 3 fields gain "format": "date-time"
  3. source_shopify/schemas/draft_orders.json — 1 field gains "format": "date-time"
  4. unit_tests/test_schema_datetime_format.py — new test file

User Impact

Typed destinations (PostgreSQL, BigQuery, Snowflake, etc.) will now correctly create timestamp columns for these fields instead of varchar/string. Users who need date queries on these fields will no longer need manual casts. Existing syncs using Full Refresh - Overwrite will pick up the corrected types on the next sync. Users on Append mode may want to refresh the affected streams.

Can this PR be safely reverted and rolled back?

  • YES 💚

Link to Devin session: https://app.devin.ai/sessions/107bf2c39b9a466a9d6e3d7deef6298c

…etime schema fields

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Co-Authored-By: bot_apk <apk@cognition.ai>
@github-actions

Copy link
Copy Markdown
Contributor

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • 🛠️ Quick Fixes
    • /format-fix - Fixes most formatting issues.
    • /bump-version - Bumps connector versions, scraping changelog description from the PR title.
      • Bump types: patch (default), minor, major, major_rc, rc, promote.
      • The rc type is a smart default: applies minor_rc if stable, or bumps the RC number if already RC.
      • The promote type strips the RC suffix to finalize a release.
      • Example: /bump-version type=rc or /bump-version type=minor
    • /bump-progressive-rollout-version - Alias for /bump-version type=rc. Bumps with an RC suffix and enables progressive rollout.
  • ❇️ AI Testing and Review (internal link: AI-SDLC Docs):
    • /ai-prove-fix - Runs prerelease readiness checks, including testing against customer connections.
    • /ai-canary-prerelease - Rolls out prerelease to 5-10 connections for canary testing.
    • /ai-review - AI-powered PR review for connector safety and quality gates.
  • 📝 AI Documentation:
    • /ai-docs-review - AI-powered documentation review for PRs with connector changes.
    • /ai-create-docs-pr - Creates a documentation PR for connector changes, stacked on the current PR.
  • 🚀 Connector Releases:
    • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
  • ☕️ JVM connectors:
    • /update-connector-cdk-version connector=<CONNECTOR_NAME> - Updates the specified connector to the latest CDK version.
      Example: /update-connector-cdk-version connector=destination-bigquery
  • 🐍 Python connectors:
    • /poe connector source-example lock - Run the Poe lock task on the source-example connector, committing the results back to the branch.
    • /poe source example lock - Alias for /poe connector source-example lock.
    • /poe source example use-cdk-branch my/branch - Pin the source-example CDK reference to the branch name specified.
    • /poe source example use-cdk-latest - Update the source-example CDK dependency to the latest available version.
  • ⚙️ Admin commands:
    • /force-merge reason="<REASON>" - Force merges the PR using admin privileges, bypassing CI checks. Requires a reason.
      Example: /force-merge reason="CI is flaky, tests pass locally"
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@devin-ai-integration devin-ai-integration Bot added the hyd-fix Hydra: ai-fix stage has run label Jun 30, 2026
Co-Authored-By: bot_apk <apk@cognition.ai>
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

source-shopify Connector Test Results

292 tests   282 ✅  2m 8s ⏱️
  2 suites   10 💤
  2 files      0 ❌

Results for commit 1c561e3.

♻️ This comment has been updated with latest results.

@airbyte-support-bot

Copy link
Copy Markdown
Contributor

↪️ Triggering /ai-prove-fix per Hands-Free AI Triage Project triage next step.

Reason: Draft PR with CI green, linked to P3 oncall issue. Ready for prove-fix validation.

Devin session

@octavia-bot

octavia-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🔍 AI Prove Fix session starting... Running readiness checks and testing against customer connections. View playbook

Devin AI session created successfully!

@airbyte-support-bot

airbyte-support-bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🟢 Fix Proven — no regressions detected, all affected streams exercised.

Pre-flight Checks

  • Not Breaking: No type/field/PK/cursor/spec/state changes — purely additive format: date-time annotations
  • Reversible: Patch bump (3.5.1 → 3.5.2), no migrations
  • Safe: Declarative JSON schema annotations only

Regression Test Results

Command Result
SPEC
CHECK ✅ (target: SUCCEEDED, control: SUCCEEDED)
DISCOVER
READ ✅ (1658 records, identical between target and control)

Affected streams exercised: orders (12 records), order_refunds (4), draft_orders (9) — all non-zero, confirming the fix code path was reached.

Evidence Details
  • Mode: Comparison (target vs control 3.5.1)
  • Credentials: GSM integration test
  • All 53 streams: Identical record counts between target and control
  • Pre-release: 3.5.2-preview.1c561e3
  • Detailed results posted to linked oncall issue

Recommendation

Ready for merge and publish. Fix is low-risk (additive schema metadata matching 17+ existing fields in the same schemas).


Devin session

@airbyte-support-bot airbyte-support-bot added the hyd-prove Hydra: ai-prove-fix stage has run label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Pre-release Connector Publish Started

Publishing pre-release build for connector source-shopify.
PR: #81339

Pre-release versions will be tagged as {version}-preview.1c561e3
and are available for version pinning via the scoped_configuration API.

View workflow run
Pre-release Publish: SUCCESS

Docker image (pre-release):
airbyte/source-shopify:3.5.2-preview.1c561e3

Docker Hub: https://hub.docker.com/layers/airbyte/source-shopify/3.5.2-preview.1c561e3

Registry JSON:

@devin-ai-integration devin-ai-integration Bot marked this pull request as ready for review July 1, 2026 12:14
@airbyte-support-bot

Copy link
Copy Markdown
Contributor

↪️ Triggering /ai-review per Hands-Free AI Triage Project triage next step.

Reason: Prove-fix passed (🟢 no regressions, all affected streams exercised). Advancing to AI review.

Devin session

@octavia-bot

octavia-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

AI PR Review starting...

Reviewing PR for connector safety and quality.
View playbook

Devin AI session created successfully!

@airbyte-support-bot

airbyte-support-bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI PR Review Report

🟢 Review Action: APPROVED

All 12 gates passed.

🟦 Risk Level: 2/5

Additive format: date-time annotations on 8 existing schema fields in source-shopify; no runtime logic, streams, or spec changed.


📋 PR Details

Connector(s): source-shopify
PR: #81339
HEAD SHA: 1c561e3bf332b4730e7ecff0cf8bab6de858ab2b
Session: https://app.devin.ai/sessions/00a679cffb364744aefd07849af1c34c

🔍 Gate Evaluation Details

Gate-by-Gate Analysis

Gate Status Enforced? Details
PR Hygiene PASS Yes Description present (2330 chars), changelog updated for 3.5.2, no unresolved human comments
Code Hygiene PASS WARNING Source schema files modified; new test file test_schema_datetime_format.py added with 8 parametrized cases
Test Coverage PASS Yes Behavioral change detected (title: "fix", "add"); new test file with def test_, assert, @pytest.mark.parametrize
Code Security PASS Yes No security-sensitive file patterns matched; no security keywords in diff hunks
Per-Record Performance PASS WARNING No per-record code path changes — only JSON schema metadata annotations
Breaking Dependencies PASS WARNING No dependency version changes (only connector version bump 3.5.1 → 3.5.2)
Backwards Compatibility PASS Warning (elevates Risk Level) No spec changes; only additive format field on existing schema properties; no streams/fields/PKs removed
Forwards Compatibility PASS Warning (elevates Risk Level) No state/cursor/pagination/transformation keywords in diff hunks
Behavioral Changes PASS Warning (elevates Risk Level) No operational risk keywords (rate limit, retry, backoff, timeout, error handler) in diff hunks
Out-of-Scope Changes PASS Skip All changed files within airbyte-integrations/connectors/source-shopify/ and docs/integrations/sources/shopify.md
CI Checks PASS Yes All core checks green: Lint ✅, Test ✅ (292 tests, 282 passed, 10 skipped, 0 failed), Build ✅
Live / E2E Tests PASS Yes Prove-fix regression test passed: SPEC ✅, CHECK ✅, DISCOVER ✅, READ ✅ (1658 records identical between target 3.5.2-preview.1c561e3 and control 3.5.1); affected streams exercised (orders: 12, order_refunds: 4, draft_orders: 9)

Detailed Gate Notes

PR Hygiene:

  • PR Body Length (raw): 2349
  • PR Body Length (after stripping): 2330
  • PR Body Length (visible content): >1500
  • PR Body Preview: ## What\n\nResolves https://github.com/airbytehq/oncall/issues/13019:
  • Docs changelog: docs/integrations/sources/shopify.md updated with 3.5.2 row
  • Peer feedback: 0 human reviewer comments

Test Coverage:

  • Behavioral Change Detected: Yes
  • Indicators Found: PR title contains "fix" and "add"
  • Test Files Modified: unit_tests/test_schema_datetime_format.py (new file)
  • New Test Content Found: Yes
  • Test Content Evidence: def test_datetime_fields_have_format_annotation(schema_file, field_path):

Code Security:

  • No files matched path-based security patterns (auth, oauth, token, credential, secret, etc.)
  • metadata.yaml diff hunks contain only dockerImageTag version bump — no security keywords

Backwards Compatibility:

  • No spec files changed
  • Schema changes are purely additive: added "format": "date-time" to 8 existing string fields
  • No fields removed, no type changes, no stream removals, no PK/cursor changes
  • Note: Adding format: date-time causes typed destinations to create timestamp columns instead of varchar — this is a schema widening that may require a stream refresh for users on Append mode, but is not a breaking change per Airbyte conventions

CI Checks:

  • Lint source-shopify Connector: ✅
  • Test source-shopify Connector: ✅ (292 tests, 282 passed, 10 skipped, 0 failed)
  • Build and Verify Artifacts (source-shopify): ✅
  • Connector CI Checks Summary: ✅
  • source-shopify Pre-Release Checks: ✅
  • source-shopify Progressive Rollout Gate: ✅

Live / E2E Tests:

  • Evidence type: Prove-fix regression testing via pre-release 3.5.2-preview.1c561e3
  • Pre-release published successfully to Docker Hub
  • Comparison mode: target (3.5.2-preview) vs control (3.5.1)
  • All 53 streams: identical record counts between target and control
  • Affected streams exercised with non-zero records
📚 Evidence Consulted

Evidence

  • Changed files: 7 files
    • airbyte-integrations/connectors/source-shopify/metadata.yaml (version bump)
    • airbyte-integrations/connectors/source-shopify/pyproject.toml (version bump)
    • airbyte-integrations/connectors/source-shopify/source_shopify/schemas/orders.json (4 fields)
    • airbyte-integrations/connectors/source-shopify/source_shopify/schemas/order_refunds.json (3 fields)
    • airbyte-integrations/connectors/source-shopify/source_shopify/schemas/draft_orders.json (1 field)
    • airbyte-integrations/connectors/source-shopify/unit_tests/test_schema_datetime_format.py (new test)
    • docs/integrations/sources/shopify.md (changelog entry)
  • CI checks: 34 passed, 0 failed, 0 pending, 10 skipped
  • PR labels: connectors/source/shopify, hyd-fix, hyd-prove, hyd-review
  • PR description: present (2330+ chars)
  • Existing bot reviews: none

Devin session

@airbyte-support-bot

Copy link
Copy Markdown
Contributor

↪️ Triggering /ai-ready per Hands-Free AI Triage Project triage next step.

Reason: AI review approved (APPROVE). Advancing to final readiness stage.

Devin session

@octavia-bot octavia-bot Bot added the hyd-ready Hydra: ready for human review or merge label Jul 1, 2026
@octavia-bot-hoard

octavia-bot-hoard Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Auto-merge evaluation: FAIL

Preconditions (all must pass)

Status Check Reasoning
No Breaking Changes The PR adds 'format: date-time' annotations to 8 existing schema fields across 3 streams. This is additive metadata — no fields removed/renamed, no API changes, no spec changes, no configuration changes. Version bump is patch (3.5.1 → 3.5.2). The AI prove-fix and review both confirmed 'Not Breaking' with identical records between target and control.
Ai Review Passed Comment 10 contains '<!-- pr_ai_review_result: APPROVE' but it is authored by 'airbyte-support-bot', not 'devin-ai-integration[bot]'. The schema requires the marker to come specifically from devin-ai-integration[bot].

Change scope (at least one must pass)

❌ No matching change scope detected.

Devin session | Workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connectors/source/shopify hyd-fix Hydra: ai-fix stage has run hyd-prove Hydra: ai-prove-fix stage has run hyd-ready Hydra: ready for human review or merge hyd-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants