Skip to content

Commit

Permalink
removing logs just go to the commit before if you want lags
Browse files Browse the repository at this point in the history
  • Loading branch information
Paramadon committed May 24, 2024
1 parent b07a1a6 commit 4469748
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 14 deletions.
7 changes: 3 additions & 4 deletions terraform/eks/daemon/gpu/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ resource "aws_eks_node_group" "this" {
subnet_ids = module.basic_components.public_subnet_ids

scaling_config {
desired_size = 2
max_size = 2
min_size = 2
desired_size = 1
max_size = 1
min_size = 1
}

ami_type = var.ami_type
Expand Down Expand Up @@ -712,7 +712,6 @@ resource "null_resource" "validator" {
provisioner "local-exec" {
command = <<-EOT
echo "Validating EKS metrics/logs for EMF"
kubectl apply -f ../gpuBurner.yaml
cd ../../../..
go test ${var.test_dir} -eksClusterName=${aws_eks_cluster.this.name} -computeType=EKS -v -eksDeploymentStrategy=DAEMON -eksGpuType=nvidia
EOT
Expand Down
1 change: 1 addition & 0 deletions terraform/eks/daemon/gpuBurner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ spec:
resources:
limits:
nvidia.com/gpu: 1

5 changes: 0 additions & 5 deletions test/metric/container_insights_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,6 @@ func ValidateLogs(env *environment.MetaData) status.TestResult {
}

for _, instance := range eKSInstances {
fmt.Println("Number of eks Instances", len(eKSInstances))
fmt.Println("This is the instance", instance.InstanceName)
fmt.Println("This is the instance", instance)

stream := *instance.InstanceName
err = awsservice.ValidateLogs(
Expand All @@ -212,10 +209,8 @@ func ValidateLogs(env *environment.MetaData) status.TestResult {
if innerErr != nil {
return "", fmt.Errorf("failed to unmarshal log file: %w", innerErr)
}
log.Printf("The eksClusterType is: %v", eksClusterType.Type)
jsonSchema, ok := eks_resources.EksClusterValidationMap[eksClusterType.Type]
if !ok {
log.Printf("Error for this eksClusterType: %v", eksClusterType.Type)
return "", errors.New("invalid cluster type provided")
}
return jsonSchema, nil
Expand Down
1 change: 0 additions & 1 deletion test/metric/metric_value_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ func (n *MetricValueFetcher) Fetch(namespace, metricName string, metricSpecificD
EndTime: &endTime,
MetricDataQueries: metricDataQueries,
}
log.Print("This is the the getMetric data input", getMetricDataInput, getMetricDataInput.StartTime, getMetricDataInput.EndTime, getMetricDataInput.MetricDataQueries)

log.Printf("Metric data input: namespace %v, name %v, stat %v, period %v",
namespace, metricName, stat, metricQueryPeriod)
Expand Down
4 changes: 0 additions & 4 deletions util/awsservice/cloudwatchlogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ func WithSchema(schema string) SchemaRetriever {
func AssertLogSchema(schemaRetriever SchemaRetriever) LogEventValidator {
return func(event types.OutputLogEvent) error {
message := *event.Message
fmt.Println("This is the message", message)
if schemaRetriever == nil {
return errors.New("nil schema retriever")
}
Expand All @@ -254,9 +253,6 @@ func AssertLogSchema(schemaRetriever SchemaRetriever) LogEventValidator {
if err != nil {
return fmt.Errorf("failed to execute schema validator: %w", err)
} else if len(keyErrors) > 0 {
fmt.Println("This is the length of key errors", len(keyErrors))
fmt.Printf("This is the first key errors info: Property Path: %s Invalid Value %s and the message %s \n ", keyErrors[0].PropertyPath, keyErrors[0].InvalidValue, keyErrors[0].Message)

return fmt.Errorf("failed schema validation: %v | schema: %s | log: %s", keyErrors, schema, message)
}
return nil
Expand Down

0 comments on commit 4469748

Please sign in to comment.