-
Notifications
You must be signed in to change notification settings - Fork 25
fix: align datacenter enum with valid real-world targets #336
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
Merged
KAJdev
merged 5 commits into
main
from
zeke/ae-3084-prevent-no-primary-mount-point-error-when-workers-are
Jun 2, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bcad32c
fix: align datacenter enum with valid real-world targets
KAJdev aaeba86
fix: remove linear link
KAJdev 9049b94
Merge branch 'main' into zeke/ae-3084-prevent-no-primary-mount-point-…
KAJdev fba603b
fix: apply gpu and datacenter defaults to image-backed endpoints
KAJdev 0b33db9
Merge branch 'main' into zeke/ae-3084-prevent-no-primary-mount-point-…
deanq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| from enum import Enum | ||
|
|
||
|
|
||
| class DataCenter(str, Enum): | ||
| """Enum representing available RunPod data centers. | ||
|
|
||
| NOTE: these are only datacenters with storage support, and S3 API support. | ||
| """ | ||
|
|
||
| # north america | ||
| US_CA_2 = "US-CA-2" | ||
| US_IL_1 = "US-IL-1" | ||
| US_KS_2 = "US-KS-2" | ||
| US_MO_1 = "US-MO-1" | ||
| US_MO_2 = "US-MO-2" | ||
| US_NC_2 = "US-NC-2" | ||
| US_NE_1 = "US-NE-1" | ||
| US_WA_1 = "US-WA-1" | ||
|
|
||
| # europe | ||
| EU_CZ_1 = "EU-CZ-1" | ||
| EU_RO_1 = "EU-RO-1" | ||
| EUR_NO_1 = "EUR-NO-1" | ||
|
|
||
| @classmethod | ||
| def from_string(cls, value: str) -> "DataCenter": | ||
| """Parse a datacenter ID string into a DataCenter enum. | ||
|
|
||
| Accepts the canonical form (e.g. "EU-RO-1") as well as common | ||
| variations like lowercase or underscore-separated. | ||
| """ | ||
| normalized = value.strip().upper().replace("_", "-") | ||
| try: | ||
| return cls(normalized) | ||
| except ValueError: | ||
| valid = ", ".join(dc.value for dc in cls) | ||
| raise ValueError( | ||
| f"Unknown datacenter '{value}'. Valid datacenters: {valid}" | ||
| ) | ||
|
KAJdev marked this conversation as resolved.
|
||
|
|
||
| @classmethod | ||
| def all(cls) -> list["DataCenter"]: | ||
| """Return all datacenters.""" | ||
| return list(cls) | ||
|
KAJdev marked this conversation as resolved.
|
||
|
|
||
|
|
||
| # data centers that support CPU serverless endpoints | ||
| CPU_DATACENTERS: frozenset[DataCenter] = frozenset( | ||
| { | ||
| DataCenter.EU_RO_1, | ||
| } | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.