Skip to content

Commit 23351f9

Browse files
mwaskommodal-bot
authored andcommitted
Add App version to experimental app_get_lifecycle (#53839)
GitOrigin-RevId: 749e87d250b8dd7446b82d06a5a87145e780b15c
1 parent e82226a commit 23351f9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

py/modal/experimental/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ async def list_deployed_apps(environment_name: str = "", client: _Client | None
105105
class AppLifecycle:
106106
"""Lifecycle information about an App."""
107107

108+
version: int | None # Current version of a deployed App, or None for an ephemeral App
108109
created_at: datetime # Time the App was initially created
109110
created_by: str # User or service user name
110111
deployed_at: datetime | None # Time of the most recent deployment event, if ever deployed
@@ -132,6 +133,7 @@ async def get_app_lifecycle(app_id: str, *, client: _Client | None = None) -> Ap
132133
)
133134
lifecycle = resp.lifecycle
134135
return AppLifecycle(
136+
version=lifecycle.version or None,
135137
created_at=datetime.fromtimestamp(lifecycle.created_at, timezone.utc),
136138
created_by=lifecycle.created_by,
137139
deployed_at=_timestamp_to_datetime(lifecycle.deployed_at),

0 commit comments

Comments
 (0)