Skip to content

Commit

Permalink
integration test reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahwooders committed May 9, 2023
1 parent adf47b2 commit 457670a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 23 deletions.
59 changes: 36 additions & 23 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,9 @@ env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SKYPLANE_USAGE_STATS_ENABLED: 0
jobs:
integration:
install:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
pairs:
# AWS to AWS
- aws:us-east-1 aws:us-east-1
- aws:us-east-2 aws:us-west-2
# GCP to GCP
- gcp:us-central1-a gcp:us-central1-a
- gcp:us-west1-a gcp:us-east1-a
# Azure to Azure
- azure:westus azure:westus
- azure:eastus azure:westus
# cross cloud tests
- aws:us-west-1 gcp:us-west2-a
- gcp:us-west2-a aws:us-west-1
- aws:us-west-1 azure:westus
- azure:westus aws:us-west-1
- gcp:us-west2-a azure:westus
- azure:westus gcp:us-west2-a
timeout-minutes: 40
env:
STRATEGY_UUID: itest-${{ github.run_id }}-${{ github.run_attempt }}-${{ strategy.job-index }}
Expand Down Expand Up @@ -65,15 +46,47 @@ jobs:
cat ~/.skyplane/config
poetry run skyplane init -y
poetry run skyplane config set usage_stats false
- name: Test
run: poetry run python tests/integration/cp.py ${{ matrix.pairs }}
runner:
needs: [install]
max-parallel: 1
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
pairs:
# AWS to AWS
- aws:us-east-1 aws:us-east-1
- aws:us-east-2 aws:us-west-2
# GCP to GCP
- gcp:us-central1-a gcp:us-central1-a
- gcp:us-west1-a gcp:us-east1-a
# Azure to Azure
- azure:westus azure:westus
- azure:eastus azure:westus
# cross cloud tests
- aws:us-west-1 gcp:us-west2-a
- gcp:us-west2-a aws:us-west-1
- aws:us-west-1 azure:westus
- azure:westus aws:us-west-1
- gcp:us-west2-a azure:westus
- azure:westus gcp:us-west2-a
timeout-minutes: 40
steps:
- name: Single small file test
run: poetry run python tests/integration/cp.py ${{ matrix.pairs }} --n-files 1 --file-size-mb 32
- name: 128 small files test
run: poetry run python tests/integration/cp.py ${{ matrix.pairs }} --n-files 128 --file-size-mb 1
- name: Single large file test
run: poetry run python tests/integration/cp.py ${{ matrix.pairs }} --n-files 1 --file-size-mb 2000
cleanup:
needs: [install, runner]
- name: Cleanup GCP service account
if: always()
run: gcloud iam service-accounts delete --quiet ${{ env.STRATEGY_UUID }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com
deprovision:
runs-on: ubuntu-latest
if: ${{ always() }}
needs: [integration]
needs: [install, runner]
env:
STRATEGY_UUID: itest-d-${{ github.run_id }}-${{ github.run_attempt }}
steps:
Expand Down
13 changes: 13 additions & 0 deletions skyplane/cli/cli_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,19 @@ def gcp_check(
check_assert(cred, "GCP Python SDK credentials created")
check_assert(sa_cred, "GCP Python SDK service account credentials created")

# check object store
rprint(f"\n{hline}\n[bold]Checking service account permissions [/bold]\n{hline}")
from skyplane.obj_store.object_store_interface import ObjectStoreInterface
iface = ObjectStoreInterface.create("gcp:infer", bucket)
iface.list_objects()
check_assert(iface.auth._service_credentials_file, "GCP service account credentials file set")


cli = f"az role assignment list --assignee {cloud_config.azure_principal_id} --all"
retcode, stdout, stderr = run_cmd(cli.split(), debug=debug)
check_assert(retcode == 0, "Azure CLI UMI roles listed", debug_msg=stderr)



@app.command()
def azure_get_valid_skus(
Expand Down

0 comments on commit 457670a

Please sign in to comment.