Skip to content

Commit

Permalink
merge with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahwooders committed Feb 26, 2024
2 parents 7592f5f + 4602d9c commit bfe6a81
Show file tree
Hide file tree
Showing 93 changed files with 5,430 additions and 1,147 deletions.
108 changes: 108 additions & 0 deletions .github/workflows/integration-test-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: integration-test-local
on: [push]
concurrency: transfer-test
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SKYPLANE_USAGE_STATS_ENABLED: 0
jobs:
integration:
if: ${{ always() }}
runs-on: ubuntu-latest
strategy:
max-parallel: 8
matrix:
pairs:
# AWS
- aws:us-east-1 local
- local aws:us-east-2
# GCP
- gcp:us-central1-a local
- local gcp:us-east1-a
# Azure
- azure:westus local
- local azure:westus
timeout-minutes: 40
env:
STRATEGY_UUID: itest-${{ github.run_id }}-${{ github.run_attempt }}-${{ strategy.job-index }}
steps:
- uses: actions/checkout@v1
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "poetry"
- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install Dependencies
run: poetry install -E aws -E azure -E gcp
if: steps.cache.outputs.cache-hit != 'true'
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_JSON }}'
- name: Log into Azure
uses: azure/login@v1
with:
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
- name: Skyplane init
run: |
poetry run skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
poetry run skyplane config set native_cmd_enabled false
cat ~/.skyplane/config
poetry run skyplane init -y --disable-config-cloudflare
poetry run skyplane config set usage_stats false
- name: Single small file test
run: poetry run python tests/integration/cp_local.py ${{ matrix.pairs }} --n-files 1 --file-size-mb 32
- name: 128 small files test
run: poetry run python tests/integration/cp_local.py ${{ matrix.pairs }} --n-files 128 --file-size-mb 1
- name: Single large file test
run: poetry run python tests/integration/cp_local.py ${{ matrix.pairs }} --n-files 1 --file-size-mb 2000
- name: Cleanup GCP service account
if: always()
run: gcloud iam service-accounts delete ${{ env.STRATEGY_UUID }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com
deprovision:
runs-on: ubuntu-latest
if: ${{ always() }}
needs: [integration]
env:
STRATEGY_UUID: itest-d-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v1
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "poetry"
- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install dependencies
run: poetry install -E aws -E azure -E gcp
if: steps.cache.outputs.cache-hit != 'true'
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_JSON }}'
- name: Skyplane init
run: |
poetry run skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
poetry run skyplane init -y --disable-config-azure --disable-config-cloudflare
poetry run skyplane config set usage_stats false
- name: Deprovision
run: poetry run skyplane deprovision --all
- name: Delete matching S3 buckets
run: |
for pattern in "test-skyplane-" "skyplane-integration-" "integrationus-east-1-"; do
aws s3api list-buckets --query "Buckets[?starts_with(Name, \`${pattern}\`) == \`true\`].Name" --output text | tr '\t' '\n' | while read bucket; do aws s3 rb "s3://$bucket" --force; done
done
- name: Cleanup GCP service account
if: always()
run: gcloud iam service-accounts delete --quiet ${{ env.STRATEGY_UUID }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com
112 changes: 112 additions & 0 deletions .github/workflows/integration-test-multiple-sizes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: integration-test-multiple-sizes
on: [push]
concurrency: transfer-test
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
SKYPLANE_USAGE_STATS_ENABLED: 0
jobs:
integration:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
pairs:
# AWS to AWS
- aws:us-east-1 aws:us-east-1 --multipart
- aws:us-east-2 aws:us-west-2 --multipart
# GCP to GCP
- gcp:us-central1-a gcp:us-central1-a --multipart
- gcp:us-west1-a gcp:us-east1-a --multipart
# Azure to Azure
- azure:westus azure:westus --multipart
- azure:eastus azure:westus --multipart
# cross cloud tests
- aws:us-west-1 gcp:us-west2-a --multipart
- gcp:us-west2-a aws:us-west-1 --multipart
- aws:us-west-1 azure:westus --multipart
- azure:westus aws:us-west-1 --multipart
- gcp:us-west2-a azure:westus --multipart
- azure:westus gcp:us-west2-a --multipart
timeout-minutes: 40
env:
STRATEGY_UUID: itest-${{ github.run_id }}-${{ github.run_attempt }}-${{ strategy.job-index }}
steps:
- uses: actions/checkout@v1
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "poetry"
- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install Dependencies
run: poetry install -E aws -E azure -E gcp
if: steps.cache.outputs.cache-hit != 'true'
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_JSON }}'
- name: Log into Azure
uses: azure/login@v1
with:
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
- name: Skyplane init
run: |
poetry run skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
poetry run skyplane config set native_cmd_enabled false
cat ~/.skyplane/config
poetry run skyplane init -y
poetry run skyplane config set usage_stats false
- 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
- name: Cleanup GCP service account
if: always()
run: gcloud iam service-accounts delete ${{ env.STRATEGY_UUID }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com
deprovision:
runs-on: ubuntu-latest
if: ${{ always() }}
needs: [integration]
env:
STRATEGY_UUID: itest-d-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v1
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "poetry"
- name: Install dependencies
run: poetry install -E aws -E azure -E gcp
if: steps.cache.outputs.cache-hit != 'true'
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_JSON }}'
- name: Skyplane init
run: |
poetry run skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
poetry run skyplane init -y --disable-config-azure
poetry run skyplane config set usage_stats false
- name: Deprovision
run: poetry run skyplane deprovision
- name: Delete matching S3 buckets
run: |
for pattern in "test-skyplane-" "skyplane-integration-" "integrationus-east-1-"; do
aws s3api list-buckets --query "Buckets[?starts_with(Name, \`${pattern}\`) == \`true\`].Name" --output text | tr '\t' '\n' | while read bucket; do aws s3 rb "s3://$bucket" --force; done
done
- name: Cleanup GCP service account
if: always()
run: gcloud iam service-accounts delete --quiet ${{ env.STRATEGY_UUID }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com
12 changes: 6 additions & 6 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: poetry install -E aws -E azure -E gcp
if: steps.cache.outputs.cache-hit != 'true'
- id: 'auth'
uses: 'google-github-actions/auth@v0'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_JSON }}'
- name: Log into Azure
Expand Down Expand Up @@ -90,14 +90,14 @@ jobs:
credentials_json: '${{ secrets.GCP_CREDENTIALS_JSON }}'
- name: Skyplane init
run: |
skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
skyplane init -y --disable-config-azure
skyplane config set usage_stats false
poetry run skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
poetry run skyplane init -y --disable-config-azure
poetry run skyplane config set usage_stats false
- name: Deprovision
run: skyplane deprovision
run: poetry run skyplane deprovision --all
- name: Delete matching S3 buckets
run: |
for pattern in "test-skyplane-" "skyplane-integration-us-east-1-" "integrationus-east-1-"; do
for pattern in "test-skyplane-" "skyplane-integration-" "integrationus-east-1-"; do
aws s3api list-buckets --query "Buckets[?starts_with(Name, \`${pattern}\`) == \`true\`].Name" --output text | tr '\t' '\n' | while read bucket; do aws s3 rb "s3://$bucket" --force; done
done
- name: Cleanup GCP service account
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/poetry-publish-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: poetry-publish-nightly
on:
schedule:
- cron: '39 23 * * *'
workflow_dispatch:

jobs:
# nightly release check from https://stackoverflow.com/a/67527144
Expand Down Expand Up @@ -30,7 +31,7 @@ jobs:
with:
python-version: 3.8
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.2.1
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
with:
python-version: 3.8
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.2.1
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/poetry-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
python-version: 3.8
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.4.0
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
with:
python-version: 3.8
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.4.0
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
- name: black
run: poetry run black . --check --line-length=140
- name: pytype
run: poetry run pytype --config .pytype.cfg -j 2
test-unit:
# do not run on pull_request_target since it should be triggered by pull_request
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request')
Expand Down Expand Up @@ -63,7 +61,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
- name: Run unit tests
run: |
poetry run skyplane init -y --disable-config-aws --disable-config-azure --disable-config-gcp --disable-config-ibm
poetry run skyplane init -y --disable-config-aws --disable-config-azure --disable-config-gcp --disable-config-ibm --disable-config-cloudflare
poetry run skyplane config set usage_stats false
poetry run pytest -s tests/unit_nocloud
test-aws:
Expand All @@ -87,16 +85,14 @@ jobs:
run: |
poetry install -E gateway -E solver -E aws -E azure -E gcp -E ibm
poetry run pip install -r requirements-dev.txt
poetry run sudo apt install default-jdk
poetry run wget https://archive.apache.org/dist/hadoop/core/hadoop-3.3.0/hadoop-3.3.0.tar.gz -P /tmp && tar -xzf /tmp/hadoop-3.3.0.tar.gz -C /tmp && sudo mv /tmp/hadoop-3.3.0 /usr/local/hadoop && rm /tmp/hadoop-3.3.0.tar.gz
if: steps.cache.outputs.cache-hit != 'true'
- name: Run cloud tests
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
run: |
poetry run skyplane init -y --disable-config-azure --disable-config-gcp --disable-config-ibm
poetry run skyplane init -y --disable-config-azure --disable-config-gcp --disable-config-ibm --disable-config-cloudflare
poetry run skyplane config set usage_stats false
poetry run pytest -s tests/unit_aws
test-azure:
Expand Down Expand Up @@ -128,7 +124,7 @@ jobs:
- name: Run cloud tests
run: |
poetry run pip freeze
poetry run skyplane init -y --disable-config-aws --disable-config-gcp --disable-config-ibm
poetry run skyplane init -y --disable-config-aws --disable-config-gcp --disable-config-ibm --disable-config-cloudflare
poetry run skyplane config set usage_stats false
poetry run pytest -s tests/unit_azure
test-gcp:
Expand Down Expand Up @@ -156,7 +152,6 @@ jobs:
poetry install -E gateway -E solver -E aws -E azure -E gcp -E ibm
poetry run pip install -r requirements-dev.txt
poetry run sudo apt install default-jdk
poetry run wget https://archive.apache.org/dist/hadoop/core/hadoop-3.3.0/hadoop-3.3.0.tar.gz -P /tmp && tar -xzf /tmp/hadoop-3.3.0.tar.gz -C /tmp && sudo mv /tmp/hadoop-3.3.0 /usr/local/hadoop && rm /tmp/hadoop-3.3.0.tar.gz
if: steps.cache.outputs.cache-hit != 'true'
- id: 'auth'
uses: 'google-github-actions/auth@v0'
Expand All @@ -170,7 +165,7 @@ jobs:
- name: Run cloud tests
run: |
poetry run skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
poetry run skyplane init -y --disable-config-aws --disable-config-azure --disable-config-ibm
poetry run skyplane init -y --disable-config-aws --disable-config-azure --disable-config-ibm --disable-config-cloudflare
poetry run skyplane config set usage_stats false
poetry run pytest -s tests/unit_gcs
- name: Cleanup GCP service account
Expand Down

0 comments on commit bfe6a81

Please sign in to comment.