For the past few weeks our iOS builds have been failing via errors in Fastlane. When we go to troubleshoot everything works as expected locally, and then we push those changes upstream. CircleCI is then triggered to start a build workflow.
Then we see the same error in CircleCI that we just fixed. This has been ongoing for weeks and frustrating to debug. We reran the jobs via SSH. Opened a session and went to the project directory. By happy accident we ran a “git status” and we noticed there were changes made to the Fastfile by the MacOS image itself. Almost like it reverted the changes to fix the issue in the first place. Reverting the Fastfile to a previous known or cached state.
Any help would be appreciated. We have attached a previous SSH session on a rerun.
We started to split up our steps and are triaging using git status between build steps. We suspect the save_cache and restore_cache steps for our Bundler/Ruby Gems is pointing to a path in such a way that it is caching files inside of our iOS project. Triaging now.
Testing did in fact yield some aggressive caching and the path for the cache and key was pointing to a directory that included configuration files being modified. We pointed the cache keys elsewhere, and changed their names to force a flush. Subsequent builds are failing (our nightly) however it appears this is a compilation error that we can now rectify. Effectively resolving the stated issue.
If others see this issue the save_cache / restore_cache steps should have a path isolated from project code or configuration code.