foxops 2.3.2__tar.gz → 2.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {foxops-2.3.2 → foxops-2.3.4}/PKG-INFO +12 -13
- {foxops-2.3.2 → foxops-2.3.4}/pyproject.toml +12 -12
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/routers/changes.py +19 -14
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/services/change.py +6 -3
- {foxops-2.3.2 → foxops-2.3.4}/LICENSE +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/README.md +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/__main__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/database/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/database/engine.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/database/repositories/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/database/repositories/change.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/database/repositories/incarnation/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/database/repositories/incarnation/errors.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/database/repositories/incarnation/model.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/database/repositories/incarnation/repository.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/database/schema.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/dependencies.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/__main__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/custom_filters.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/errors.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/initialization.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/models/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/models/incarnation_state.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/models/template_config.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/patching/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/patching/git_diff_patch.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/rendering.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/engine/update.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/error_handlers.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/errors.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/external/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/external/git.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/hosters/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/hosters/gitlab.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/hosters/local.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/hosters/types.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/logger.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/middlewares.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/models/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/models/change.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/models/errors.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/models/incarnation.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/openapi.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/routers/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/routers/auth.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/routers/incarnations.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/routers/not_found.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/routers/version.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/services/__init__.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/services/incarnation.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/settings.py +0 -0
- {foxops-2.3.2 → foxops-2.3.4}/src/foxops/utils.py +0 -0
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: foxops
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.4
|
|
4
4
|
Summary: Foxops 🦊
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: Alexander Hungenberg
|
|
7
7
|
Author-email: alexander.hungenberg@roche.com
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.12,<4.0
|
|
9
9
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
12
|
Requires-Dist: Jinja2 (>=3.0.3,<4.0.0)
|
|
14
13
|
Requires-Dist: SQLAlchemy[asyncio] (>=2.0.2,<3.0.0)
|
|
15
|
-
Requires-Dist: aiopath (>=0.
|
|
16
|
-
Requires-Dist: aiosqlite (>=0.
|
|
14
|
+
Requires-Dist: aiopath (>=0.7.7,<0.8.0)
|
|
15
|
+
Requires-Dist: aiosqlite (>=0.20.0,<0.21.0)
|
|
17
16
|
Requires-Dist: alembic[tz] (>=1.8.1,<2.0.0)
|
|
18
|
-
Requires-Dist: asyncpg (>=0.
|
|
19
|
-
Requires-Dist: fastapi (>=0.
|
|
20
|
-
Requires-Dist: greenlet (>=
|
|
21
|
-
Requires-Dist: httpx (>=0.
|
|
17
|
+
Requires-Dist: asyncpg (>=0.29.0,<0.30.0)
|
|
18
|
+
Requires-Dist: fastapi (>=0.115.0)
|
|
19
|
+
Requires-Dist: greenlet (>=3.1.1,<4.0.0)
|
|
20
|
+
Requires-Dist: httpx (>=0.27.2,<0.28.0)
|
|
22
21
|
Requires-Dist: pydantic (>=2.3.0,<3.0.0)
|
|
23
22
|
Requires-Dist: pydantic-settings (>=2.0.3,<3.0.0)
|
|
24
23
|
Requires-Dist: ruamel.yaml (>=0.17.20,<0.18.0)
|
|
25
|
-
Requires-Dist: structlog (>=
|
|
26
|
-
Requires-Dist: tenacity (>=
|
|
27
|
-
Requires-Dist: typer (>=0.
|
|
28
|
-
Requires-Dist: uvicorn (>=0.
|
|
24
|
+
Requires-Dist: structlog (>=24.4.0,<25.0.0)
|
|
25
|
+
Requires-Dist: tenacity (>=9.0.0,<10.0.0)
|
|
26
|
+
Requires-Dist: typer (>=0.12.5,<0.13.0)
|
|
27
|
+
Requires-Dist: uvicorn (>=0.31.0,<0.32.0)
|
|
29
28
|
Description-Content-Type: text/markdown
|
|
30
29
|
|
|
31
30
|
# foxops 🦊
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "foxops"
|
|
3
3
|
# managed by poetry-dynamic-versioning, do not change.
|
|
4
|
-
version = "2.3.
|
|
4
|
+
version = "2.3.4"
|
|
5
5
|
description = "Foxops 🦊"
|
|
6
6
|
license = "Apache-2.0"
|
|
7
7
|
authors = [
|
|
@@ -14,28 +14,28 @@ readme = "README.md"
|
|
|
14
14
|
fengine = 'foxops.engine.__main__:app'
|
|
15
15
|
|
|
16
16
|
[tool.poetry.dependencies]
|
|
17
|
-
python = ">=3.
|
|
17
|
+
python = ">=3.12,<4.0"
|
|
18
18
|
|
|
19
19
|
# Web Framework
|
|
20
|
-
uvicorn = "^0.
|
|
21
|
-
fastapi = "
|
|
20
|
+
uvicorn = "^0.31.0"
|
|
21
|
+
fastapi = ">=0.115.0"
|
|
22
22
|
|
|
23
23
|
# Auxiliary
|
|
24
|
-
httpx = "^0.
|
|
25
|
-
tenacity = "^
|
|
24
|
+
httpx = "^0.27.2"
|
|
25
|
+
tenacity = "^9.0.0"
|
|
26
26
|
pydantic = "^2.3.0"
|
|
27
|
-
structlog = "^
|
|
28
|
-
aiopath = "^0.
|
|
27
|
+
structlog = "^24.4.0"
|
|
28
|
+
aiopath = "^0.7.7"
|
|
29
29
|
|
|
30
30
|
# Database
|
|
31
31
|
SQLAlchemy = {extras = ["asyncio"], version = "^2.0.2"}
|
|
32
|
-
asyncpg = "^0.
|
|
33
|
-
aiosqlite = "^0.
|
|
32
|
+
asyncpg = "^0.29.0"
|
|
33
|
+
aiosqlite = "^0.20.0"
|
|
34
34
|
alembic = {extras = ["tz"], version = "^1.8.1"}
|
|
35
|
-
greenlet = "^
|
|
35
|
+
greenlet = "^3.1.1"
|
|
36
36
|
|
|
37
37
|
# CLI
|
|
38
|
-
typer = "^0.
|
|
38
|
+
typer = "^0.12.5"
|
|
39
39
|
|
|
40
40
|
# Business
|
|
41
41
|
"ruamel.yaml" = "^0.17.20"
|
|
@@ -16,25 +16,30 @@ from foxops.services.change import CannotRepairChangeException, ChangeService
|
|
|
16
16
|
router = APIRouter()
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
async def
|
|
19
|
+
async def get_change_id(
|
|
20
20
|
incarnation_id: Annotated[int, Path()],
|
|
21
21
|
revision: Annotated[int, Path(description="Change revision within the given incarnation")],
|
|
22
22
|
change_service: Annotated[ChangeService, Depends(get_change_service)],
|
|
23
|
-
) ->
|
|
23
|
+
) -> int:
|
|
24
24
|
try:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
match (change_type := await change_service.get_change_type(change_id)):
|
|
28
|
-
case DatabaseChangeType.MERGE_REQUEST:
|
|
29
|
-
return await change_service.get_change_with_merge_request(change_id)
|
|
30
|
-
case DatabaseChangeType.DIRECT:
|
|
31
|
-
return await change_service.get_change(change_id)
|
|
32
|
-
case _:
|
|
33
|
-
raise NotImplementedError(f"Unknown change type {change_type}")
|
|
25
|
+
return await change_service.get_change_id_by_revision(incarnation_id, revision)
|
|
34
26
|
except ChangeNotFoundError:
|
|
35
27
|
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Change not found")
|
|
36
28
|
|
|
37
29
|
|
|
30
|
+
async def get_change(
|
|
31
|
+
change_id: Annotated[int, Depends(get_change_id)],
|
|
32
|
+
change_service: Annotated[ChangeService, Depends(get_change_service)],
|
|
33
|
+
) -> Change | ChangeWithMergeRequest:
|
|
34
|
+
match (change_type := await change_service.get_change_type(change_id)):
|
|
35
|
+
case DatabaseChangeType.MERGE_REQUEST:
|
|
36
|
+
return await change_service.get_change_with_merge_request(change_id)
|
|
37
|
+
case DatabaseChangeType.DIRECT:
|
|
38
|
+
return await change_service.get_change(change_id)
|
|
39
|
+
case _:
|
|
40
|
+
raise NotImplementedError(f"Unknown change type {change_type}")
|
|
41
|
+
|
|
42
|
+
|
|
38
43
|
class CreateChangeType(enum.Enum):
|
|
39
44
|
DIRECT = "direct"
|
|
40
45
|
MERGE_REQUEST_MANUAL = "merge_request_manual"
|
|
@@ -142,10 +147,10 @@ async def get_change_details(
|
|
|
142
147
|
},
|
|
143
148
|
)
|
|
144
149
|
async def fix_incomplete_change(
|
|
145
|
-
|
|
146
|
-
change_service: ChangeService
|
|
150
|
+
change_id: Annotated[int, Depends(get_change_id)],
|
|
151
|
+
change_service: Annotated[ChangeService, Depends(get_change_service)],
|
|
147
152
|
):
|
|
148
153
|
try:
|
|
149
|
-
await change_service.update_incomplete_change(
|
|
154
|
+
await change_service.update_incomplete_change(change_id)
|
|
150
155
|
except CannotRepairChangeException as e:
|
|
151
156
|
raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=str(e))
|
|
@@ -449,7 +449,7 @@ class ChangeService:
|
|
|
449
449
|
if not change.commit_pushed:
|
|
450
450
|
raise IncompleteChange(
|
|
451
451
|
"the given change is in an incomplete state (commit_pushed=False). "
|
|
452
|
-
"Try
|
|
452
|
+
f"Try 'POST /api/incarnations/{change.incarnation_id}/changes/{change.revision}/fix'"
|
|
453
453
|
)
|
|
454
454
|
|
|
455
455
|
return Change(
|
|
@@ -472,8 +472,11 @@ class ChangeService:
|
|
|
472
472
|
|
|
473
473
|
if change_in_db.type != ChangeType.MERGE_REQUEST:
|
|
474
474
|
raise ValueError(f"Change {change_id} is not a merge request change.")
|
|
475
|
-
|
|
476
|
-
|
|
475
|
+
if change_in_db.merge_request_id is None or change_in_db.merge_request_branch_name is None:
|
|
476
|
+
raise IncompleteChange(
|
|
477
|
+
"the given change is in an incomplete state (MR ID/Branch = null). "
|
|
478
|
+
f"Try 'POST /api/incarnations/{change_in_db.incarnation_id}/changes/{change_in_db.revision}/fix'"
|
|
479
|
+
)
|
|
477
480
|
|
|
478
481
|
status = await self._hoster.get_merge_request_status(
|
|
479
482
|
incarnation_repository=incarnation_in_db.incarnation_repository,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|