tadayosi commented on PR #3571: URL: https://github.com/apache/camel-k/pull/3571#issuecomment-1243688581
> If I understand the problem correctly, maybe a solution would be to call the traits in two phases, rather than in a single sequence: > > * a first phase calling the `Configure` method on the traits > * a second phase calling the `Apply` method on the traits enabled during the first phase At first I thought it's a better solution but then found out that in a phase like deploying, in the Configure method phase some traits expect the outcomes of the Apply method of a previous trait, e.g. Service -> Container. This seems also a sensible design choice as otherwise the application chain of traits for a phase won't finish in a single batch and we might need to iterate several times for a phase to reach the desired state before moving to another phase, or we would simply end up omitting some important configs that should've been applied. It might be also possible that we leak some trait configuration code into the Apply method in order to catch up the outcome of previous traits, but I don't think it's a good design. Fow now, the original problem is only related to Platform trait so I'll try to fix it within the trait instead of overhauling the entire process. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org