Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DJM init script for EMR #32328

Merged
merged 16 commits into from
Dec 23, 2024
Merged

Conversation

aboitreaud
Copy link
Contributor

@aboitreaud aboitreaud commented Dec 18, 2024

What does this PR do?

Add a new Data Jobs Monitoring init script flavor for AWS EMR.

Motivation

Describe how you validated your changes

Possible Drawbacks / Trade-offs

Additional Notes

@github-actions github-actions bot added the medium review PR review might take time label Dec 18, 2024
@aboitreaud aboitreaud force-pushed the adrien.boitreaud/djm-install-script-emr branch from fd4fab2 to 281d10c Compare December 18, 2024 10:48
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Dec 18, 2024

Uncompressed package size comparison

Comparison with ancestor c60d01f7db246bf3281245f37f7472f9692caee0

Diff per package
package diff status size ancestor threshold
datadog-agent-x86_64-rpm 0.01MB ⚠️ 1197.25MB 1197.23MB 140.00MB
datadog-agent-x86_64-suse 0.01MB ⚠️ 1197.25MB 1197.23MB 140.00MB
datadog-agent-amd64-deb 0.01MB ⚠️ 1187.98MB 1187.97MB 140.00MB
datadog-dogstatsd-amd64-deb 0.00MB 78.57MB 78.57MB 10.00MB
datadog-dogstatsd-x86_64-rpm 0.00MB 78.64MB 78.64MB 10.00MB
datadog-dogstatsd-x86_64-suse 0.00MB 78.64MB 78.64MB 10.00MB
datadog-dogstatsd-arm64-deb 0.00MB 55.77MB 55.77MB 10.00MB
datadog-iot-agent-amd64-deb 0.00MB 113.33MB 113.33MB 10.00MB
datadog-iot-agent-x86_64-rpm 0.00MB 113.40MB 113.40MB 10.00MB
datadog-iot-agent-x86_64-suse 0.00MB 113.40MB 113.40MB 10.00MB
datadog-iot-agent-arm64-deb 0.00MB 108.80MB 108.80MB 10.00MB
datadog-iot-agent-aarch64-rpm 0.00MB 108.87MB 108.87MB 10.00MB
datadog-heroku-agent-amd64-deb -1.40MB 504.87MB 506.28MB 70.00MB
datadog-agent-aarch64-rpm -1.42MB 943.19MB 944.60MB 140.00MB
datadog-agent-arm64-deb -1.42MB 933.95MB 935.36MB 140.00MB

Decision

⚠️ Warning

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Dec 18, 2024

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv aws.create-vm --pipeline-id=51682520 --os-family=ubuntu

Note: This applies to commit 918a260

Copy link

cit-pr-commenter bot commented Dec 18, 2024

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 0baf22cf-a21f-4550-a31d-ea0eff9e1f6a

Baseline: c60d01f
Comparison: 918a260
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
file_to_blackhole_1000ms_latency egress throughput +0.31 [-0.47, +1.09] 1 Logs
quality_gate_idle memory utilization +0.31 [+0.27, +0.34] 1 Logs bounds checks dashboard
quality_gate_idle_all_features memory utilization +0.20 [+0.11, +0.29] 1 Logs bounds checks dashboard
quality_gate_logs % cpu utilization +0.07 [-3.18, +3.32] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput +0.07 [-0.78, +0.92] 1 Logs
file_to_blackhole_300ms_latency egress throughput +0.07 [-0.57, +0.71] 1 Logs
file_to_blackhole_1000ms_latency_linear_load egress throughput +0.07 [-0.40, +0.53] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.03 [-0.73, +0.80] 1 Logs
otel_to_otel_logs ingress throughput +0.02 [-0.66, +0.71] 1 Logs
file_to_blackhole_500ms_latency egress throughput +0.01 [-0.76, +0.78] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.01 [-0.11, +0.12] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.00 [-0.87, +0.87] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.02, +0.02] 1 Logs
file_to_blackhole_0ms_latency_http2 egress throughput -0.02 [-0.88, +0.85] 1 Logs
tcp_syslog_to_blackhole ingress throughput -0.25 [-0.34, -0.16] 1 Logs
file_tree memory utilization -0.48 [-0.61, -0.35] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization -1.65 [-2.32, -0.98] 1 Logs

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_0ms_latency_http1 lost_bytes 10/10
file_to_blackhole_0ms_latency_http1 memory_usage 10/10
file_to_blackhole_0ms_latency_http2 lost_bytes 10/10
file_to_blackhole_0ms_latency_http2 memory_usage 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency_linear_load memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_300ms_latency lost_bytes 10/10
file_to_blackhole_300ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs lost_bytes 10/10
quality_gate_logs memory_usage 10/10

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.

@aboitreaud aboitreaud force-pushed the adrien.boitreaud/djm-install-script-emr branch 2 times, most recently from b08ec60 to e69d123 Compare December 18, 2024 12:33
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Dec 18, 2024

Gitlab CI Configuration Changes

Modified Jobs

installer-install-scripts
  installer-install-scripts:
    artifacts:
      expire_in: 2 weeks
      paths:
      - $OMNIBUS_PACKAGE_DIR
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
    - go_mod_tidy_check
    - go_deps
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - when: on_success
    script:
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
    - rm -f modcache.tar.xz
    - echo "About to build for $RELEASE_VERSION"
    - mkdir -p $OMNIBUS_PACKAGE_DIR
    - inv -e installer.build-linux-script "databricks" "$RELEASE_VERSION"
+   - inv -e installer.build-linux-script "emr" "$RELEASE_VERSION"
    - mv ./bin/installer/install-*.sh $OMNIBUS_PACKAGE_DIR/
    - ls -la $OMNIBUS_PACKAGE_DIR
    stage: package_build
    tags:
    - arch:amd64
    variables:
      KUBERNETES_CPU_REQUEST: 8
      KUBERNETES_MEMORY_LIMIT: 16Gi
      KUBERNETES_MEMORY_REQUEST: 16Gi
      RELEASE_VERSION: $RELEASE_VERSION_7

Changes Summary

Removed Modified Added Renamed
0 1 0 0

ℹ️ Diff available in the job log.

@aboitreaud aboitreaud force-pushed the adrien.boitreaud/djm-install-script-emr branch from 39a41a9 to 3f00482 Compare December 19, 2024 08:53
@raphaelgavache raphaelgavache added team/fleet-automation qa/done QA done before merge and regressions are covered by tests changelog/no-changelog labels Dec 19, 2024
@aboitreaud aboitreaud force-pushed the adrien.boitreaud/djm-install-script-emr branch from 677d732 to 3d97699 Compare December 19, 2024 10:42
@aboitreaud aboitreaud marked this pull request as ready for review December 19, 2024 10:52
@aboitreaud aboitreaud requested review from a team as code owners December 19, 2024 10:52
@aboitreaud aboitreaud force-pushed the adrien.boitreaud/djm-install-script-emr branch from 17f91b6 to dd7289b Compare December 19, 2024 12:58
@aboitreaud aboitreaud force-pushed the adrien.boitreaud/djm-install-script-emr branch 3 times, most recently from 1b58b8d to 5126a80 Compare December 19, 2024 16:16
@github-actions github-actions bot removed the medium review PR review might take time label Dec 20, 2024
@dd-devflow
Copy link

dd-devflow bot commented Dec 20, 2024

Devflow running: /merge

View all feedbacks in Devflow UI.


2024-12-20 10:50:57 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2024-12-20 14:50:59 UTC ⚠️ MergeQueue: This merge request was unqueued

adrien.boitreaud@datadoghq.com unqueued this merge request: It did not become mergeable within the expected time


tests := []struct {
name string
env map[string]string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this is used

@aboitreaud aboitreaud force-pushed the adrien.boitreaud/djm-install-script-emr branch from 5126a80 to ad9ff10 Compare December 20, 2024 13:00
Copy link
Contributor

@paul-laffon-dd paul-laffon-dd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This definitely makes it easier to handle the installation for DJM!

pkg/fleet/installer/setup/djm/emr.go Outdated Show resolved Hide resolved
pkg/fleet/installer/setup/djm/emr.go Outdated Show resolved Hide resolved
pkg/fleet/installer/setup/djm/emr.go Show resolved Hide resolved
pkg/fleet/installer/setup/djm/emr.go Show resolved Hide resolved
pkg/fleet/installer/setup/djm/emr.go Outdated Show resolved Hide resolved
pkg/fleet/installer/setup/djm/emr.go Outdated Show resolved Hide resolved
pkg/fleet/installer/setup/djm/emr.go Outdated Show resolved Hide resolved
pkg/fleet/installer/setup/djm/emr.go Outdated Show resolved Hide resolved
@aboitreaud aboitreaud force-pushed the adrien.boitreaud/djm-install-script-emr branch from 3aba9cc to c9cd812 Compare December 20, 2024 14:03
@aboitreaud aboitreaud force-pushed the adrien.boitreaud/djm-install-script-emr branch from c9cd812 to 6a7354c Compare December 20, 2024 14:15
Comment on lines 133 to 146
if err != nil {
log.Warn("error describing emr cluster, using cluster id as name")
return info.IsMaster, extraInfo.JobFlowID, nil
}
var response emrResponse
if err = json.Unmarshal(emrResponseRaw, &response); err != nil {
return info.IsMaster, extraInfo.JobFlowID, fmt.Errorf("error unmarshalling AWS EMR response, using cluster id as name: %w", err)
}
clusterName := response.Cluster.Name
if clusterName == "" {
log.Warn("clusterName is empty, using cluster id as name")
clusterName = extraInfo.JobFlowID
}
setHostTag(s, "cluster_name", clusterName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's never return an error if anything fails on the describe-cluster and just use the cluster id as a fallback for the name

Since this operation can be a source of error, i think we should create a span for it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the good idea. I addressed it by isolating the command execution in a separate function and having spans for it so the error is easily trackable.

@aboitreaud
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Dec 23, 2024

Devflow running: /merge

View all feedbacks in Devflow UI.


2024-12-23 13:56:53 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 35m.


2024-12-23 14:36:59 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit e6a3e06 into main Dec 23, 2024
240 checks passed
@dd-mergequeue dd-mergequeue bot deleted the adrien.boitreaud/djm-install-script-emr branch December 23, 2024 14:36
@github-actions github-actions bot added this to the 7.62.0 milestone Dec 23, 2024
louis-cqrl pushed a commit that referenced this pull request Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog long review PR is complex, plan time to review it qa/done QA done before merge and regressions are covered by tests team/fleet-automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants