Fix for arch specific subrepos using the wrong parent configs.
Fixes https://github.com/thought-machine/please/issues/3346
The forArch function would not take into account that its parentStates are actually the correct architecture as well. Therefore, it could occur that a parentState for the wrong architecture would be used, depending on the order things were parsed. This meant it could use the wrong settings from the parent config files, by not using the correct architecture overrides.
This fix simply makes sure that the parentState is of the same architecture as requested for the subrepo, and to create it if it didn't exist.
Thanks for the PR - this looks sensible to me, but is it possible to write an e2e test to prevent future regressions?
Ok, https://app.circleci.com/pipelines/github/thought-machine/please/7432/workflows/3003c505-2385-4f8a-a217-a7b98d7ed37b passed on CircleCI but hasn't updated here