Skip to content

Commit

Permalink
fix (airbyte-ci): include advanced_auth in spec migration (#48404)
Browse files Browse the repository at this point in the history
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
ChristoGrab and octavia-squidington-iii authored Nov 7, 2024
1 parent e165b01 commit b0f541b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
5 changes: 3 additions & 2 deletions airbyte-ci/connectors/pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -850,9 +850,10 @@ airbyte-ci connectors --language=low-code migrate-to-manifest-only

| Version | PR | Description |
| ------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| 4.42.1 | [#47316](https://github.com/airbytehq/airbyte/pull/47316) | Connector testing: skip incremental acceptance test when the connector is not released. |
| 4.42.2 | [#48404](https://github.com/airbytehq/airbyte/pull/48404) | Include `advanced_auth` in spec migration for manifest-only pipeline |
| 4.42.1 | [#47316](https://github.com/airbytehq/airbyte/pull/47316) | Connector testing: skip incremental acceptance test when the connector is not released. |
| 4.42.0 | [#47386](https://github.com/airbytehq/airbyte/pull/47386) | Version increment check: make sure consecutive RC remain on the same version. |
| 4.41.9 | [#47483](https://github.com/airbytehq/airbyte/pull/47483) | Fix build logic used in `up-to-date` to support any connector language. |
| 4.41.9 | [#47483](https://github.com/airbytehq/airbyte/pull/47483) | Fix build logic used in `up-to-date` to support any connector language. |
| 4.41.8 | [#47447](https://github.com/airbytehq/airbyte/pull/47447) | Use `cache_ttl` for base image registry listing in `up-to-date`. |
| 4.41.7 | [#47444](https://github.com/airbytehq/airbyte/pull/47444) | Remove redundant `--ignore-connector` error from up-to-date. `--metadata-query` can be used instead. |
| 4.41.6 | [#47308](https://github.com/airbytehq/airbyte/pull/47308) | Connector testing: skip incremental acceptance test when the connector is not released. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"components.py",
"metadata.yaml",
"icon.svg",
"unit_tests",
"integration_tests",
"acceptance-test-config.yml",
"secrets",
Expand Down Expand Up @@ -160,7 +161,12 @@ def _read_spec_from_file(self, spec_file: Path) -> dict:

documentation_url = spec.get("documentationUrl") or spec.get("documentation_url")
connection_specification = spec.get("connection_specification") or spec.get("connectionSpecification")
return {"documentation_url": documentation_url, "connection_specification": connection_specification}
advanced_auth = spec.get("advanced_auth")
return {
"documentation_url": documentation_url,
"connection_specification": connection_specification,
"advanced_auth": advanced_auth,
}

except Exception as e:
raise ValueError(f"Failed to read data in spec file: {e}")
Expand All @@ -183,7 +189,7 @@ async def _run(self) -> StepResult:
## 2. Update the version in manifest.yaml
try:
manifest = read_yaml(root_manifest_path)
manifest["version"] = "4.3.2"
manifest["version"] = "5.15.0"
manifest["type"] = "DeclarativeSource"

# Resolve $parameters and types with CDK magic
Expand Down Expand Up @@ -211,6 +217,7 @@ async def _run(self) -> StepResult:
"type": "Spec",
"documentation_url": spec_data.get("documentation_url"),
"connection_specification": spec_data.get("connection_specification"),
"advanced_auth": spec_data.get("advanced_auth"),
}
write_yaml(manifest, root_manifest_path)
except Exception as e:
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.42.1"
version = "4.42.2"
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
authors = ["Airbyte <contact@airbyte.io>"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,28 @@ def context(dagger_client: Client):


@pytest.mark.parametrize(
"package_path, package_name, expected_asset",
"package_path, package_name, version, expected_asset",
[
pytest.param(
"airbyte-integrations/connectors/source-apify-dataset",
"airbyte-source-apify-dataset",
"airbyte_source_apify_dataset-0.2.0-py3-none-any.whl",
"airbyte-integrations/connectors/source-fauna",
"airbyte-source-fauna",
"1.0.0",
"airbyte_source_fauna-1.0.0-py3-none-any.whl",
id="setup.py project",
),
pytest.param(
"airbyte-integrations/connectors/destination-duckdb",
"destination-duckdb",
"0.2.0",
"destination_duckdb-0.2.0-py3-none-any.whl",
id="poetry project",
),
],
)
async def test_run_poetry_publish(context: PythonRegistryPublishContext, package_path: str, package_name: str, expected_asset: str):
context.package_metadata = PythonPackageMetadata(package_name, "0.2.0")
async def test_run_poetry_publish(
context: PythonRegistryPublishContext, package_path: str, package_name: str, version: str, expected_asset: str
):
context.package_metadata = PythonPackageMetadata(package_name, version)
context.package_path = package_path
pypi_registry = (
# need to use linux/amd64 because the pypiserver image is only available for that platform
Expand Down

0 comments on commit b0f541b

Please sign in to comment.