diff --git a/cmd/changes_get_change.go b/cmd/changes_get_change.go index 65f54342..438ba407 100644 --- a/cmd/changes_get_change.go +++ b/cmd/changes_get_change.go @@ -122,8 +122,25 @@ fetch: } if riskRes.Msg.GetChangeRiskMetadata().GetRiskCalculationStatus().GetStatus() == sdp.RiskCalculationStatus_STATUS_INPROGRESS { - log.WithContext(ctx).WithField("status", riskRes.Msg.GetChangeRiskMetadata().GetRiskCalculationStatus().GetStatus().String()).Info("waiting for risk calculation") - time.Sleep(10 * time.Second) + // Extract the currently running milestone if you can + milestones := riskRes.Msg.GetChangeRiskMetadata().GetRiskCalculationStatus().GetProgressMilestones() + var currentMilestone string + for _, milestone := range milestones { + if milestone == nil { + continue + } + + if milestone.GetStatus() == sdp.RiskCalculationStatus_ProgressMilestone_STATUS_INPROGRESS { + currentMilestone = milestone.GetDescription() + } + } + + log.WithContext(ctx).WithFields(log.Fields{ + "status": riskRes.Msg.GetChangeRiskMetadata().GetRiskCalculationStatus().GetStatus().String(), + "milestone": currentMilestone, + }).Info("Waiting for risk calculation") + + time.Sleep(3 * time.Second) // retry } else { // it's done (or errored) diff --git a/cmd/datamaps/awssource.go b/cmd/datamaps/awssource.go index f5432c0a..02d51c94 100644 --- a/cmd/datamaps/awssource.go +++ b/cmd/datamaps/awssource.go @@ -905,6 +905,14 @@ var AwssourceData = map[string][]TfMapData{ Scope: "*", }, }, + "aws_sqs_queue": { + { + Type: "sqs-queue", + Method: sdp.QueryMethod_GET, + QueryField: "id", + Scope: "*", + }, + }, "aws_subnet": { { Type: "ec2-subnet",