astefanutti commented on PR #3571:
URL: https://github.com/apache/camel-k/pull/3571#issuecomment-1243412940

   > > I'm wondering if using the existing `Error` phase, and introducing an 
`Initialisation Failed` condition could be an alternative?
   > 
   > Good point. In this case, the monitor action would keep monitoring the 
failed integration, so it would need to be changed so that it keeps ignoring 
integrations with the `Initialisation Failed` condition in its `Handle` logic. 
Is it what you're suggesting?
   
   Exactly. I'm assuming the `monitor` action logic is already idem-potent to 
error cases, but it may need to be adjusted to accommodate that case as you 
say. 
   
   > > Same for the `Platform Ready` phase? I'd advocate for keeping the number 
of phases minimal as it helps reasoning about it. Generally, "touch points" 
like "platform ready" are captured by conditions rather than phases, that 
control the state machine.
   > 
   > Actually `Platform Ready` is a temporary pseudo phase and never persisted. 
The problem is that if the Platform trait changes to `Initialisation` phase 
right after its application it would also trigger subsequent traits in the 
platform setup action, not in the next initialisation action. It's because 
right now whether a trait is activated or not mostly depends on the integration 
phase. But maybe I can find a better logic to skip them in the Platform trait.
   
   That "_Actually `Platform Ready` is a temporary pseudo phase and never 
persisted_" rather sounds like a better solution must exists :) I'd avoid 
piggy-backing on the state machine phases.
   
   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


-- 
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

Reply via email to