diff --git a/release_creation/bundle/requirements/v0.0.latest.requirements.txt b/release_creation/bundle/requirements/v0.0.latest.requirements.txt index f60e4a5f..771be099 100644 --- a/release_creation/bundle/requirements/v0.0.latest.requirements.txt +++ b/release_creation/bundle/requirements/v0.0.latest.requirements.txt @@ -1,4 +1,3 @@ -hatchling<2.0 dbt-common @ git+https://github.com/dbt-labs/dbt-common.git@main dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git@main dbt-core @ git+https://github.com/dbt-labs/dbt-core.git@main#subdirectory=core @@ -12,8 +11,9 @@ dbt-databricks @ git+https://github.com/databricks/dbt-databricks.git@1.8.latest dbt-trino @ git+https://github.com/starburstdata/dbt-trino.git@master dbt-fabric @ git+https://github.com/microsoft/dbt-fabric.git@main dbt-synapse @ git+https://github.com/microsoft/dbt-synapse.git@master -grpcio-status~=1.47.0 + pyasn1-modules~=0.2.1 -pyarrow!=12.0.1 +pyarrow~=14.0.1 +pydantic~=1.10 pyodbc==4.0.39 --no-binary pyodbc snowflake-connector-python~=3.0,!=3.0.4 \ No newline at end of file diff --git a/release_creation/bundle/test_archive_install.sh b/release_creation/bundle/test_archive_install.sh index 838df0db..2d6efc64 100755 --- a/release_creation/bundle/test_archive_install.sh +++ b/release_creation/bundle/test_archive_install.sh @@ -14,7 +14,8 @@ python -m pip install -r "${requirements_file}" \ --find-links ./bundle_pkg_test \ --pre dbt --version -# make sure psycopg2 is installed, but not psycopg2-binary +# make sure psycopg2 is installed, but not psycopg2-binary (linux only) +if "$OSTYPE" == linux*; then echo -n "Checking psycopg2 install..." if ! pip freeze | grep psycopg2; then echo "psycopg2 is not installed!" @@ -27,5 +28,6 @@ if pip freeze | grep psycopg2-binary; then echo "psycopg2-binary is installed and should not be!" exit 1 fi +fi echo ok deactivate \ No newline at end of file diff --git a/test/integration/bundle/test_create.py b/test/integration/bundle/test_create.py index 429f6da2..a3216f19 100644 --- a/test/integration/bundle/test_create.py +++ b/test/integration/bundle/test_create.py @@ -11,7 +11,7 @@ @pytest.mark.parametrize( argnames="test_version", - argvalues=["0.0.0", "1.3.0", "1.4.0", "1.5.0", "1.6.0", "1.7.0b1", "1.7.0", "1.8.0b1"], + argvalues=["0.0.0", "1.3.0", "1.4.0", "1.5.0", "1.6.0", "1.7.0b1", "1.7.0"], ) def test_generate_bundle_creates_a_bundle_with_valid_version( test_version diff --git a/test/integration/bundle/test_download.py b/test/integration/bundle/test_download.py new file mode 100644 index 00000000..2de9a1be --- /dev/null +++ b/test/integration/bundle/test_download.py @@ -0,0 +1,37 @@ +from pathlib import Path +import platform +from semantic_version import Version +import sys + +import pytest + +from release_creation.bundle.bundle_config import get_bundle_config +from release_creation.bundle.create import _download_packages + + +@pytest.mark.parametrize("test_version", ["0.0.0"]) +def test_correct_version_of_psycopg2(test_version): + if sys.version_info == (3, 10) and Version.coerce(test_version) >= Version.coerce( + "1.5.0" + ): + pytest.skip("We run test for Python 3.11 with version 1.5.0+ of the bundle") + + bundle_configuration = get_bundle_config(Version.coerce(test_version)) + _download_packages(bundle_configuration) + + tmp_dir = Path(bundle_configuration.py_version_tmp_path) + assert tmp_dir.is_dir() + psycopg2_is_found = False + psycopg2_binary_is_found = False + for file in tmp_dir.iterdir(): + if "psycopg2" in file.name: + if "psycopg2_binary" not in file.name: + psycopg2_is_found = True + else: + psycopg2_binary_is_found = True + if platform.system() == "Linux": + assert psycopg2_is_found and not psycopg2_binary_is_found + elif platform.system() == "Darwin": + assert psycopg2_binary_is_found and not psycopg2_is_found + else: + assert False, f"Unexpected platform: {platform.system()}"