Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ PYTEST_ADMIN_PASSWORD=start123
PYTEST_DEFAULT_MASTER_IMAGE=python/base
PYTEST_ASYNC_MAX_RETRIES=5
PYTEST_ASYNC_RETRY_DELAY_MILLIS=500
PYTEST_HUB_VERSION=0.16.1
PYTEST_HUB_VERSION=0.18.0
PYTEST_RESPONSE_TIMEOUT=5
22 changes: 20 additions & 2 deletions flame_hub/_core_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import typing as t
import uuid
from datetime import datetime
import warnings

import httpx2 as httpx
import typing_extensions as te
from pydantic import WrapValidator, Field, BeforeValidator
from pydantic import WrapValidator, Field, BeforeValidator, AliasChoices

from flame_hub._auth_client import Realm
from flame_hub._base_client import (
Expand Down Expand Up @@ -279,7 +280,15 @@ class Analysis(CreateAnalysis):
configuration_node_default_valid: bool
configuration_nodes_valid: bool
build_status: ProcessStatus | None
build_nodes_valid: bool
# TODO: Drop build_nodes_valid in favor of distribution_nodes_valid in the next major version.
distribution_nodes_valid: bool = Field(
validation_alias=AliasChoices(
"distribution_nodes_valid",
"distributionNodesValid",
"build_nodes_valid",
"buildNodesValid",
)
)
build_progress: int | None
build_hash: str | None
build_os: str | None
Expand All @@ -298,6 +307,15 @@ class Analysis(CreateAnalysis):
project: t.Annotated[Project | None, IsIncludable] = None
master_image: t.Annotated[MasterImage | None, IsIncludable] = None

@property
def build_nodes_valid(self) -> bool:
warnings.warn(
"'build_nodes_valid' is deprecated, use 'distribution_nodes_valid' instead.",
DeprecationWarning,
stacklevel=2,
)
return self.distribution_nodes_valid


class UpdateAnalysis(CoreBaseModel):
description: str | None | UNSET_T = UNSET
Expand Down
5 changes: 2 additions & 3 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ def _wait_for_analysis_bucket_file():

yield analysis_bucket_file

core_client.delete_analysis_bucket_file(analysis_bucket_file)
storage_client.delete_bucket_file(bucket_file.id)


Expand Down Expand Up @@ -235,8 +234,8 @@ def _check_analysis_logs_present():
def registry(core_client):
new_registry = core_client.create_registry(
name=next_random_string(),
host=next_random_string(),
# account_name=next_random_string(),
host=f"{next_random_string()}.com",
account_name=next_random_string(),
account_secret=next_random_string(),
)
yield new_registry
Expand Down
Loading