-
Notifications
You must be signed in to change notification settings - Fork 640
[Storage] Fix exclusion for AWS bucket upload #5128
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
Conversation
/smoke-test -k test_skyignore_exclusions --aws |
/smoke-test -k test_skyignore_exclusions --gcp |
/smoke-test -k test_skyignore_exclusions --azure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the fix and new smoke test!
sky/data/storage.py
Outdated
os.path.join(src_dir_path, excluded_path.rstrip('/')))): | ||
# Remove any trailing slash and add '/**' to exclude all | ||
# contents | ||
processed_excludes.append(f'{excluded_path.rstrip("/")}/**') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a blocker - do we need /**
or is /*
sufficient? see
skypilot/sky/data/storage_utils.py
Lines 213 to 216 in bdc880a
if item.endswith('/'): | |
# aws s3 sync and gsutil rsync require * to exclude | |
# files/dirs under the specified directory. | |
to_be_excluded += '*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! This part should be general. Just submitted a commit for this. Also, tested that single '*' works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, adding patterns could cause the handling of our zip upload to fail as we don't use pattern matching in the underlying code. I am removing the pattern matching globally. Running the smoke tests for storage again.
/smoke-test -k storage --aws |
/smoke-test -k test_skyignore_exclusions --gcp |
/smoke-test -k test_skyignore_exclusions --azure |
/smoke-test --aws |
/smoke-test -k test_ignore_exclusions --azure |
/smoke-test -k test_ignore_exclusions --gcp |
All tests above passed, except for an unrelated test: test_skyserve_update https://buildkite.com/skypilot-1/smoke-tests/builds/604#01961289-9327-40a8-ac2a-bf117f985fd9 |
@cg505 There are a few more tests added and some additional changes to the core logic. PTAL |
List[str] containing files and folders to be ignored. There won't be any | ||
patterns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cg505 Could you help double check this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
/smoke-test --aws |
/smoke-test -k test_ignore_exclusions --azure |
/smoke-test -k test_ignore_exclusions --gcp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor fix
List[str] containing files and folders to be ignored. There won't be any | ||
patterns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
also seems there are some failing unit tests |
@cg505 PTAL |
/smoke-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
In AWS S3 upload,
--exclude
flag requires a tailing**
to exclude a folder. This PR fixes this.To reproduce, run the smoke test added in this PR on master:
pytest tests/test_smoke.py -k test_skyignore_exclusions --aws
Tested (run the relevant ones):
bash format.sh
/smoke-test
(CI) orpytest tests/test_smoke.py
(local)/smoke-test -k test_name
(CI) orpytest tests/test_smoke.py::test_name
(local)/quicktest-core
(CI) orpytest tests/smoke_tests/test_backward_compat.py
(local)