Skip to content

Commit 1c2eab7

Browse files
authored
airbyte-ci: avoid transient publish to PyPi failures (#42034)
1 parent 601c3c4 commit 1c2eab7

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

airbyte-ci/connectors/pipelines/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,7 @@ airbyte-ci connectors --language=low-code migrate-to-manifest-only
790790

791791
| Version | PR | Description |
792792
| ------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
793+
| 4.32.1 | [#41642](https://github.com/airbytehq/airbyte/pull/41642) | Avoid transient publish failures by increasing `POETRY_REQUESTS_TIMEOUT` and setting retries on `PublishToPythonRegistry`. |
793794
| 4.32.0 | [#43969](https://github.com/airbytehq/airbyte/pull/43969) | Add an `--ignore-connector` option to `up-to-date` |
794795
| 4.31.5 | [#43934](https://github.com/airbytehq/airbyte/pull/43934) | Track deleted files when generating pull-request |
795796
| 4.31.4 | [#43724](https://github.com/airbytehq/airbyte/pull/43724) | Do not send slack message on connector pre-release. |

airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/steps/python_registry.py

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class PackageType(Enum):
2626
class PublishToPythonRegistry(Step):
2727
context: PythonRegistryPublishContext
2828
title = "Publish package to python registry"
29+
max_retries = 3
2930

3031
def _get_base_container(self) -> Container:
3132
return with_poetry(self.context)
@@ -120,6 +121,10 @@ async def _poetry_publish(self, package_dir_to_publish: Directory) -> StepResult
120121
.with_env_variable("CACHEBUSTER", str(uuid.uuid4()))
121122
.with_exec(["poetry", "config", "repositories.mypypi", self.context.registry])
122123
.with_exec(sh_dash_c(["poetry config pypi-token.mypypi $PYTHON_REGISTRY_TOKEN"]))
124+
# Default timeout is set to 15 seconds
125+
# We sometime face 443 HTTP read timeout responses from PyPi
126+
# Setting it to 60 seconds to avoid transient publish failures
127+
.with_env_variable("POETRY_REQUESTS_TIMEOUT", "60")
123128
.with_exec(sh_dash_c(["poetry publish --build --repository mypypi -vvv --no-interaction"]))
124129
)
125130

airbyte-ci/connectors/pipelines/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "pipelines"
7-
version = "4.32.0"
7+
version = "4.32.1"
88
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
99
authors = ["Airbyte <[email protected]>"]
1010

airbyte-ci/connectors/pipelines/tests/test_commands/test_groups/test_connectors.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,11 @@ def test_get_selected_connectors_with_modified_and_support_level():
154154
metadata_query=None,
155155
modified_files=modified_files,
156156
)
157-
158-
assert len(selected_connectors) == 1
157+
has_strict_encrypt_variant = any("-strict-encrypt" in c.technical_name for c in selected_connectors)
158+
if has_strict_encrypt_variant:
159+
assert len(selected_connectors) == 2
160+
else:
161+
assert len(selected_connectors) == 1
159162
assert selected_connectors[0].technical_name == second_modified_connector.technical_name
160163

161164

0 commit comments

Comments
 (0)