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 <togurg14@freeuni.edu.ge>

* remove commented out lines in compose file

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* make local compose mode default

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* limit COPY contents

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* remove requirements.txt from java tests docker image

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* include pyproject.toml in dockerfile

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* change links to depends_on

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* try updating setup-python to v5

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* pin macos image to macos-12

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* force rerun

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

---------

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>
Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>

* 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 <togurg14@freeuni.edu.ge>

* remove commented out lines in compose file

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* make local compose mode default

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* limit COPY contents

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* remove requirements.txt from java tests docker image

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* include pyproject.toml in dockerfile

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* change links to depends_on

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* try updating setup-python to v5

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* pin macos image to macos-12

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* force rerun

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

---------

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

---------

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>
Co-authored-by: feast-ci-bot <feast-ci-bot@willem.co>
Co-authored-by: Tornike Gurgenidze <togurg14@freeuni.edu.ge>
Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>

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

* install dependencies in unit-tests with uv

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* install dependencies in unit-tests with uv

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* enable caching, change linter job

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* change local integration tests to uv

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* change all installs to uv

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* try adding uv cache

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* fix lambda cache step name

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* reenable caches for uv

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* remove dangling cache step

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

---------

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>
Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>

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

* rewrite online flow to use transform_arrow

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* fix transformation server

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

---------

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>
Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>

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

* feat: Feast/IKV online store documentation

Signed-off-by: Pushkar Gupta <pushkar.moi@gmail.com>

* functionality matric

Signed-off-by: Pushkar Gupta <pushkar.moi@gmail.com>

* more changes

Signed-off-by: Pushkar Gupta <pushkar.moi@gmail.com>

* mount dir

Signed-off-by: Pushkar Gupta <pushkar.moi@gmail.com>

---------

Signed-off-by: Pushkar Gupta <pushkar.moi@gmail.com>
Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>

* 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 <tmihalac@redhat.com>
Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>

* 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 <tomsteenbergen1995@gmail.com>

* Add quotes to table string

Signed-off-by: TomSteenbergen <tomsteenbergen1995@gmail.com>

---------

Signed-off-by: TomSteenbergen <tomsteenbergen1995@gmail.com>
Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>

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

Signed-off-by: Jeremy Ary <jary@redhat.com>
Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>

* 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 <lokeshforjava@gmail.com>

* reformatted the file to resolve lint error.

Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>

* reformatted the file to resolve lint error.

Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>

---------

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>
Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>
Signed-off-by: Pushkar Gupta <pushkar.moi@gmail.com>
Signed-off-by: Theodor Mihalache <tmihalac@redhat.com>
Signed-off-by: TomSteenbergen <tomsteenbergen1995@gmail.com>
Signed-off-by: Jeremy Ary <jary@redhat.com>
Co-authored-by: Tornike Gurgenidze <togurg14@freeuni.edu.ge>
Co-authored-by: Jeremy Ary <jary@redhat.com>
Co-authored-by: feast-ci-bot <feast-ci-bot@willem.co>
Co-authored-by: Pushkar Gupta <pushkar.moi@gmail.com>
Co-authored-by: Theodor Mihalache <84387487+tmihalac@users.noreply.github.com>
Co-authored-by: Tom Steenbergen <41334387+TomSteenbergen@users.noreply.github.com>
  • Loading branch information
7 people committed Apr 25, 2024
1 parent fb6d0e5 commit d089b0b
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 d089b0b

Please sign in to comment.