Skip to content

Commit

Permalink
šŸ› airbyte-ci: skip archived connectors pre-emptively when using --modā€¦
Browse files Browse the repository at this point in the history
ā€¦ified flag (airbytehq#44786)
  • Loading branch information
ChristoGrab authored Aug 27, 2024
1 parent cb6bf8b commit e911ab8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions airbyte-ci/connectors/pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@ airbyte-ci connectors --language=low-code migrate-to-manifest-only

| Version | PR | Description |
| ------- | ---------------------------------------------------------- |------------------------------------------------------------------------------------------------------------------------------|
| 4.34.2 | [#44786](https://github.com/airbytehq/airbyte/pull/44786) | Pre-emptively skip archived connectors when searching for modified files |
| 4.34.1 | [#44557](https://github.com/airbytehq/airbyte/pull/44557) | Conditionally propagate parameters in manifest-only migration |
| 4.34.0 | [#44551](https://github.com/airbytehq/airbyte/pull/44551) | `connectors publish` do not push the `latest` tag when the current version is a release candidate. |
| 4.33.1 | [#44465](https://github.com/airbytehq/airbyte/pull/44465) | Ignore version check if only erd folder is changed |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ def get_connector_modified_files(connector: Connector, all_modified_files: Set[P


def _find_modified_connectors(
file_path: Union[str, Path], all_connectors: Set[Connector], dependency_scanning: bool = True
file_path: Union[str, Path], active_connectors: Set[Connector], dependency_scanning: bool = True
) -> Set[Connector]:
"""Find all connectors impacted by the file change."""
modified_connectors = set()

for connector in all_connectors:
if connector.support_level == "archived":
main_logger.info(f"Skipping connector '{connector}' due to 'archived' support level.")
continue
for connector in active_connectors:
if Path(file_path).is_relative_to(Path(connector.code_directory)) or file_path == connector.documentation_file_path:
main_logger.info(f"Adding connector '{connector}' due to connector file modification: {file_path}.")
modified_connectors.add(connector)
Expand Down Expand Up @@ -58,9 +55,13 @@ def get_modified_connectors(modified_files: Set[Path], all_connectors: Set[Conne
"""
# Ignore files with certain extensions
modified_connectors = set()
active_connectors = {conn for conn in all_connectors if conn.support_level != "archived"}
main_logger.info(
f"Checking for modified files. Skipping {len(all_connectors) - len(active_connectors)} connectors with support level 'archived'."
)
for modified_file in modified_files:
if not _is_ignored_file(modified_file):
modified_connectors.update(_find_modified_connectors(modified_file, all_connectors, dependency_scanning))
modified_connectors.update(_find_modified_connectors(modified_file, active_connectors, dependency_scanning))
return modified_connectors


Expand Down
2 changes: 1 addition & 1 deletion airbyte-ci/connectors/pipelines/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "pipelines"
version = "4.34.1"
version = "4.34.2"
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
authors = ["Airbyte <[email protected]>"]

Expand Down

0 comments on commit e911ab8

Please sign in to comment.