Repository navigation
Conversation
f073808 to
8768c26
Compare
8768c26 to
ee4f661
Compare
ee4f661 to
d834054
Compare
|
@florinutz: I think the patch is ready to go now. |
|
hey @amotl , thank you for the contribution, first, and sorry for the delayed response! then, I see you drop the dependency on the toolkit here. My current plan is to have toolkit updated first, and only after this to proceed further with any new testcontainers-python work such as this here, or updating the examples Let me get that released first, then it will unlock using the new testcontainers 4.15 (alongside toolkit and its testcontainer goodies) in the repos so we don't have to reimplement things such as you did here. |
|
Hi, and thanks! Please proceed at your disposal. |
florinutz
left a comment
There was a problem hiding this comment.
Hey, I have some comments which I'd like addressed in this PR before we merge. I can do them if you ✅ "Allow edits by maintainers", or you can do them yourself if you so desire.
Or ofc you can hit back on any point
| if "CRATEDB_VERSION" in os.environ: | ||
| cratedb_version = os.environ["CRATEDB_VERSION"] | ||
| if cratedb_version != "nightly" and Version(cratedb_version) < Version("6.2"): | ||
| warnings.warn("CrateDB earlier than 6.2 does not support DROP SCHEMA ... CASCADE") |
There was a problem hiding this comment.
this is actually 6.3, not 6.2
| if schemas: | ||
| has_drop_schema_cascade = True | ||
| if "CRATEDB_VERSION" in os.environ: | ||
| cratedb_version = os.environ["CRATEDB_VERSION"] |
There was a problem hiding this comment.
the constructor already gets crate_version, so we should use that
| ], | ||
| argcompletion=['argcomplete'] | ||
| ), | ||
| python_requires='>=3.7', |
There was a problem hiding this comment.
testcontainers needs python 3.10+, so this file should reflect that. It should also be in CHANGES
|
|
||
| isort --check --diff src/crate/ tests/ setup.py | ||
| flake8 src/crate/crash | ||
| export TESTCONTAINERS_RYUK_DISABLED=true |
There was a problem hiding this comment.
with Ryuk off, a failed setup leaves the crate container running. Do we actually need this?
|
|
||
| The tests are run using the `unittest`_ module:: | ||
|
|
||
| export TESTCONTAINERS_RYUK_DISABLED=true |
There was a problem hiding this comment.
if we don't need ryuk, let's remove it from here too
| return Mock(name='fake_connect', side_effect=make_connection) | ||
|
|
||
|
|
||
| def setup_logging(level=logging.INFO, verbose: bool = False): |
| """ | ||
| Return a URL for CrateDB's HTTP endpoint. | ||
|
|
||
| Used to stay backward compatible with the downstream code. |
| python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] | ||
| cratedb-version: ['4.8.4', '5.9.2'] | ||
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | ||
| cratedb-version: ['4.8.4', '5.10.16', '6.3.3'] |
There was a problem hiding this comment.
6.4.6 is the current release; worth bumping here and in the macOS and Windows slots below
|
|
||
| def __init__(self, crate_version: str = "nightly", **kwargs) -> None: | ||
| self.cratedb: Optional[CrateDBContainer] = None | ||
| self.image: str = "crate/crate:{}".format(crate_version) |
There was a problem hiding this comment.
crate/crate release tags are amd64-only, so on an arm Mac this fails or runs emulated; crate/crate:nightly for nightly and the official crate:<version> for releases works on both
Hi. I received such requests multiple times in the past, but I've never been able to find the "Allow edits by maintainers" toggle. Can you provide relevant guidance?
Can you explain what ofc means? |
I couldn't find it either when you asked it the other day 👀
of course I can |
|
ah, your fork is owned by the |

About
Thanks to @surister and @florinutz, the upstream testcontainers package will include an adapter for CrateDB. With this patch, the test suite will start using it.
References