-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
up-to-date/base-image: cache dockerhub image listing (#47447)
## What * Problems:`up-to-date`: to find the latest base image we have to list all the base images available and fetch their digest. If this operation is not cached it can easily lead to DockerHub rate limiting issue. * Solution: Add a `cache_ttl_seconds` parameters to cache the interaction with the `crane` client. In `up-to-date` we set this cache TTL to 1 day. This pull request introduces a caching mechanism to avoid DockerHub rate limiting and updates various files to support this new feature. The most important changes include adding a cache TTL for base image listings, updating the `CraneClient` and related methods to accept a cache TTL, and adding logging for digest fetching. ### Caching Mechanism: * [`airbyte-ci/connectors/base_images/README.md`](diffhunk://#diff-2e343fda68ecd85f5023c98f7f9a41af2125e7e1cc12d545bc13ace788a4d075R97-R99): Added a changelog entry for version 1.1.0, mentioning the cache TTL addition. * [`airbyte-ci/connectors/base_images/base_images/utils/docker.py`](diffhunk://#diff-d92863e5bd18b276dba43c00c727c4f54d65193740f2044c7929948652e2d1b3L38-R48): Modified the `CraneClient` class to accept a `cache_ttl_seconds` parameter and updated the `bare_container` initialization to use this TTL. * [`airbyte-ci/connectors/base_images/base_images/version_registry.py`](diffhunk://#diff-2b84383522cacca9880ff1dae76f40d08ec437c59208cd856e41f63971f4340dL108-R140): Updated methods to pass the `cache_ttl_seconds` parameter to the `CraneClient`. [[1]](diffhunk://#diff-2b84383522cacca9880ff1dae76f40d08ec437c59208cd856e41f63971f4340dL108-R140) [[2]](diffhunk://#diff-2b84383522cacca9880ff1dae76f40d08ec437c59208cd856e41f63971f4340dL144-R152) [[3]](diffhunk://#diff-2b84383522cacca9880ff1dae76f40d08ec437c59208cd856e41f63971f4340dL249-R274) [[4]](diffhunk://#diff-2b84383522cacca9880ff1dae76f40d08ec437c59208cd856e41f63971f4340dL267-R293) * [`airbyte-ci/connectors/pipelines/README.md`](diffhunk://#diff-62eccd92928fbcd3d285983bfdaa2b0d4ca49016cb9c2f63d6d9fc968c59c541R853): Documented the use of `cache_ttl` for base image registry listing in version 4.41.8. * [`airbyte-ci/connectors/pipelines/pyproject.toml`](diffhunk://#diff-087e2c37602bbd6824f875004abddcb4e1a374da12bf84201671ed0900882ce0L7-R7): Bumped the version to 4.41.8. ### Logging Enhancements: * [`airbyte-ci/connectors/base_images/base_images/utils/docker.py`](diffhunk://#diff-d92863e5bd18b276dba43c00c727c4f54d65193740f2044c7929948652e2d1b3R90-R95): Added logging statements for digest fetching to help identify bottlenecks and improve debugging.
- Loading branch information
1 parent
6988679
commit b4496f0
Showing
7 changed files
with
51 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "airbyte-connectors-base-images" | ||
version = "1.0.4" | ||
version = "1.1.0" | ||
description = "This package is used to generate and publish the base images for Airbyte Connectors." | ||
authors = ["Augustin Lafanechere <[email protected]>"] | ||
readme = "README.md" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" | |
|
||
[tool.poetry] | ||
name = "pipelines" | ||
version = "4.41.7" | ||
version = "4.41.8" | ||
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines" | ||
authors = ["Airbyte <[email protected]>"] | ||
|
||
|