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] remove redundant fetching of profile devices and certificates #21409
Conversation
@rogerluan , can you please look at this PR? |
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.
I also thought we had to fetch them again initially, but after reviewing the code better, this makes total sense to me!
However, since this is a critical part of match
, I'll leave it for @joshdholtz to review it whenever he has some time, since he's the one who implemented this originally 🙇
Really nice catch btw @nekrich ! Thanks for this PR! 🙌 |
Waited so long, and missed release. @joshdholtz , please review 🙏 |
@nekrich @rogerluan one question before I merge, why does |
That's a really good question @getaaron 🤔 after analyzing the code it looks like it was just forgotten? Because it even has an entry in From code review alone it looks like this code would even crash due to lack of Could you confirm whether that's the expected behavior or if there's an accessor missing, @nekrich ? |
@rogerluan Looks likes it's missing 🤔. |
Added the accessor, waiting for tests. |
Some tests failed, but I don't see any relationship with the changes I've made 🤔. |
Oh, this PR just needs rebasing from master @nekrich, would you do that for us? 🙏 |
@rogerluan , @getaaron, sorry for the delay. I've just rebased my branch 🤞. |
CI was failing, I just triggered it again to see if it was a flaky 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.
Tests look good. Thanks for the 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
match is slow when running in edit mode. I found out that when the match checks device count and development certificates validity. match downloads a provisioning profile from the portal with devices and certificates payload and additionally sends two more requests to the portal to fetch devices and certificates once again. There is no need to fetch remote info twice.
Description
Changes allow match to use devices & certificates info from the first request from the received provisioning profile. As a result, the are 2x decrease in requests sent to App Store Connect API when checking if the provisioning profile must be updated.
Testing Steps
run match.