Skip to content

Commit

Permalink
fix: report untriggered on-demand lambdas in fss deployment message (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
junfuchen99 committed Jul 19, 2023
1 parent 8d45f98 commit 424582d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/com/aws/greengrass/status/FleetStatusService.java
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,16 @@ private void updateEventTriggeredFleetStatusData(DeploymentInformation deploymen
return;
}

// remove any component from unchanged status component list if it's in updatedGreengrassServiceSet
if (deploymentInformation != null && deploymentInformation.getUnchangedRootComponents() != null) {
// for a deployment-triggered FSS update, if any component is NEW state when deployment finishes
// (e.g. on-demand lambdas), include them in the updated gg service set because they should be also
// installed by this deployment
kernel.orderedDependencies().forEach(greengrassService -> {
if (greengrassService.inState(State.NEW)) {
updatedGreengrassServiceSet.add(greengrassService);
}
});
// remove any component from unchanged status component list if it's in updatedGreengrassServiceSet
deploymentInformation.getUnchangedRootComponents().removeIf(
componentName -> updatedGreengrassServiceSet.stream()
.anyMatch(service -> service.getName().equals(componentName)));
Expand Down

0 comments on commit 424582d

Please sign in to comment.