Skip to content

Commit 12e1c60

Browse files
committed
chore: remove scwgw check as variable are not propagated in subprocess.run
1 parent 64ca2a0 commit 12e1c60

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.github/workflows/integration-gateway.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
run: poetry run scwgw deploy
2525
env:
2626
SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }}
27+
SCW_DEFAULT_PROJECT_ID: ${{ secrets.SCW_DEFAULT_PROJECT_ID }}
2728
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
2829
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
2930

@@ -44,6 +45,7 @@ jobs:
4445
poetry run pytest integrations/gateway -n $(nproc --all)
4546
env:
4647
SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }}
48+
SCW_DEFAULT_PROJECT_ID: ${{ secrets.SCW_DEFAULT_PROJECT_ID }}
4749
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
4850
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
4951

@@ -65,5 +67,6 @@ jobs:
6567
run: poetry run scwgw delete
6668
env:
6769
SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }}
70+
SCW_DEFAULT_PROJECT_ID: ${{ secrets.SCW_DEFAULT_PROJECT_ID }}
6871
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
6972
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}

scw_serverless/gateway/serverless_gateway.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,16 @@ class ServerlessGateway:
1515

1616
def __init__(self) -> None:
1717
cli = shutil.which(GATEWAY_CLI)
18+
1819
if not cli:
1920
click.secho(
2021
"scwgw was not found in $PATH, "
2122
+ "you can install scwgw by running: pip install scwgw",
2223
fg="red",
2324
)
2425
raise RuntimeError("scwgw is not installed")
25-
self.cli = cli
2626

27-
# Verify that the CLI is installed and working
28-
cmd = self._invoke_cli(["check"])
29-
for line in cmd.stdout.splitlines():
30-
if "status" in line and not line.endswith("ready"):
31-
click.secho(f"scwgw is not ready: {line}", fg="red")
32-
raise RuntimeError("scwgw is not ready")
27+
self.cli = cli
3328

3429
def _invoke_cli(self, args: list[str]) -> subprocess.CompletedProcess:
3530
cmd = subprocess.run(

0 commit comments

Comments
 (0)