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

Remove dependencies on specific cloud provider packages in TransferJob and update test deprovision bucket names #884

Merged
merged 47 commits into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
592e72a
fix planner
sarahwooders Jun 15, 2023
b2741c5
Make MulticastDirectPlanner take in `TransferConfig` (#872)
sarahwooders Jun 15, 2023
3ba7d31
Update tests for bucket cleanup + remove unnecessary installs (#865)
abiswal2001 Jun 15, 2023
faba29b
Disable cloudflare for integration tests (#864)
sarahwooders Jun 12, 2023
c601c34
little changes to the fall back logic + tests (#859)
xTRam1 Jun 8, 2023
ac4d589
Cleanup planner to take in TransferConfig and remove unused planner code
xTRam1 Jun 8, 2023
f656526
Merge remote-tracking branch 'upstream/0.3.1-release' into release
sarahwooders Jun 15, 2023
4225644
add copy tests
sarahwooders Jun 16, 2023
53d3439
initial integration tests
sarahwooders Jun 16, 2023
2429449
planner fixe
sarahwooders Jun 16, 2023
84ebdc2
actualy disable cloudflare
sarahwooders Jun 16, 2023
9fd0cd8
actualy disable cloudflare
sarahwooders Jun 16, 2023
d2e4200
test fixes
sarahwooders Jun 18, 2023
00dd79b
cleanup
sarahwooders Jun 19, 2023
17d863d
add all cloud tests
sarahwooders Jun 19, 2023
7096e63
debugging pipeline
sarahwooders Jun 19, 2023
99db23c
Enabled Azure Multipart (#863)
xTRam1 Jun 20, 2023
ed52e18
added more fallback tests + using a file (#873)
xTRam1 Jun 20, 2023
801371c
fixed pipeline bug
sarahwooders Jun 20, 2023
54ffa1f
cleanup
sarahwooders Jun 21, 2023
e27b90d
cleanup
sarahwooders Jun 21, 2023
f4627cf
Merge branch '0.3.1-release' into release
sarahwooders Jun 21, 2023
d6c5430
Add pytest integration tests (#874)
sarahwooders Jun 21, 2023
dfd03d6
Update integration-test-local.yml
sarahwooders Jun 21, 2023
e458395
Update pyproject.toml
sarahwooders Jun 21, 2023
41b94e7
Update __init__.py
sarahwooders Jun 21, 2023
b223c21
Update conf.py
sarahwooders Jun 21, 2023
b2ea7ab
update poetry lock
sarahwooders Jun 22, 2023
f7e2075
merge
sarahwooders Jun 22, 2023
fcc97f2
Merge branch 'release' of github.com:sarahwooders/skyplane into release
sarahwooders Jun 22, 2023
c18b0ec
change publish versions
sarahwooders Jun 22, 2023
f99a5c7
Upgrade poetry.lock and poetry publish version (#878)
sarahwooders Jun 22, 2023
59db561
Update poetry-publish-nightly.yml
sarahwooders Jun 22, 2023
1c7b5b2
fix planner for one-sided transfers
sarahwooders Jun 22, 2023
f81e346
format
sarahwooders Jun 22, 2023
060f616
Merge remote-tracking branch 'upstream/0.3.1-release' into release
sarahwooders Jun 22, 2023
bc3d7c0
Add cloudflare keys to integration tests and fix planner (#879)
sarahwooders Jun 22, 2023
23a1783
cleanup and have error reporting support multiple destinations
sarahwooders Jun 22, 2023
bdf5ea2
cleanup
sarahwooders Jun 22, 2023
30c5ee3
Merge remote-tracking branch 'upstream/0.3.1-release' into release
sarahwooders Jun 22, 2023
c783f42
cleanup
sarahwooders Jun 22, 2023
3117d4a
Update logging for multiple destinations (#880)
sarahwooders Jun 22, 2023
1b5d882
cleanup tests
sarahwooders Jun 22, 2023
090105e
Merge remote-tracking branch 'upstream/0.3.1-release' into release
sarahwooders Jun 22, 2023
b9bd233
Merge remote-tracking branch 'upstream/main' into release
sarahwooders Jun 23, 2023
533e91b
remove imports
sarahwooders Jun 23, 2023
863bc33
rename buckets
sarahwooders Jun 23, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
run: poetry run skyplane deprovision
- 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
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-multiple-sizes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
run: poetry run skyplane deprovision
- 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
2 changes: 1 addition & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
run: poetry run skyplane deprovision
- 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
16 changes: 11 additions & 5 deletions skyplane/api/transfer_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@
from skyplane import exceptions
from skyplane.api.config import TransferConfig
from skyplane.chunk import Chunk, ChunkRequest
from skyplane.obj_store.azure_blob_interface import AzureBlobInterface, AzureBlobObject
from skyplane.obj_store.gcs_interface import GCSObject
from skyplane.obj_store.r2_interface import R2Object
from skyplane.obj_store.storage_interface import StorageInterface
from skyplane.obj_store.object_store_interface import ObjectStoreObject, ObjectStoreInterface
from skyplane.obj_store.s3_interface import S3Object
from skyplane.utils import logger
from skyplane.utils.definitions import MB
from skyplane.utils.fn import do_parallel
Expand Down Expand Up @@ -161,7 +157,9 @@ def _run_multipart_chunk_thread(

metadata = None
# Convert parts to base64 and store mime_type if destination interface is AzureBlobInterface
if isinstance(dest_iface, AzureBlobInterface):
if dest_iface.provider == "azure":
from skyplane.obj_store.azure_blob_interface import AzureBlobInterface

block_ids = list(map(lambda part_num: AzureBlobInterface.id_to_base64_encoding(part_num, dest_object.key), parts))
metadata = (block_ids, mime_type)

Expand Down Expand Up @@ -294,12 +292,20 @@ def transfer_pair_generator(
raise e from None

if dest_provider == "aws":
from skyplane.obj_store.s3_interface import S3Object

dest_obj = S3Object(provider=dest_provider, bucket=dst_iface.bucket(), key=dest_key)
elif dest_provider == "azure":
from skyplane.obj_store.azure_blob_interface import AzureBlobObject

dest_obj = AzureBlobObject(provider=dest_provider, bucket=dst_iface.bucket(), key=dest_key)
elif dest_provider == "gcp":
from skyplane.obj_store.gcs_interface import GCSObject

dest_obj = GCSObject(provider=dest_provider, bucket=dst_iface.bucket(), key=dest_key)
elif dest_provider == "cloudflare":
from skyplane.obj_store.r2_interface import R2Object

dest_obj = R2Object(provider=dest_provider, bucket=dst_iface.bucket(), key=dest_key)
else:
raise ValueError(f"Invalid dest_region {dest_region}, unknown provider")
Expand Down
2 changes: 1 addition & 1 deletion skyplane/obj_store/r2_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, account_id: str, bucket_name: str):
endpoint_url=self.endpoint_url,
aws_access_key_id=self.config.cloudflare_access_key_id,
aws_secret_access_key=self.config.cloudflare_secret_access_key,
region_name="auto", # explicity set region, otherwise may be read from AWS boto3 env
region_name="auto", # explicity set region, otherwise may be read from AWS boto3 env
)
except Exception as e:
raise ValueError("Error with connecting to {self.endpoint_url}: {e}")
Expand Down