Compare commits

...
12 Commits
Author SHA1 Message Date
devx-ci-bot f339df3562 release: v0.45.1 [skip ci] 2026-07-14 12:35:27 +00:00
emil db38453a54 DEVX-139: fix: URL-encode package names and versions in clean_images API calls
Post-merge / detect-and-configure (push) Successful in 18s
Post-merge / release-and-maintain (push) Successful in 1m9s
2026-07-14 12:34:35 +00:00
gitea-actions-bot 5d78377152 chore: update badge URLs to commit 5a9243cc [skip ci] 2026-07-14 01:22:38 +00:00
devx-ci-bot b8b21cccd5 release: v0.45.0 [skip ci] 2026-07-14 01:21:59 +00:00
emil 326eccfd2f DEVX-138: feat: add IO_INTERNAL_CALLS to check_test_isolation
Post-merge / detect-and-configure (push) Successful in 13s
Post-merge / release-and-maintain (push) Successful in 1m8s
2026-07-14 01:21:15 +00:00
gitea-actions-bot 076b470344 chore: update badge URLs to commit 6ee532d4 [skip ci] 2026-07-14 00:55:29 +00:00
devx-ci-bot 53b49ec91c release: v0.44.2 [skip ci] 2026-07-14 00:54:56 +00:00
emil 2cfc0aca10 DEVX-137: fix: use legacy Docker builder to avoid Gitea registry 403
Post-merge / detect-and-configure (push) Successful in 13s
Post-merge / release-and-maintain (push) Successful in 1m1s
2026-07-14 00:54:12 +00:00
gitea-actions-bot 83ea4496e5 chore: update badge URLs to commit 52dfd18c [skip ci] 2026-07-14 00:48:24 +00:00
devx-ci-bot adb94bf96f release: v0.44.1 [skip ci] 2026-07-14 00:47:49 +00:00
emil 32308f2ad8 DEVX-137: fix: disable Docker buildx provenance attestation
Post-merge / detect-and-configure (push) Successful in 14s
Post-merge / release-and-maintain (push) Successful in 1m3s
2026-07-14 00:47:04 +00:00
gitea-actions-bot 5468a6f4af chore: update badge URLs to commit a9cb1ef1 [skip ci] 2026-07-13 23:56:25 +00:00
8 changed files with 86 additions and 22 deletions
+24
View File
@@ -2,6 +2,30 @@
All notable changes to this project will be documented in this file.
## [0.45.1] - 2026-07-14
### Bug Fixes
- URL-encode package names and versions in clean_images API calls
## [0.45.0] - 2026-07-14
### Features
- Add IO_INTERNAL_CALLS to check_test_isolation
## [0.44.2] - 2026-07-14
### Bug Fixes
- Use legacy Docker builder to avoid Gitea registry 403
## [0.44.1] - 2026-07-14
### Bug Fixes
- Disable Docker buildx provenance attestation
## [0.44.0] - 2026-07-13
### Features
+9 -9
View File
@@ -16,12 +16,12 @@ quality badges.
[![CI](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions/workflows/ci.yml/badge.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![License: GPL-3.0](https://img.shields.io/badge/license-GPL--3.0-blue)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/src/branch/master/LICENSE)
[![Coverage](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/coverage.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Tests](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/tests.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Docs](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/docs.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
[![Code Quality](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/quality.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Version](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/version.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
[![Python](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/python.svg)](https://www.python.org/downloads/)
[![Coverage](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/coverage.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Tests](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/tests.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Docs](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/docs.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
[![Code Quality](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/quality.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Version](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/version.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
[![Python](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/python.svg)](https://www.python.org/downloads/)
## Why devx?
@@ -87,7 +87,7 @@ extra index and list devx in your dependencies:
```toml
[project]
dependencies = [
"devx>=0.44.0",
"devx>=0.45.1",
]
[tool.pip]
@@ -101,8 +101,8 @@ pip install -e .
```
> **Note:** If your project requires a specific devx version, pin it in
> `dependencies` (for example, `"devx==0.44.0"`) or use a version constraint
> (for example, `"devx>=0.44.0,<0.45"`).
> `dependencies` (for example, `"devx==0.45.1"`) or use a version constraint
> (for example, `"devx>=0.45.1,<0.46"`).
### Optional extras
+8 -8
View File
@@ -12,12 +12,12 @@ project to be reusable across all oblachno-oss repositories.
[![CI](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions/workflows/ci.yml/badge.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![License: GPL-3.0](https://img.shields.io/badge/license-GPL--3.0-blue)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/src/branch/master/LICENSE)
[![Coverage](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/coverage.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Tests](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/tests.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Docs](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/docs.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
[![Code Quality](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/quality.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Version](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/version.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
[![Python](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/08f1c46f6446a146ea400eb5dd5537da7a8834a1/python.svg)](https://www.python.org/downloads/)
[![Coverage](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/coverage.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Tests](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/tests.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Docs](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/docs.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
[![Code Quality](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/quality.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
[![Version](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/version.svg)](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
[![Python](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/raw/commit/5a9243cc071edcccb12a47208a632e903e29adf7/python.svg)](https://www.python.org/downloads/)
## Overview
@@ -74,14 +74,14 @@ Add devx to your `pyproject.toml` dependencies and configure the registry:
```toml
[project]
dependencies = [
"devx>=0.44.0",
"devx>=0.45.1",
]
[tool.pip]
extra-index-url = "https://git.oblachno.oblachno.fyi/api/packages/oblachno-oss/pypi/simple"
```
Pin a specific version if needed: `"devx==0.44.0"` or `"devx>=0.44.0,<0.45"`.
Pin a specific version if needed: `"devx==0.45.1"` or `"devx>=0.45.1,<0.46"`.
### Optional extras
+2 -2
View File
@@ -48,12 +48,12 @@ Add devx to your `pyproject.toml`:
```toml
[project]
dependencies = [
"devx>=0.44.0",
"devx>=0.45.1",
]
[project.optional-dependencies]
dev = [
"devx>=0.44.0",
"devx>=0.45.1",
]
```
+1 -1
View File
@@ -1,3 +1,3 @@
"""devx — reusable development and CI/CD tools for oblachno-oss projects."""
__version__ = "0.44.0"
__version__ = "0.45.1"
+3
View File
@@ -174,9 +174,12 @@ def build_image(
return True
click.echo(f"Building {spec.name} ({len(full_tags)} tag(s))...")
# Use legacy builder (DOCKER_BUILDKIT=0) to avoid OCI-format manifest
# blobs (attestation, config) that the Gitea registry rejects with 403.
result = subprocess.run( # nosec B603
cmd,
check=False,
env={**os.environ, "DOCKER_BUILDKIT": "0"},
)
if result.returncode != 0:
click.echo(_("Build failed for {name}", name=spec.name), err=True)
+23
View File
@@ -130,6 +130,26 @@ HELPER_INTERNAL_CALLS: dict[str, set[str]] = {
"run_cmd": {"subprocess"},
}
# I/O function internal dependencies: if a test patches one of these
# internal dependencies, the I/O function call is considered safe.
# Maps I/O function name → set of internal function/method names it calls.
IO_INTERNAL_CALLS: dict[str, set[str]] = {
"get_customer_vm_ip": {"get_tofu_output", "get_tofu_vm_ip", "subprocess"},
"get_observability_vm_ip": {"get_tofu_output", "get_tofu_vm_ip", "subprocess"},
"get_pat": {
"_iter_sources",
"_local_pat_path",
"_secrets_path",
"_read_secrets_pat",
"validate_pat",
"ZitadelAuth",
"load_secrets",
"os.environ",
},
"load_secrets": {"load_vault_yaml", "REPO_ROOT", "open", "yaml", "safe_load"},
"get_customer_secret": {"load_customer_secrets", "load_vault_yaml", "load_secrets", "REPO_ROOT", "open"},
}
# subprocess functions that the runtime audit wraps.
_SUBPROCESS_FUNCS = ("run", "call", "check_call", "check_output", "Popen")
@@ -817,6 +837,9 @@ class TestIsolationVisitor(ast.NodeVisitor):
or sn in all_patches
or any(io_key in p or sn in p for p in all_patches)
or any(p.endswith(f".{sn}") for p in all_patches)
or any(
dep in all_patches or any(dep in p for p in all_patches) for dep in IO_INTERNAL_CALLS.get(io_key, set())
)
):
self.violations.append(
Violation(
+16 -2
View File
@@ -5,6 +5,13 @@ Queries the Gitea API for all versions of a package (container type) and
deletes all but the most recent N versions. The ``latest`` tag is always
preserved if present.
.. note::
This tool only deletes package versions via the Gitea API. The underlying
blob files on the Gitea server's filesystem are NOT removed by this tool
(Gitea 1.26.x has no built-in garbage collection). The production VM's
daily cleanup script (``cleanup_gitea.py``) handles filesystem blob GC
by querying the database for referenced blobs and removing orphaned files.
Usage::
# Clean up ci-base images, keep last 2 versions
@@ -57,7 +64,10 @@ def list_package_versions(
Returns a list of version dicts, each containing at least ``version``
and ``created_at`` fields.
"""
url = f"{api_url}/packages/{owner}?type=container&name={name}"
from urllib.parse import quote
encoded_name = quote(name, safe="")
url = f"{api_url}/packages/{owner}?type=container&name={encoded_name}"
headers = {"Authorization": f"token {token}"}
all_versions: list[dict[str, Any]] = []
page = 1
@@ -96,7 +106,11 @@ def delete_package_version(
Returns True on success, False on failure.
"""
url = f"{api_url}/packages/{owner}/{package_type}/{name}/{version}"
from urllib.parse import quote
encoded_name = quote(name, safe="")
encoded_version = quote(version, safe="")
url = f"{api_url}/packages/{owner}/{package_type}/{encoded_name}/{encoded_version}"
headers = {"Authorization": f"token {token}"}
for attempt in range(max_retries):
try: