diff --git a/airbyte-ci/connectors/pipelines/README.md b/airbyte-ci/connectors/pipelines/README.md index c24f3bdab49ba..796e16c12c615 100644 --- a/airbyte-ci/connectors/pipelines/README.md +++ b/airbyte-ci/connectors/pipelines/README.md @@ -398,6 +398,7 @@ This command runs the Python tests for a airbyte-ci poetry package. ## Changelog | Version | PR | Description | |---------| --------------------------------------------------------- |-----------------------------------------------------------------------------------------------------------| +| 1.4.6 |[ #31087](https://github.com/airbytehq/airbyte/pull/31087) | Throw error if airbyte-ci tools is out of date | | 1.4.5 | [#31133](https://github.com/airbytehq/airbyte/pull/31133) | Fix bug when building containers using `with_integration_base_java_and_normalization`. | | 1.4.4 | [#30743](https://github.com/airbytehq/airbyte/pull/30743) | Add `--disable-report-auto-open` and `--use-host-gradle-dist-tar` to allow gradle integration. | | 1.4.3 | [#30595](https://github.com/airbytehq/airbyte/pull/30595) | Add --version and version check | diff --git a/airbyte-ci/connectors/pipelines/pipelines/commands/airbyte_ci.py b/airbyte-ci/connectors/pipelines/pipelines/commands/airbyte_ci.py index 7cd3d55903481..b14a4d1a6bada 100644 --- a/airbyte-ci/connectors/pipelines/pipelines/commands/airbyte_ci.py +++ b/airbyte-ci/connectors/pipelines/pipelines/commands/airbyte_ci.py @@ -35,19 +35,27 @@ def check_up_to_date() -> bool: """Check if the installed version of pipelines is up to date.""" - # get the version of the latest release, which is just in the pyproject.toml file of the pipelines package - # as this is an internal tool, we don't need to check for the latest version on PyPI latest_version = get_latest_version() if latest_version != __installed_version__: - main_logger.warning(f"pipelines is not up to date. Installed version: {__installed_version__}. Latest version: {latest_version}") - main_logger.warning("Please run `pipx reinstall pipelines` to upgrade to the latest version.") - return False + upgrade_error_message = f""" + 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 + + airbyte-ci is not up to date. Installed version: {__installed_version__}. Latest version: {latest_version} + Please run `pipx reinstall pipelines` to upgrade to the latest version. + + 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 + """ + raise Exception(upgrade_error_message) main_logger.info(f"pipelines is up to date. Installed version: {__installed_version__}. Latest version: {latest_version}") return True def get_latest_version() -> str: + """ + Get the version of the latest release, which is just in the pyproject.toml file of the pipelines package + as this is an internal tool, we don't need to check for the latest version on PyPI + """ path_to_pyproject_toml = LOCAL_PIPELINE_PACKAGE_PATH + "pyproject.toml" with open(path_to_pyproject_toml, "r") as f: for line in f.readlines(): diff --git a/airbyte-ci/connectors/pipelines/pyproject.toml b/airbyte-ci/connectors/pipelines/pyproject.toml index 7e28fb07aafd3..d2a286ac8f300 100644 --- a/airbyte-ci/connectors/pipelines/pyproject.toml +++ b/airbyte-ci/connectors/pipelines/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "pipelines" -version = "1.4.5" +version = "1.4.6" description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines" authors = ["Airbyte "]