Skip to content

CrateDB integration tests#192

Draft
amotl wants to merge 2 commits into
mainfrom
cratedb
Draft

CrateDB integration tests#192
amotl wants to merge 2 commits into
mainfrom
cratedb

Conversation

@amotl

@amotl amotl commented Jul 10, 2026

Copy link
Copy Markdown
Member

About

CrateDB is an emerging open-source data warehouse that can store data in the terabyte ranges and is largely compatible with PostgreSQL.

Details

An earlier attempt to validate CrateDB caused too much noise, because the database didn't support the DATE type. Now that this has changed recently, warehouse operations become actually viable.

@DHRUV6029: Thank you very much for submitting the relevant patch to CrateDB. 👍

Status

The adjusted test suite currently needs to skip a few test cases that raise the venerable DestinationSchemaTampered exception of dlt. We think dlt-cratedb might need further adjustments beyond the patch recently submitted by @florinutz.

pytest --no-cov -k cratedb
87 passed, 71 skipped, 54 warnings in 124.39s (0:02:04)

References

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6e01ebfa-f033-4cc6-9f2e-24ec55a032ec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cratedb

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@amotl amotl force-pushed the cratedb branch 4 times, most recently from 49dd807 to 190f1af Compare July 11, 2026 21:56
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.36%. Comparing base (dc5aa50) to head (116d76d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #192      +/-   ##
==========================================
+ Coverage   54.33%   54.36%   +0.03%     
==========================================
  Files         203      203              
  Lines        9574     9574              
==========================================
+ Hits         5202     5205       +3     
+ Misses       4372     4369       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread pyproject.toml
"pytest-cov<8",
"pytest-xdist[psutil]<4",
"testcontainers[mysql,postgres]>=4.9.1,<4.15",
"testcontainers[cratedb,mysql,postgres] @ git+https://github.com/testcontainers/testcontainers-python.git@main",

@amotl amotl Jul 11, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for adding a native CrateDB adapter to Testcontainers for Python. With testcontainers 4.15, we will be able to use it in downstream packages swiftly.

Suggested change
"testcontainers[cratedb,mysql,postgres] @ git+https://github.com/testcontainers/testcontainers-python.git@main",
"testcontainers[cratedb,mysql,postgres]>=4.15,<4.16",

/cc @florinutz, @alexanderankin

Comment thread pyproject.toml
"dataclasses-json<0.7",
"dlt<1.29",
"dlt-cratedb<0.2",
"dlt-cratedb @ git+https://github.com/zerotired/dlt-cratedb.git@fix-dynamic-install",

@amotl amotl Jul 11, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@florinutz: It looks like even when using the newest updates in the dlt-cratedb repository, including yours, the venerable DestinationSchemaTampered error is still present across the board.

Comment on lines +58 to +63
if dest_uri.startswith("cratedb://"):
pytest.skip(
"Fails on CrateDB with `DestinationSchemaTampered`, see "
"https://github.com/crate/dlt-cratedb/issues/14"
)

@amotl amotl Jul 11, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@florinutz: It looks like even when using the newest updates in the dlt-cratedb repository, including yours, the venerable DestinationSchemaTampered error is still present across the board.

Like demonstrated here, we had to skip all test cases that are still failing on CrateDB. It would be so sweet to resolve them in one way or another, so CrateDB can become a premium-grade data warehouse within omniload and other applications using dlt. 🙏

@read-the-docs-community

Copy link
Copy Markdown

@amotl amotl left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me flag two more errors.

Comment on lines +365 to +370
if dest_uri.startswith("cratedb://"):
pytest.skip(
'Fails on CrateDB with `"_id" conflicts with system column`, '
"see https://github.com/crate/dlt-cratedb/issues/19"
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we need to skip the MongoDB -> CrateDB integration tests, because of the venerable “_id” conflicts with system column pattern error that apparently still happens.

/cc @florinutz

Comment on lines 123 to +129
def append_test(dest_uri, dynamodb, schema: str):

if dest_uri.startswith("cratedb://"):
pytest.skip(
"Fails on CrateDB with twice the amount of expected results: AssertionError: assert 6 == 3"
)

@amotl amotl Jul 11, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is another type of error we haven't seen before with dlt and CrateDB. It needs to be investigated.

Comment on lines -55 to +63
assert res[0] == ("message1",)
assert res[1] == ("message2",)
assert res[2] == ("message3",)
if dest_uri.startswith("cratedb://"):
messages_db = [res[0][0], res[1][0], res[2][0]]
assert "message1" in messages_db
assert "message2" in messages_db
assert "message3" in messages_db
else:
assert res[0] == ("message1",)
assert res[1] == ("message2",)
assert res[2] == ("message3",)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: Maybe adjust the database query instead to emit ordered results?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant