Closed ddgenome closed 4 years ago
It appears as though, eventually, all roads for goal execution lead through FulfillGoalOnRequested. When using a scheduler like the KubernetesGoalScheduler, the flow looks something like this:
The situation is similar for Kubernetes deployment goals. FulfillGoalOnRequested is entered twice by two different SDMs. The executor for SDM that creates the goal adds the goal data to the goal, sets the state to in_process and returns, at which point the FulfillGoalOnRequested.handle method closes the progress log. By the time the k8s-sdm spins up, the log is closed and writing to it does nothing.
The changes in f9b6ffb did not fix the issue. The close method is still getting called on the progress log. Looking at the log storage, all of the logs are there, but it seems rolar stops at the first log file containing "CLOSED" in the name.
It appears that the executeGoal function does not return any part of what the goal executor returns, https://github.com/atomist/sdm/blob/172fa73b29b4830feae4b356a92d28eabcf18dbd/lib/api-helper/goal/executeGoal.ts#L181 .
The change in atomist/sdm@ac1a99b with the change here atomist/sdm-core@59f669a seems to be working.
This is working for the Kubernetes deployments too atomist/sdm-pack-k8s#70 .
There are several types of goals that have phased execution, with the initial execution of the goal executor returning a goal that is still in progress. When this occurs, logs from subsequent phases of the execution do not appear in the progress log for the goal. This currently affects container goals and Kubernetes deployment goals.