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

Add DE Proxy #1678

Merged
merged 4 commits into from
Jan 30, 2025
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""add_RESIDENTIAL_DE_proxy

Revision ID: 5dd8928389c5
Revises: df80b5d155d0
Create Date: 2025-01-29 05:54:03.709008+00:00

"""

from typing import Sequence, Union

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "5dd8928389c5"
down_revision: Union[str, None] = "df80b5d155d0"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.execute("ALTER TYPE proxylocation ADD VALUE 'RESIDENTIAL_DE'")
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
# Cannot remove enum values in PostgreSQL
pass
# ### end Alembic commands ###
1 change: 1 addition & 0 deletions skyvern-frontend/src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const ProxyLocation = {
ResidentialJP: "RESIDENTIAL_JP",
ResidentialGB: "RESIDENTIAL_GB",
ResidentialFR: "RESIDENTIAL_FR",
ResidentialDE: "RESIDENTIAL_DE",
None: "NONE",
} as const;

Expand Down
3 changes: 3 additions & 0 deletions skyvern-frontend/src/components/ProxySelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ function ProxySelector({ value, onChange, className }: Props) {
<SelectItem value={ProxyLocation.ResidentialFR}>
Residential (France)
</SelectItem>
<SelectItem value={ProxyLocation.ResidentialDE}>
Residential (Germany)
</SelectItem>
</SelectContent>
</Select>
);
Expand Down
6 changes: 5 additions & 1 deletion skyvern/forge/sdk/schemas/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ProxyLocation(StrEnum):
RESIDENTIAL_IN = "RESIDENTIAL_IN"
RESIDENTIAL_JP = "RESIDENTIAL_JP"
RESIDENTIAL_FR = "RESIDENTIAL_FR"
RESIDENTIAL_DE = "RESIDENTIAL_DE"
NONE = "NONE"


Expand Down Expand Up @@ -63,11 +64,14 @@ def get_tzinfo_from_proxy(proxy_location: ProxyLocation) -> ZoneInfo | None:
return ZoneInfo("Asia/Kolkata")

if proxy_location == ProxyLocation.RESIDENTIAL_JP:
return ZoneInfo("Asia/Kolkata")
return ZoneInfo("Asia/Tokyo")

if proxy_location == ProxyLocation.RESIDENTIAL_FR:
return ZoneInfo("Europe/Paris")

if proxy_location == ProxyLocation.RESIDENTIAL_DE:
return ZoneInfo("Europe/Berlin")

return None


Expand Down