Skip to content

Commit

Permalink
lint + emr verion tag
Browse files Browse the repository at this point in the history
  • Loading branch information
aboitreaud committed Dec 19, 2024
1 parent c3cee85 commit 3f00482
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions pkg/fleet/installer/setup/djm/emr.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ type emrInstanceInfo struct {
InstanceGroupID string `json:"instanceGroupId"`
}

type Cluster struct {
type cluster struct {
Name string `json:"Name"`
}

type EmrResponse struct {
Cluster Cluster `json:"Cluster"`
type emrResponse struct {
Cluster cluster `json:"cluster"`
}

type extraEmrInstanceInfo struct {
Expand Down Expand Up @@ -119,10 +119,13 @@ func setupCommonEmrHostTags(s *common.Setup) (string, string, error) {
}
setHostTag(s, "job_flow_id", extraInfo.JobFlowID)
setHostTag(s, "cluster_id", extraInfo.JobFlowID)
setHostTag(s, "cluster_id", extraInfo.JobFlowID)
s.Span.SetTag("emr_version", extraInfo.ReleaseLabel)

emrResponseRaw, err := executeCommandWithTimeout("aws", "emr", "describe-cluster", "--cluster-id", extraInfo.JobFlowID)
var response EmrResponse
if err != nil {
return "", "", err
}
var response emrResponse
if err = json.Unmarshal(emrResponseRaw, &response); err != nil {
return info.IsMaster, "", fmt.Errorf("error unmarshalling AWS EMR response: %w", err)
}
Expand Down

0 comments on commit 3f00482

Please sign in to comment.