[scan] output_remove_retry_attempts should also remove retries when the test is skipped#29887
Conversation
…st ends up being skipped
…e test is skipped
…e test is skipped
|
@iBotPeaches is there anything you would want changed here? |
There was a problem hiding this comment.
Pull request overview
Updates the legacy xcresult parsing path to better support output_remove_retry_attempts, ensuring retries are removed consistently even when the final attempt ends in a skipped result (and aligning the output with the “final attempt only” interpretation used elsewhere in Trainer).
Changes:
- Refactors retry-attempt removal in
LegacyXCResult::Parser#summaries_to_datainto a dedicated helper. - Updates retry filtering to keep only the final test row per identifier and adjusts failure/skip/retry counters accordingly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…kipped-on-retry scenario Covers the case where a test fails on the first attempt and is skipped on retry, ensuring failure/skip/retry counts are correctly adjusted when output_remove_retry_attempts is true. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Added a regression test in |
Update retry behaviour
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
[trainer] Fix rubocop lint offenses in test_parser_spec
|
@iBotPeaches Is there anything you'd like changing? |
|
Code wise? No. I got lost in time trying to just learn about the change. In my head I was trying to think how some folks run tests in order to find flake, so running with retries and encountering a failure is a still a failure. Then I thought I was overthinking if it the retry mode was like Jest and its purpose is to workaround flaky tests, then I was going to see if this was opt-in via the parameter - then I forgot all about it. |
I think for the case of people running to find a flake, they wouldn't be skipping a test. I'll admit it's a bit of a odd usecase but I think treating skip the same as a pass makes sense in this case. Appreciate it's hard to know what behaviours people are relying on. My hunch is this is sensible enough to cater for the expected behaviour. We only see this in rare cases where our tests are setup to "skip" if they hit a flaky Apple API, but might actually fail before that. if you'd prefer this as an opt in parameter, just me know. Happy to make any changes |
|
Reading through the options more - I believe this is a safe fix. You are just removing the retries if the test is skipped, which still semantically means "remove retry attempts" |
Yeah agreed, I think this is going to be expected behaviour though appreciate you can't garunatee how people are using it. |
There was a problem hiding this comment.
Hey @foxware00 👋
Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a month, and your PR will be included in the next one.
Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀"
There was a problem hiding this comment.
Congratulations! 🎉 This was released as part of fastlane 2.233.0 🚀
Checklist
bundle exec rspecfrom the root directory to see all new and existing tests passbundle exec rubocop -ato ensure the code style is validci/circlecibuilds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
I've noticed if we have tests that fail, then skip on their second attempt. They are marked as an overall failure in the results. This change aligns the success logic with that of skipped
Description
I extended output_remove_retry_attempts to also see if the last result ended up being a skipped result and in that case also remove the retries