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

test sframe s3 download and upload #3054

Merged
merged 3 commits into from Mar 25, 2020

Conversation

guihao-liang
Copy link
Collaborator

add test for frame s3 download and upload.

define env var DTURI_ENDBALE_SF_S3 to enable the test.

add listed env vars in CI,

TURI_S3_REGION
TURI_S3_ENDPOINT
AWS_SECRET_ACCESS_KEY
AWS_ACCESS_KEY_ID

to run the test.

@guihao-liang guihao-liang added this to the 6.2 milestone Mar 17, 2020
@guihao-liang guihao-liang self-assigned this Mar 17, 2020
src/python/turicreate/test/test_sframe_s3.py Show resolved Hide resolved
else:
self.assertEqual(v1, v2)

def _test_sframe_equal(self, sf1, sf2):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, why not. I hope I know it earlier.

src/python/turicreate/test/test_sframe_s3.py Show resolved Hide resolved
region_name=os.environ["TURI_S3_REGION"],
)
self.bucket = "tc_qa"
self.s3_prefix = "integration/manual/"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure "manual" makes sense in the prefix.

Much more importantly - if two different instances of these tests are running at the same time, they will step on each other. I suggest you generate a UUID and append that to the prefix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's my s3 prefix, not the prefix on local fs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and the file is stored in S3, without uuid.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, it looks like it always writes to the same place in S3. So if two instances of this script are running at the same time they will be interfering with each other because they're both writing and reading to the same place.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe s3 will attach version id to it. And our internal S3 won't allow us to delete folders.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's why I'm not going to have a UUID as a grouping folder.

src/python/turicreate/test/test_sframe_s3.py Outdated Show resolved Hide resolved
src/python/turicreate/test/test_sframe_s3.py Outdated Show resolved Hide resolved
@guihao-liang
Copy link
Collaborator Author

depends on boto/boto3#2347

@guihao-liang guihao-liang dismissed TobyRoseman’s stale review March 25, 2020 16:59

Toby is out for 2 weeks.

@guihao-liang guihao-liang merged commit 01dffc5 into apple:master Mar 25, 2020
@guihao-liang guihao-liang deleted the 03-13-splitup-my-pr-7 branch March 25, 2020 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants