-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[match] prevent directory download from s3 #20975
[match] prevent directory download from s3 #20975
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
Seems very reasonable and low risk.
@rogerluan Sorry for tagging you, but I'm curious if this can be merged, or there's anything I need to update. Unfortunately, we are unable to use the latest version of fastlane without this PR. |
Hi @markhomoki ! Thanks for opening this PR 🙏 Any chance you can add unit tests that cover this case? That way we can ensure this works as expected, and that it won't regress in the future as well |
Improvements * [core][match] remove obsolete and expired WWDR G1 certificate (fastlane#21271) via Frederik Seiffert (@triplef) * [action][ensure_git_status_clean] new ignore_files option for explicitly ignoring files (fastlane#21283) via Josh Holtz (@joshdholtz) * [scan] run simulator destination with arch=x86_64 for Xcode 14.3 and up if on Intel (fastlane#21284) via Josh Holtz (@joshdholtz) * [match] adding support for self-managed GitLab instances (fastlane#21274) via Darby Frey (@darbyfrey) * [pilot] fix increase limit for build query (fastlane#21212) via Eric Lindvall (@eric) * [dependency] relax `multipart_post` dependency version requirement (fastlane#20870) via Edouard Brière (@edouard) https://github.com/fastlane/fastlane/releases/tag/2.213.0
Thanks @rogerluan. Sorry for taking this long, but i've updated my PR. Tested the cases locally and they are working. For some reason it fails on Xcode 13.0.0 with Ruby 3.1.. (Also, seen other PRs that have the same issue) |
Thanks for the heads up @markhomoki , I'll check what's going on 💪 |
This might fix CI, let's see: #21465 |
Thanks @rogerluan , seems like all good |
Co-authored-by: Roger Oba <rogerluan.oba@gmail.com>
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! Thank you for this PR! 🤗
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
Currently, we use
match
and store our certificates on GitHub. However, we decided to move away from GitHub and store the certificates on s3. There are several iOS apps we maintain. After migrating the certificates to s3 (and following the same formatmatch
uses), we faced a problem whenmatch
tries to download the root folder instead of the certificates.Resolves #19363
Description
When
match
creates the distribution certificate and pushes it to s3, everything works perfectly. However, when uploading the exact files and folder structure to s3, thematch
script cannot find the certificates the script fails. It happens because in that cases,s3_client.find_bucket!(s3_bucket).objects(prefix: s3_object_prefix)
returns the root directory as well, which fails with the following error: No such file or directory @ rb_sysopen. Adding a check to prevent downloading directories, fixes the problem.Testing Steps
match
create the certificates and upload them to s3match
script fails