Skip to content

Commit

Permalink
fix: Changed the code the way mysql container is initialized. (feast-…
Browse files Browse the repository at this point in the history
…dev#4140)

* chore: Move feast install to docker build in java it tests (feast-dev#4126)

* chore: Move feast install to docker build in java it tests

Signed-off-by: tokoko <[email protected]>

* remove commented out lines in compose file

Signed-off-by: tokoko <[email protected]>

* make local compose mode default

Signed-off-by: tokoko <[email protected]>

* limit COPY contents

Signed-off-by: tokoko <[email protected]>

* remove requirements.txt from java tests docker image

Signed-off-by: tokoko <[email protected]>

* include pyproject.toml in dockerfile

Signed-off-by: tokoko <[email protected]>

* change links to depends_on

Signed-off-by: tokoko <[email protected]>

* try updating setup-python to v5

Signed-off-by: tokoko <[email protected]>

* pin macos image to macos-12

Signed-off-by: tokoko <[email protected]>

* force rerun

Signed-off-by: tokoko <[email protected]>

---------

Signed-off-by: tokoko <[email protected]>
Signed-off-by: Lokesh Rangineni <[email protected]>

* chore: Incorporate release 0.37.1 to master (feast-dev#4127)

* chore(release): release 0.37.1

## [0.37.1](feast-dev/feast@v0.37.0...v0.37.1) (2024-04-17)

### Bug Fixes

* Pgvector patch ([feast-dev#4108](feast-dev#4108)) ([1a1f0b1](feast-dev@1a1f0b1))

### Reverts

* Reverts "fix: Using version args to install the correct feast version" ([feast-dev#4112](feast-dev#4112)) ([d5ded69](feast-dev@d5ded69)), closes [feast-dev#3953](feast-dev#3953)

* chore: Move feast install to docker build in java it tests (feast-dev#4126)

* chore: Move feast install to docker build in java it tests

Signed-off-by: tokoko <[email protected]>

* remove commented out lines in compose file

Signed-off-by: tokoko <[email protected]>

* make local compose mode default

Signed-off-by: tokoko <[email protected]>

* limit COPY contents

Signed-off-by: tokoko <[email protected]>

* remove requirements.txt from java tests docker image

Signed-off-by: tokoko <[email protected]>

* include pyproject.toml in dockerfile

Signed-off-by: tokoko <[email protected]>

* change links to depends_on

Signed-off-by: tokoko <[email protected]>

* try updating setup-python to v5

Signed-off-by: tokoko <[email protected]>

* pin macos image to macos-12

Signed-off-by: tokoko <[email protected]>

* force rerun

Signed-off-by: tokoko <[email protected]>

---------

Signed-off-by: tokoko <[email protected]>

---------

Signed-off-by: tokoko <[email protected]>
Co-authored-by: feast-ci-bot <[email protected]>
Co-authored-by: Tornike Gurgenidze <[email protected]>
Signed-off-by: Lokesh Rangineni <[email protected]>

* chore: Install python dependencies with uv in workflows (feast-dev#4086)

* install dependencies in unit-tests with uv

Signed-off-by: tokoko <[email protected]>

* install dependencies in unit-tests with uv

Signed-off-by: tokoko <[email protected]>

* enable caching, change linter job

Signed-off-by: tokoko <[email protected]>

* change local integration tests to uv

Signed-off-by: tokoko <[email protected]>

* change all installs to uv

Signed-off-by: tokoko <[email protected]>

* try adding uv cache

Signed-off-by: tokoko <[email protected]>

* fix lambda cache step name

Signed-off-by: tokoko <[email protected]>

* reenable caches for uv

Signed-off-by: tokoko <[email protected]>

* remove dangling cache step

Signed-off-by: tokoko <[email protected]>

---------

Signed-off-by: tokoko <[email protected]>
Signed-off-by: Lokesh Rangineni <[email protected]>

* feat: Make arrow primary interchange for online ODFV execution (feast-dev#4143)

* rewrite online flow to use transform_arrow

Signed-off-by: tokoko <[email protected]>

* fix transformation server

Signed-off-by: tokoko <[email protected]>

---------

Signed-off-by: tokoko <[email protected]>
Signed-off-by: Lokesh Rangineni <[email protected]>

* feat: Feast/IKV online store documentation (feast-dev#4146)

* feat: Feast/IKV online store documentation

Signed-off-by: Pushkar Gupta <[email protected]>

* functionality matric

Signed-off-by: Pushkar Gupta <[email protected]>

* more changes

Signed-off-by: Pushkar Gupta <[email protected]>

* mount dir

Signed-off-by: Pushkar Gupta <[email protected]>

---------

Signed-off-by: Pushkar Gupta <[email protected]>
Signed-off-by: Lokesh Rangineni <[email protected]>

* fix: Default value is not set in Redis connection string using environment variable (feast-dev#4136)

Removed documentation of Redis connection string supporting default values when using environment variables as it isn't supported

Fixes feast-dev#3669

Signed-off-by: Theodor Mihalache <[email protected]>
Signed-off-by: Lokesh Rangineni <[email protected]>

* fix: Make sure schema is used when calling `get_table_query_string` method for Snowflake datasource (feast-dev#4131)

* Fix get_table_query_string method for Snowflake datasource

Signed-off-by: TomSteenbergen <[email protected]>

* Add quotes to table string

Signed-off-by: TomSteenbergen <[email protected]>

---------

Signed-off-by: TomSteenbergen <[email protected]>
Signed-off-by: Lokesh Rangineni <[email protected]>

* fix: Change checkout action back to v3 from v5 which isn't released yet (feast-dev#4147)

Signed-off-by: Jeremy Ary <[email protected]>
Signed-off-by: Lokesh Rangineni <[email protected]>

* changed the code the way mysql container is initialized. Trying to fix the issue - feast-dev#4128
Also going to check if this change will be resolved in the github actions as well.

Signed-off-by: Lokesh Rangineni <[email protected]>

* reformatted the file to resolve lint error.

Signed-off-by: Lokesh Rangineni <[email protected]>

* reformatted the file to resolve lint error.

Signed-off-by: Lokesh Rangineni <[email protected]>

---------

Signed-off-by: tokoko <[email protected]>
Signed-off-by: Lokesh Rangineni <[email protected]>
Signed-off-by: Pushkar Gupta <[email protected]>
Signed-off-by: Theodor Mihalache <[email protected]>
Signed-off-by: TomSteenbergen <[email protected]>
Signed-off-by: Jeremy Ary <[email protected]>
Co-authored-by: Tornike Gurgenidze <[email protected]>
Co-authored-by: Jeremy Ary <[email protected]>
Co-authored-by: feast-ci-bot <[email protected]>
Co-authored-by: Pushkar Gupta <[email protected]>
Co-authored-by: Theodor Mihalache <[email protected]>
Co-authored-by: Tom Steenbergen <[email protected]>
  • Loading branch information
7 people authored Apr 25, 2024
1 parent 811d711 commit 8b5698f
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions sdk/python/tests/unit/test_sql_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from pytest_lazyfixture import lazy_fixture
from testcontainers.core.container import DockerContainer
from testcontainers.core.waiting_utils import wait_for_logs
from testcontainers.mysql import MySqlContainer

from feast import FileSource, RequestSource
from feast.data_format import ParquetFormat
Expand All @@ -41,7 +42,6 @@
POSTGRES_PASSWORD = "test"
POSTGRES_DB = "test"


logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -81,32 +81,20 @@ def pg_registry():

@pytest.fixture(scope="session")
def mysql_registry():
container = (
DockerContainer("mysql:latest")
.with_exposed_ports(3306)
.with_env("MYSQL_RANDOM_ROOT_PASSWORD", "true")
.with_env("MYSQL_USER", POSTGRES_USER)
.with_env("MYSQL_PASSWORD", POSTGRES_PASSWORD)
.with_env("MYSQL_DATABASE", POSTGRES_DB)
)

container = MySqlContainer("mysql:latest")
container.start()

# The log string uses '8.0.*' since the version might be changed as new Docker images are pushed.
log_string_to_wait_for = "/usr/sbin/mysqld: ready for connections. Version: '(\\d+(\\.\\d+){1,2})' socket: '/var/run/mysqld/mysqld.sock' port: 3306" # noqa: W605
waited = wait_for_logs(
container=container,
predicate=log_string_to_wait_for,
timeout=60,
interval=10,
# testing for the database to exist and ready to connect and start testing.
import sqlalchemy

engine = sqlalchemy.create_engine(
container.get_connection_url(), pool_pre_ping=True
)
logger.info("Waited for %s seconds until mysql container was up", waited)
container_port = container.get_exposed_port(3306)
container_host = container.get_container_host_ip()
engine.connect()

registry_config = RegistryConfig(
registry_type="sql",
path=f"mysql+pymysql://{POSTGRES_USER}:{POSTGRES_PASSWORD}@{container_host}:{container_port}/{POSTGRES_DB}",
path=container.get_connection_url(),
sqlalchemy_config_kwargs={"echo": False, "pool_pre_ping": True},
)

Expand Down

0 comments on commit 8b5698f

Please sign in to comment.