Skip to content
Open
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: 2 additions & 0 deletions nuon/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .app_app_branch_config import AppAppBranchConfig
from .app_app_branch_install_group import AppAppBranchInstallGroup
from .app_app_branch_run import AppAppBranchRun
from .app_app_branch_run_type import AppAppBranchRunType
from .app_app_break_glass_config import AppAppBreakGlassConfig
from .app_app_config import AppAppConfig
from .app_app_config_status import AppAppConfigStatus
Expand Down Expand Up @@ -754,6 +755,7 @@
"AppAppBranchConfig",
"AppAppBranchInstallGroup",
"AppAppBranchRun",
"AppAppBranchRunType",
"AppAppBreakGlassConfig",
"AppAppConfig",
"AppAppConfigStatus",
Expand Down
46 changes: 41 additions & 5 deletions nuon/models/app_app_branch_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from attrs import define as _attrs_define
from attrs import field as _attrs_field

from ..models.app_app_branch_run_type import AppAppBranchRunType
from ..types import UNSET, Unset

if TYPE_CHECKING:
Expand Down Expand Up @@ -37,20 +38,24 @@ class AppAppBranchRun:
created_by (AppAccount | Unset):
created_by_id (str | Unset):
error_message (str | Unset): ErrorMessage stores any error that occurred during execution
event_type (str | Unset): EventType indicates what triggered this run (push, pull_request, manual).
force (bool | Unset): Force indicates if this run was forced (bypassing change detection)
event_type (str | Unset): EventType indicates what triggered this run. Kept for backward compat; new code uses
RunType.
force (bool | Unset):
github_comment_id (int | Unset):
head_sha (str | Unset):
id (str | Unset):
labels (GithubComNuoncoNuonPkgLabelsLabels | Unset):
log_stream (AppLogStream | Unset):
log_stream_id (str | Unset): LogStreamID is the log stream created during this run for event tracking
plan_only (bool | Unset): PlanOnly indicates this is a preview run (e.g., PR preview) that should
only plan changes without applying them.
pr_number (int | Unset): PR metadata — populated when EventType is "pull_request"
no_config_changes (bool | Unset):
plan_only (bool | Unset): PlanOnly indicates this is a preview run. Kept for backward compat; new code uses
RunType.
pr_number (int | Unset):
previous_run (AppAppBranchRun | Unset):
previous_run_id (str | Unset): PreviousRunID links to the previous successful run on the same branch,
used for build diffing to determine which components need rebuilding.
queue_signal (AppQueueSignal | Unset):
run_type (AppAppBranchRunType | Unset):
started_at (str | Unset): StartedAt tracks when execution actually began
status (str | Unset): Status tracks the current state of the run
Values: pending, running, success, failed, cancelled
Expand All @@ -72,16 +77,19 @@ class AppAppBranchRun:
error_message: str | Unset = UNSET
event_type: str | Unset = UNSET
force: bool | Unset = UNSET
github_comment_id: int | Unset = UNSET
head_sha: str | Unset = UNSET
id: str | Unset = UNSET
labels: GithubComNuoncoNuonPkgLabelsLabels | Unset = UNSET
log_stream: AppLogStream | Unset = UNSET
log_stream_id: str | Unset = UNSET
no_config_changes: bool | Unset = UNSET
plan_only: bool | Unset = UNSET
pr_number: int | Unset = UNSET
previous_run: AppAppBranchRun | Unset = UNSET
previous_run_id: str | Unset = UNSET
queue_signal: AppQueueSignal | Unset = UNSET
run_type: AppAppBranchRunType | Unset = UNSET
started_at: str | Unset = UNSET
status: str | Unset = UNSET
updated_at: str | Unset = UNSET
Expand Down Expand Up @@ -121,6 +129,8 @@ def to_dict(self) -> dict[str, Any]:

force = self.force

github_comment_id = self.github_comment_id

head_sha = self.head_sha

id = self.id
Expand All @@ -135,6 +145,8 @@ def to_dict(self) -> dict[str, Any]:

log_stream_id = self.log_stream_id

no_config_changes = self.no_config_changes

plan_only = self.plan_only

pr_number = self.pr_number
Expand All @@ -149,6 +161,10 @@ def to_dict(self) -> dict[str, Any]:
if not isinstance(self.queue_signal, Unset):
queue_signal = self.queue_signal.to_dict()

run_type: str | Unset = UNSET
if not isinstance(self.run_type, Unset):
run_type = self.run_type.value

started_at = self.started_at

status = self.status
Expand Down Expand Up @@ -192,6 +208,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["event_type"] = event_type
if force is not UNSET:
field_dict["force"] = force
if github_comment_id is not UNSET:
field_dict["github_comment_id"] = github_comment_id
if head_sha is not UNSET:
field_dict["head_sha"] = head_sha
if id is not UNSET:
Expand All @@ -202,6 +220,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["log_stream"] = log_stream
if log_stream_id is not UNSET:
field_dict["log_stream_id"] = log_stream_id
if no_config_changes is not UNSET:
field_dict["no_config_changes"] = no_config_changes
if plan_only is not UNSET:
field_dict["plan_only"] = plan_only
if pr_number is not UNSET:
Expand All @@ -212,6 +232,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["previous_run_id"] = previous_run_id
if queue_signal is not UNSET:
field_dict["queue_signal"] = queue_signal
if run_type is not UNSET:
field_dict["run_type"] = run_type
if started_at is not UNSET:
field_dict["started_at"] = started_at
if status is not UNSET:
Expand Down Expand Up @@ -278,6 +300,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

force = d.pop("force", UNSET)

github_comment_id = d.pop("github_comment_id", UNSET)

head_sha = d.pop("head_sha", UNSET)

id = d.pop("id", UNSET)
Expand All @@ -298,6 +322,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

log_stream_id = d.pop("log_stream_id", UNSET)

no_config_changes = d.pop("no_config_changes", UNSET)

plan_only = d.pop("plan_only", UNSET)

pr_number = d.pop("pr_number", UNSET)
Expand All @@ -318,6 +344,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
else:
queue_signal = AppQueueSignal.from_dict(_queue_signal)

_run_type = d.pop("run_type", UNSET)
run_type: AppAppBranchRunType | Unset
if isinstance(_run_type, Unset):
run_type = UNSET
else:
run_type = AppAppBranchRunType(_run_type)

started_at = d.pop("started_at", UNSET)

status = d.pop("status", UNSET)
Expand Down Expand Up @@ -353,16 +386,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
error_message=error_message,
event_type=event_type,
force=force,
github_comment_id=github_comment_id,
head_sha=head_sha,
id=id,
labels=labels,
log_stream=log_stream,
log_stream_id=log_stream_id,
no_config_changes=no_config_changes,
plan_only=plan_only,
pr_number=pr_number,
previous_run=previous_run,
previous_run_id=previous_run_id,
queue_signal=queue_signal,
run_type=run_type,
started_at=started_at,
status=status,
updated_at=updated_at,
Expand Down
10 changes: 10 additions & 0 deletions nuon/models/app_app_branch_run_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from enum import Enum


class AppAppBranchRunType(str, Enum):
GIT_PREVIEW_RUN = "git-preview-run"
GIT_RUN = "git-run"
MANUAL_RUN = "manual-run"

def __str__(self) -> str:
return str(self.value)
18 changes: 18 additions & 0 deletions nuon/models/app_app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from ..models.app_composite_status import AppCompositeStatus
from ..models.app_vcs_connection_commit import AppVCSConnectionCommit
from ..models.blobstore_blob import BlobstoreBlob
from ..models.github_com_nuonco_nuon_pkg_labels_labels import GithubComNuoncoNuonPkgLabelsLabels


T = TypeVar("T", bound="AppAppConfig")
Expand All @@ -51,6 +52,7 @@ class AppAppConfig:
input_ (AppAppInputConfig | Unset):
intermediate_config (BlobstoreBlob | Unset):
kubernetes_contexts (AppAppKubernetesContextsConfig | Unset):
labels (GithubComNuoncoNuonPkgLabelsLabels | Unset):
operation_role_config (AppAppOperationRoleConfig | Unset):
org_id (str | Unset):
permissions (AppAppPermissionsConfig | Unset):
Expand Down Expand Up @@ -85,6 +87,7 @@ class AppAppConfig:
input_: AppAppInputConfig | Unset = UNSET
intermediate_config: BlobstoreBlob | Unset = UNSET
kubernetes_contexts: AppAppKubernetesContextsConfig | Unset = UNSET
labels: GithubComNuoncoNuonPkgLabelsLabels | Unset = UNSET
operation_role_config: AppAppOperationRoleConfig | Unset = UNSET
org_id: str | Unset = UNSET
permissions: AppAppPermissionsConfig | Unset = UNSET
Expand Down Expand Up @@ -160,6 +163,10 @@ def to_dict(self) -> dict[str, Any]:
if not isinstance(self.kubernetes_contexts, Unset):
kubernetes_contexts = self.kubernetes_contexts.to_dict()

labels: dict[str, Any] | Unset = UNSET
if not isinstance(self.labels, Unset):
labels = self.labels.to_dict()

operation_role_config: dict[str, Any] | Unset = UNSET
if not isinstance(self.operation_role_config, Unset):
operation_role_config = self.operation_role_config.to_dict()
Expand Down Expand Up @@ -247,6 +254,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["intermediate_config"] = intermediate_config
if kubernetes_contexts is not UNSET:
field_dict["kubernetes_contexts"] = kubernetes_contexts
if labels is not UNSET:
field_dict["labels"] = labels
if operation_role_config is not UNSET:
field_dict["operation_role_config"] = operation_role_config
if org_id is not UNSET:
Expand Down Expand Up @@ -300,6 +309,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.app_composite_status import AppCompositeStatus
from ..models.app_vcs_connection_commit import AppVCSConnectionCommit
from ..models.blobstore_blob import BlobstoreBlob
from ..models.github_com_nuonco_nuon_pkg_labels_labels import GithubComNuoncoNuonPkgLabelsLabels

d = dict(src_dict)
action_ids = cast(list[str], d.pop("action_ids", UNSET))
Expand Down Expand Up @@ -375,6 +385,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
else:
kubernetes_contexts = AppAppKubernetesContextsConfig.from_dict(_kubernetes_contexts)

_labels = d.pop("labels", UNSET)
labels: GithubComNuoncoNuonPkgLabelsLabels | Unset
if isinstance(_labels, Unset):
labels = UNSET
else:
labels = GithubComNuoncoNuonPkgLabelsLabels.from_dict(_labels)

_operation_role_config = d.pop("operation_role_config", UNSET)
operation_role_config: AppAppOperationRoleConfig | Unset
if isinstance(_operation_role_config, Unset):
Expand Down Expand Up @@ -474,6 +491,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
input_=input_,
intermediate_config=intermediate_config,
kubernetes_contexts=kubernetes_contexts,
labels=labels,
operation_role_config=operation_role_config,
org_id=org_id,
permissions=permissions,
Expand Down
13 changes: 12 additions & 1 deletion nuon/models/service_create_app_config_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,18 @@ class ServiceCreateAppConfigRequest:
app_branch_id (str | Unset): AppBranchID optionally links this config to an app branch.
When set, triggers an app branch run after sync.
cli_version (str | Unset):
intermediate_config_json (str | Unset): IntermediateConfigJSON is the serialized intermediate config (parsed
nuon.toml).
When provided, stored on the AppConfig for diffing in PR previews.
plan_only (bool | Unset): PlanOnly creates a preview run (plan without apply). Only used with AppBranchID.
readme (str | Unset): not required Readme
readme (str | Unset):
skip_notification (bool | Unset): SkipNotification suppresses the app-config-synced signal emission.
Used when creating a config as part of app deletion cleanup.
"""

app_branch_id: str | Unset = UNSET
cli_version: str | Unset = UNSET
intermediate_config_json: str | Unset = UNSET
plan_only: bool | Unset = UNSET
readme: str | Unset = UNSET
skip_notification: bool | Unset = UNSET
Expand All @@ -36,6 +40,8 @@ def to_dict(self) -> dict[str, Any]:

cli_version = self.cli_version

intermediate_config_json = self.intermediate_config_json

plan_only = self.plan_only

readme = self.readme
Expand All @@ -49,6 +55,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["app_branch_id"] = app_branch_id
if cli_version is not UNSET:
field_dict["cli_version"] = cli_version
if intermediate_config_json is not UNSET:
field_dict["intermediate_config_json"] = intermediate_config_json
if plan_only is not UNSET:
field_dict["plan_only"] = plan_only
if readme is not UNSET:
Expand All @@ -65,6 +73,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

cli_version = d.pop("cli_version", UNSET)

intermediate_config_json = d.pop("intermediate_config_json", UNSET)

plan_only = d.pop("plan_only", UNSET)

readme = d.pop("readme", UNSET)
Expand All @@ -74,6 +84,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
service_create_app_config_request = cls(
app_branch_id=app_branch_id,
cli_version=cli_version,
intermediate_config_json=intermediate_config_json,
plan_only=plan_only,
readme=readme,
skip_notification=skip_notification,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "nuon"
version = "0.19.1043"
version = "0.19.1044"
description = "A client library for accessing Nuon"
authors = []
requires-python = ">=3.11"
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.19.1043
0.19.1044
Loading