Skip to content

Commit

Permalink
Merge branch 'main' into rohan/doc
Browse files Browse the repository at this point in the history
  • Loading branch information
freider authored Nov 27, 2024
2 parents e4db861 + a1760e2 commit ea62db8
Show file tree
Hide file tree
Showing 13 changed files with 180 additions and 183 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/pr-autoapprove.yml

This file was deleted.

71 changes: 0 additions & 71 deletions .github/workflows/pr_autoapprove.py

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ We appreciate your patience while we speedily work towards a stable release of t

<!-- NEW CONTENT GENERATED BELOW. PLEASE PRESERVE THIS COMMENT. -->

### 0.66.49 (2024-11-26)

- `modal config set-environment` will now raise if the requested environment does not exist.



### 0.66.45 (2024-11-26)

- The `modal launch` CLI now accepts a `--detach` flag to run the App in detached mode, such that it will persist after the local client disconnects.
Expand Down
9 changes: 7 additions & 2 deletions modal/_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,14 @@ async def loader():
raise NotFoundError(exc.message)
raise

# Check that the id of functions and classes didn't change
# Check that the id of functions didn't change
# Persisted refs are ignored because their life cycle is managed independently.
if not obj._is_another_app and existing_object_id is not None and obj.object_id != existing_object_id:
if (
not obj._is_another_app
and existing_object_id is not None
and existing_object_id.startswith("fu-")
and obj.object_id != existing_object_id
):
raise Exception(
f"Tried creating an object using existing id {existing_object_id}"
f" but it has id {obj.object_id}"
Expand Down
3 changes: 3 additions & 0 deletions modal/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from rich.console import Console

from modal.config import _profile, _store_user_config, config
from modal.environments import Environment

config_cli = typer.Typer(
name="config",
Expand Down Expand Up @@ -38,6 +39,8 @@ def show(redact: bool = typer.Option(True, help="Redact the `token_secret` value

@config_cli.command(help=SET_DEFAULT_ENV_HELP)
def set_environment(environment_name: str):
# Confirm that the environment exists by looking it up
Environment.lookup(environment_name)
_store_user_config({"environment": environment_name})
typer.echo(f"New default environment for profile {_profile}: {environment_name}")

Expand Down
2 changes: 1 addition & 1 deletion modal/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def __repr__(self):
return repr(self.to_dict())

def to_dict(self):
return {key: self.get(key) for key in _SETTINGS.keys()}
return {key: self.get(key) for key in sorted(_SETTINGS)}


config = Config()
Expand Down
Loading

0 comments on commit ea62db8

Please sign in to comment.