From fba94e27b0f64652b46b3c0ba8b51a1faedec0c1 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Thu, 30 Jan 2025 06:10:40 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'skyvern/'?= =?UTF-8?q?=20with=20remote=20'skyvern/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - **Add org index to the actions table** - **Add DE Proxy** ---- > [!IMPORTANT] > Add support for 'RESIDENTIAL_DE' proxy location across database, configuration, proxy management, and frontend components. > > - **Database**: > - Add 'RESIDENTIAL_DE' to `proxylocation` enum in `add_residential_de_proxy.py`. > - **Configuration**: > - Add `WEBSHARE_IO_RESIDENTIAL_PROXY_USERNAME_DE` to `CloudSettings` in `config.py`. > - Update `job-definition-production.json`, `job-definition-staging.json`, `observer-definition-production.json`, `observer-definition-staging.json`, `task-definition-staging.json`, `worker-staging-terraform/temporal_worker.tf`, `worker-terraform/temporal_worker.tf`, `workflow-job-definition-production.json`, and `workflow-job-definition-staging.json` to include `WEBSHARE_IO_RESIDENTIAL_PROXY_USERNAME_DE`. > - **Proxy Management**: > - Add `RESIDENTIAL_DE` to `ProxyLocation` in `proxy.py` and handle it in `build_proxy_config_webshare_io()` and `build_proxy_config()`. > - **Frontend**: > - Add `ResidentialDE` to `ProxyLocation` in `types.ts`. > - Update `ProxySelector.tsx` to include 'Residential (Germany)'. > - **Miscellaneous**: > - Update `get_tzinfo_from_proxy()` in `tasks.py` to return `ZoneInfo("Europe/Berlin")` for `RESIDENTIAL_DE`. > > This description was created by [Ellipsis](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral) for b0ca88184450448608fe17f2880c3d0dfd2748cc. It will automatically update as commits are pushed. --- skyvern/forge/sdk/schemas/tasks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/skyvern/forge/sdk/schemas/tasks.py b/skyvern/forge/sdk/schemas/tasks.py index 47e0da2f46..104383a7a3 100644 --- a/skyvern/forge/sdk/schemas/tasks.py +++ b/skyvern/forge/sdk/schemas/tasks.py @@ -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" @@ -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 From 484b4e028377dd249d463d73b42a52e3db5aff88 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Thu, 30 Jan 2025 06:10:40 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'skyvern-fr?= =?UTF-8?q?ontend/src/'=20with=20remote=20'skyvern-frontend/src/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - **Add org index to the actions table** - **Add DE Proxy** ---- > [!IMPORTANT] > Add support for 'RESIDENTIAL_DE' proxy location across database, configuration, proxy management, and frontend components. > > - **Database**: > - Add 'RESIDENTIAL_DE' to `proxylocation` enum in `add_residential_de_proxy.py`. > - **Configuration**: > - Add `WEBSHARE_IO_RESIDENTIAL_PROXY_USERNAME_DE` to `CloudSettings` in `config.py`. > - Update `job-definition-production.json`, `job-definition-staging.json`, `observer-definition-production.json`, `observer-definition-staging.json`, `task-definition-staging.json`, `worker-staging-terraform/temporal_worker.tf`, `worker-terraform/temporal_worker.tf`, `workflow-job-definition-production.json`, and `workflow-job-definition-staging.json` to include `WEBSHARE_IO_RESIDENTIAL_PROXY_USERNAME_DE`. > - **Proxy Management**: > - Add `RESIDENTIAL_DE` to `ProxyLocation` in `proxy.py` and handle it in `build_proxy_config_webshare_io()` and `build_proxy_config()`. > - **Frontend**: > - Add `ResidentialDE` to `ProxyLocation` in `types.ts`. > - Update `ProxySelector.tsx` to include 'Residential (Germany)'. > - **Miscellaneous**: > - Update `get_tzinfo_from_proxy()` in `tasks.py` to return `ZoneInfo("Europe/Berlin")` for `RESIDENTIAL_DE`. > > This description was created by [Ellipsis](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral) for b0ca88184450448608fe17f2880c3d0dfd2748cc. It will automatically update as commits are pushed. --- skyvern-frontend/src/api/types.ts | 1 + skyvern-frontend/src/components/ProxySelector.tsx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/skyvern-frontend/src/api/types.ts b/skyvern-frontend/src/api/types.ts index 07479917ec..7a9236405b 100644 --- a/skyvern-frontend/src/api/types.ts +++ b/skyvern-frontend/src/api/types.ts @@ -37,6 +37,7 @@ export const ProxyLocation = { ResidentialJP: "RESIDENTIAL_JP", ResidentialGB: "RESIDENTIAL_GB", ResidentialFR: "RESIDENTIAL_FR", + ResidentialDE: "RESIDENTIAL_DE", None: "NONE", } as const; diff --git a/skyvern-frontend/src/components/ProxySelector.tsx b/skyvern-frontend/src/components/ProxySelector.tsx index dfe1b05d79..a55840b064 100644 --- a/skyvern-frontend/src/components/ProxySelector.tsx +++ b/skyvern-frontend/src/components/ProxySelector.tsx @@ -39,6 +39,9 @@ function ProxySelector({ value, onChange, className }: Props) { Residential (France) + + Residential (Germany) + ); From b1d93fc15d983201672a07fb966a6b2c12204300 Mon Sep 17 00:00:00 2001 From: Suchintan Singh Date: Thu, 30 Jan 2025 09:41:43 -0500 Subject: [PATCH 3/3] migration --- ...4-5dd8928389c5_add_residential_de_proxy.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 alembic/versions/2025_01_29_0554-5dd8928389c5_add_residential_de_proxy.py diff --git a/alembic/versions/2025_01_29_0554-5dd8928389c5_add_residential_de_proxy.py b/alembic/versions/2025_01_29_0554-5dd8928389c5_add_residential_de_proxy.py new file mode 100644 index 0000000000..7663c0a866 --- /dev/null +++ b/alembic/versions/2025_01_29_0554-5dd8928389c5_add_residential_de_proxy.py @@ -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 ###