Skip to content

Commit 7ed533a

Browse files
committed
Merge branch 'master' into 7635-add-exemplars-to-prometheus-metrics
2 parents 98244c4 + 3595349 commit 7ed533a

File tree

355 files changed

+16936
-5958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

355 files changed

+16936
-5958
lines changed

.env-devel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ DIRECTOR_V2_LOGLEVEL=INFO
119119
DIRECTOR_V2_NODE_PORTS_STORAGE_AUTH=null
120120
DIRECTOR_V2_PORT=8000
121121
DIRECTOR_V2_PROFILING=1
122-
DIRECTOR_V2_PUBLIC_API_BASE_URL=http://127.0.0.1:8006
123122
DIRECTOR_V2_SERVICES_CUSTOM_CONSTRAINTS=[]
124123
DIRECTOR_V2_DOCKER_HUB_REGISTRY=null
125124
DYNAMIC_SIDECAR_ENABLE_VOLUME_LIMITS=False

.eslintignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

api/specs/web-server/_computations.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
from _common import as_query
44
from fastapi import APIRouter, Depends, status
5+
from fastapi_pagination import Page
56
from models_library.api_schemas_webserver.computations import (
67
ComputationGet,
78
ComputationPathParams,
9+
ComputationRunPathParams,
810
ComputationRunRestGet,
11+
ComputationRunWithFiltersListQueryParams,
912
ComputationStart,
1013
ComputationStarted,
1114
ComputationTaskRestGet,
@@ -65,16 +68,26 @@ async def stop_computation(_path: Annotated[ComputationPathParams, Depends()]):
6568

6669
@router.get(
6770
"/computations/-/iterations/latest",
68-
response_model=Envelope[list[ComputationRunRestGet]],
71+
response_model=Page[ComputationRunRestGet],
6972
)
7073
async def list_computations_latest_iteration(
74+
_query: Annotated[as_query(ComputationRunWithFiltersListQueryParams), Depends()],
75+
): ...
76+
77+
78+
@router.get(
79+
"/computations/{project_id}/iterations",
80+
response_model=Page[ComputationRunRestGet],
81+
)
82+
async def list_computation_iterations(
7183
_query: Annotated[as_query(ComputationRunListQueryParams), Depends()],
84+
_path: Annotated[ComputationRunPathParams, Depends()],
7285
): ...
7386

7487

7588
@router.get(
7689
"/computations/{project_id}/iterations/latest/tasks",
77-
response_model=Envelope[list[ComputationTaskRestGet]],
90+
response_model=Page[ComputationTaskRestGet],
7891
)
7992
async def list_computations_latest_iteration_tasks(
8093
_query: Annotated[as_query(ComputationTaskListQueryParams), Depends()],

eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
ignores: [
3+
"services/static-webserver/client/source/resource/",
4+
"services/static-webserver/client/source-output/",
5+
]
6+
};

packages/aws-library/requirements/_base.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
aio-pika==9.5.5
22
# via -r requirements/../../../packages/service-library/requirements/_base.in
3-
aioboto3==14.1.0
3+
aioboto3==14.3.0
44
# via -r requirements/_base.in
5-
aiobotocore==2.21.1
5+
aiobotocore==2.22.0
66
# via aioboto3
77
aiocache==0.12.3
88
# via
@@ -57,9 +57,9 @@ attrs==25.1.0
5757
# aiohttp
5858
# jsonschema
5959
# referencing
60-
boto3==1.37.1
60+
boto3==1.37.3
6161
# via aiobotocore
62-
botocore==1.37.1
62+
botocore==1.37.3
6363
# via
6464
# aiobotocore
6565
# boto3

packages/aws-library/requirements/_test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ aws-xray-sdk==2.14.0
2020
# via moto
2121
blinker==1.9.0
2222
# via flask
23-
boto3==1.37.1
23+
boto3==1.37.3
2424
# via
2525
# -c requirements/_base.txt
2626
# aws-sam-translator
2727
# moto
28-
botocore==1.37.1
28+
botocore==1.37.3
2929
# via
3030
# -c requirements/_base.txt
3131
# aws-xray-sdk
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import ipaddress
2+
3+
4+
def is_ip_address(host: str) -> bool:
5+
try:
6+
ipaddress.ip_address(host)
7+
return True
8+
except ValueError:
9+
return False
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import pytest
2+
from common_library.network import is_ip_address
3+
4+
5+
@pytest.mark.parametrize(
6+
"host, expected",
7+
[
8+
("127.0.0.1", True),
9+
("::1", True),
10+
("192.168.1.1", True),
11+
("2001:0db8:85a3:0000:0000:8a2e:0370:7334", True),
12+
("256.256.256.256", False),
13+
("invalid_host", False),
14+
("", False),
15+
("1234:5678:9abc:def0:1234:5678:9abc:defg", False),
16+
],
17+
)
18+
def test_is_ip_address(host: str, expected: bool):
19+
assert is_ip_address(host) == expected

packages/models-library/src/models_library/api_schemas_directorv2/comp_runs.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from datetime import datetime
2-
from typing import Annotated, Any, NamedTuple
2+
from typing import Any, NamedTuple
33

4+
from models_library.services_types import ServiceRunID
45
from pydantic import (
6+
AnyUrl,
57
BaseModel,
6-
BeforeValidator,
78
ConfigDict,
89
PositiveInt,
910
)
@@ -62,20 +63,16 @@ class ComputationRunRpcGetPage(NamedTuple):
6263
total: PositiveInt
6364

6465

65-
def _none_to_zero_float_pre_validator(value: Any):
66-
if value is None:
67-
return 0.0
68-
return value
69-
70-
7166
class ComputationTaskRpcGet(BaseModel):
7267
project_uuid: ProjectID
7368
node_id: NodeID
7469
state: RunningState
75-
progress: Annotated[float, BeforeValidator(_none_to_zero_float_pre_validator)]
70+
progress: float
7671
image: dict[str, Any]
7772
started_at: datetime | None
7873
ended_at: datetime | None
74+
log_download_link: AnyUrl | None
75+
service_run_id: ServiceRunID
7976

8077
model_config = ConfigDict(
8178
json_schema_extra={
@@ -92,6 +89,8 @@ class ComputationTaskRpcGet(BaseModel):
9289
},
9390
"started_at": "2023-01-11 13:11:47.293595",
9491
"ended_at": "2023-01-11 13:11:47.293595",
92+
"log_download_link": "https://example.com/logs",
93+
"service_run_id": "comp_1_12e0c8b2-bad6-40fb-9948-8dec4f65d4d9_1",
9594
}
9695
]
9796
}

packages/models-library/src/models_library/api_schemas_directorv2/computations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ class ComputationCreate(BaseModel):
4444
Field(description="if True the computation pipeline will start right away"),
4545
] = False
4646
product_name: Annotated[str, Field()]
47+
product_api_base_url: Annotated[
48+
AnyHttpUrl,
49+
Field(description="Base url of the product"),
50+
]
4751
subgraph: Annotated[
4852
list[NodeID] | None,
4953
Field(

0 commit comments

Comments
 (0)