Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that environment exists when setting in config #2578

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

mwaskom
Copy link
Contributor

@mwaskom mwaskom commented Nov 26, 2024

Super simple, fixes #2086

image

Changelog

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

@@ -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)}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related but when confirming that we can still set a valid environment I noticed that the modal config show output was hard to read because it was unordered.

@mwaskom mwaskom requested a review from devennavani November 26, 2024 22:47
@mwaskom
Copy link
Contributor Author

mwaskom commented Nov 26, 2024

@prbot approve

Copy link

@modal-pr-review-automation modal-pr-review-automation bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 👍. @devennavani will follow-up review this.

@mwaskom mwaskom merged commit 6751f25 into main Nov 26, 2024
23 checks passed
@mwaskom mwaskom deleted the michael/2024-11-26-check-environment-exists branch November 26, 2024 22:52
Copy link
Contributor

@devennavani devennavani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No check if environment exists when setting it by default
2 participants