Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moto server implementation for pytest #223

Merged
merged 10 commits into from
Dec 19, 2023

Conversation

sebpretzer
Copy link
Contributor

This is the PR relating to #222.

This should be a drop in replacement for moto.mock_s3, by pointing the s3 clients at a moto server endpoint url.

By doing this, you can:

  1. Remove the patch to aiobotocore
  2. Remove the requirement of using pyiceberg.io.fsspec.FsspecFileIO over the default of pyiceberg.io.pyarrow.PyArrowFileIO.

Glue and DynamoDB still use the basic mock_glue and mock_dynamodb. They could probably be moved over to the sever implementation as well, but it was taking more work than I wanted so I didn't include it.

@Fokko
Copy link
Contributor

Fokko commented Dec 18, 2023

cc @HonahX since he's the original author of the Glue catalog

Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fix @sebpretzer! It is great that we can finally get rid of the _patch_aiobotocore and use PyarrowFileIO in the unit tests!

@Fokko Fokko changed the title moto server implementation for pytest Moto server implementation for pytest Dec 19, 2023
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @sebpretzer 🙌 and thanks for the review @HonahX

@Fokko Fokko merged commit 584709f into apache:main Dec 19, 2023
6 checks passed
@sebpretzer sebpretzer deleted the moto_server_implementation branch December 19, 2023 15:26
sungwy pushed a commit to sungwy/iceberg-python that referenced this pull request Jan 13, 2024
* adding moto server dependency

* change test harness to moto server

* fixing mypy issues

* making glue data catalog a factory

* reverting unnecessary moto server clients

* reverting to simplest implementation of moto server with s3 only

* clean up dynamodb variable overwrite

* fixing failed test

* dropping for default port
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.

3 participants