[actions] add filter date to download_dsyms #17228
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passNote that on my system the keychain tests fail, but this occurs before PR:
bundle exec rubocop -a
to ensure the code style is validMotivation and Context
Currently download_dsyms can fetch all dsym files, or specific files based on app version, build, live or latest. For some situations when an app may have live version, and multiple versions in development / TestFlight, these options don't provide a means to ensure all dsyms are downloaded without requesting all files every time the command is run.
By adding an option to download files newer than a given uploaded_date, and providing the most recent date of files downloaded during a pass, a controlling script can track the date and request only newer files each time.
Description
The PR adds a new command option
after_uploaded_date
which takes a date / time string in any format supported by the ruby date parser. When provided only downloads dsym files for builds with an uploaded date more recent than the option.The most recent uploaded date of the builds that symbols were downloaded for is added to the SharedValues hash as
DSYM_LATEST_UPLOADED_DATE
.Additionally the
DSYM_LATEST_UPLOADED_DATE
SharedValue
is cleared byclean_build_artifacts
. Although this is not a build artifact it is logical that it would be reset along withDSYM_FILES
.Testing Steps
Have added additional unit test to download_dsyms_specs to validate the correct download calls are made:
Have run on our developer accounts and applications to check it correctly selects the expected dsyms when the new option is provided, and that the
DSYM_LATEST_UPLOADED_DATE
is correct.Finally, this is my first dive into ruby + fastlane codebase so all feedback appreciated !