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

Deploy Fleet Automation installation script in Agent Release Management #32860

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

julien-lebot
Copy link
Contributor

What does this PR do?

This PR removes the jobs that were deploying the PowerShell install script for Fleet Automation in the Agent pipeline in favor of deploying it in the Agent release management repository.

Motivation

More reliable deployment for the Fleet Automation install script for Windows.

Describe how you validated your changes

Possible Drawbacks / Trade-offs

Additional Notes

@julien-lebot julien-lebot added changelog/no-changelog qa/no-code-change No code change in Agent code requiring validation labels Jan 10, 2025
@julien-lebot julien-lebot added this to the Triage milestone Jan 10, 2025
@github-actions github-actions bot added the medium review PR review might take time label Jan 10, 2025
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Jan 10, 2025

Gitlab CI Configuration Changes

Modified Jobs

stages (configuration)
  stages:
  - .pre
  - setup
  - maintenance_jobs
  - deps_build
  - deps_fetch
  - lint
  - source_test
  - source_test_stats
  - software_composition_analysis
  - binary_build
  - package_deps_build
  - kernel_matrix_testing_prepare
  - kernel_matrix_testing_system_probe
  - kernel_matrix_testing_security_agent
  - kernel_matrix_testing_cleanup
  - integration_test
  - benchmarks
  - package_build
  - packaging
  - pkg_metrics
  - container_build
  - container_scan
  - check_deploy
  - dev_container_deploy
  - deploy_containers
  - deploy_packages
  - deploy_cws_instrumentation
  - deploy_dca
- - choco_and_install_script_build
+ - choco_build
  - trigger_release
  - install_script_deploy
  - internal_image_deploy
  - e2e_deploy
  - install_script_testing
  - e2e_pre_test
  - e2e_init
  - e2e
  - e2e_cleanup
  - e2e_k8s
  - e2e_install_packages
  - functional_test
  - junit_upload
  - internal_kubernetes_deploy
  - post_rc_build
  - check_merge
  - notify
  - .post
.windows_choco_7_x64
  .windows_choco_7_x64:
    artifacts:
      expire_in: 2 weeks
      paths:
      - omnibus/pkg
    retry: 2
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - allow_failure: true
      if: $BUCKET_BRANCH != "beta" && $BUCKET_BRANCH != "stable"
      when: manual
    - if: $DEPLOY_AGENT == "true" || $DDR_WORKFLOW_ID != null
    script:
    - $_instance_id = (iwr  -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
      ; Write-Host "Running on instance $($_instance_id)"
    - $ErrorActionPreference = "Stop"
    - if (Test-Path build-out) { remove-item -recurse -force build-out }
    - 'docker run --rm -v "$(Get-Location):c:\mnt" -e CI_PROJECT_NAME=${CI_PROJECT_NAME}
      -e CI_PIPELINE_ID=${CI_PIPELINE_ID} -e BUCKET_BRANCH="$BUCKET_BRANCH" -e AWS_NETWORKING=true
      ${WINBUILDIMAGE} powershell.exe -C "C:\mnt\tasks\winbuildscripts\Generate-Chocolatey-Package.ps1
      -MSIDirectory c:\mnt\omnibus\pkg -Flavor $FLAVOR -InstallDeps 1"
  
      '
    - If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
    - $CopyNupkgToS3 = "$S3_CP_CMD --recursive --exclude '*' --include '*.nupkg' build-out
      $S3_RELEASE_ARTIFACTS_URI/choco/nupkg"
    - Invoke-Expression $CopyNupkgToS3
-   stage: choco_and_install_script_build
+   stage: choco_build
    tags:
    - runner:windows-docker
    - windowsversion:2022
    variables:
      ARCH: x64
      WINBUILDIMAGE: registry.ddbuild.io/ci/datadog-agent-buildimages/windows_ltsc2022_${ARCH}${DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${DATADOG_AGENT_WINBUILDIMAGES}
deploy_installer_packages_windows-x64
  deploy_installer_packages_windows-x64:
    before_script:
    - ls $OMNIBUS_PACKAGE_DIR
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/gitlab_agent_deploy$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
    - windows-installer-amd64
+   - powershell_script_signing
    rules:
    - if: $DEPLOY_INSTALLER == "true" || $DDR_WORKFLOW_ID != null
    script:
    - $S3_CP_CMD --recursive --exclude "*" --include "datadog-installer-*-1-x86_64.msi"
      --include "datadog-installer-*-1-x86_64.debug.zip" --include "datadog-installer-*-1-x86_64.zip"
      --include "datadog-installer-*-1-x86_64.exe" $OMNIBUS_PACKAGE_DIR $S3_RELEASE_INSTALLER_ARTIFACTS_URI/msi/x86_64/
+   - $S3_CP_CMD $WINDOWS_POWERSHELL_DIR/Install-Datadog.ps1 $S3_RELEASE_INSTALLER_ARTIFACTS_URI
    stage: deploy_packages
    tags:
    - arch:amd64
powershell_script_signing
  powershell_script_signing:
    artifacts:
      expire_in: 2 weeks
      paths:
      - $WINDOWS_POWERSHELL_DIR
    needs: []
    rules:
+   - if: $DEPLOY_INSTALLER == "true" || $DDR_WORKFLOW_ID != null
-   - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
-     when: never
-   - allow_failure: true
-     when: manual
    script:
    - mkdir $WINDOWS_POWERSHELL_DIR
    - docker run --rm -v "$(Get-Location):c:\mnt" -e AWS_NETWORKING=true -e IS_AWS_CONTAINER=true
      ${WINBUILDIMAGE} powershell -C "dd-wcs sign \mnt\tools\windows\DatadogAgentInstallScript\Install-Datadog.ps1"
    - copy .\tools\windows\DatadogAgentInstallScript\Install-Datadog.ps1 $WINDOWS_POWERSHELL_DIR\Install-Datadog.ps1
-   stage: choco_and_install_script_build
+   stage: deploy_packages
    tags:
    - runner:windows-docker
    - windowsversion:2022
    variables:
      ARCH: x64
      WINBUILDIMAGE: registry.ddbuild.io/ci/datadog-agent-buildimages/windows_ltsc2022_${ARCH}${DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${DATADOG_AGENT_WINBUILDIMAGES}
windows_choco_7_x64
  windows_choco_7_x64:
    artifacts:
      expire_in: 2 weeks
      paths:
      - omnibus/pkg
    needs:
    - windows_msi_and_bosh_zip_x64-a7
    retry: 2
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - allow_failure: true
      if: $BUCKET_BRANCH != "beta" && $BUCKET_BRANCH != "stable"
      when: manual
    - if: $DEPLOY_AGENT == "true" || $DDR_WORKFLOW_ID != null
    script:
    - $_instance_id = (iwr  -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
      ; Write-Host "Running on instance $($_instance_id)"
    - $ErrorActionPreference = "Stop"
    - if (Test-Path build-out) { remove-item -recurse -force build-out }
    - 'docker run --rm -v "$(Get-Location):c:\mnt" -e CI_PROJECT_NAME=${CI_PROJECT_NAME}
      -e CI_PIPELINE_ID=${CI_PIPELINE_ID} -e BUCKET_BRANCH="$BUCKET_BRANCH" -e AWS_NETWORKING=true
      ${WINBUILDIMAGE} powershell.exe -C "C:\mnt\tasks\winbuildscripts\Generate-Chocolatey-Package.ps1
      -MSIDirectory c:\mnt\omnibus\pkg -Flavor $FLAVOR -InstallDeps 1"
  
      '
    - If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
    - $CopyNupkgToS3 = "$S3_CP_CMD --recursive --exclude '*' --include '*.nupkg' build-out
      $S3_RELEASE_ARTIFACTS_URI/choco/nupkg"
    - Invoke-Expression $CopyNupkgToS3
-   stage: choco_and_install_script_build
+   stage: choco_build
    tags:
    - runner:windows-docker
    - windowsversion:2022
    variables:
      ARCH: x64
      FLAVOR: datadog-agent
      WINBUILDIMAGE: registry.ddbuild.io/ci/datadog-agent-buildimages/windows_ltsc2022_${ARCH}${DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${DATADOG_AGENT_WINBUILDIMAGES}
windows_choco_7_x64-fips
  windows_choco_7_x64-fips:
    artifacts:
      expire_in: 2 weeks
      paths:
      - omnibus/pkg
    needs:
    - windows_msi_and_bosh_zip_x64-a7-fips
    retry: 2
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - allow_failure: true
      if: $BUCKET_BRANCH != "beta" && $BUCKET_BRANCH != "stable"
      when: manual
    - if: $DEPLOY_AGENT == "true" || $DDR_WORKFLOW_ID != null
    script:
    - $_instance_id = (iwr  -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
      ; Write-Host "Running on instance $($_instance_id)"
    - $ErrorActionPreference = "Stop"
    - if (Test-Path build-out) { remove-item -recurse -force build-out }
    - 'docker run --rm -v "$(Get-Location):c:\mnt" -e CI_PROJECT_NAME=${CI_PROJECT_NAME}
      -e CI_PIPELINE_ID=${CI_PIPELINE_ID} -e BUCKET_BRANCH="$BUCKET_BRANCH" -e AWS_NETWORKING=true
      ${WINBUILDIMAGE} powershell.exe -C "C:\mnt\tasks\winbuildscripts\Generate-Chocolatey-Package.ps1
      -MSIDirectory c:\mnt\omnibus\pkg -Flavor $FLAVOR -InstallDeps 1"
  
      '
    - If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
    - $CopyNupkgToS3 = "$S3_CP_CMD --recursive --exclude '*' --include '*.nupkg' build-out
      $S3_RELEASE_ARTIFACTS_URI/choco/nupkg"
    - Invoke-Expression $CopyNupkgToS3
-   stage: choco_and_install_script_build
+   stage: choco_build
    tags:
    - runner:windows-docker
    - windowsversion:2022
    variables:
      ARCH: x64
      FLAVOR: datadog-fips-agent
      WINBUILDIMAGE: registry.ddbuild.io/ci/datadog-agent-buildimages/windows_ltsc2022_${ARCH}${DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${DATADOG_AGENT_WINBUILDIMAGES}

Removed Jobs

  • powershell_script_deploy
  • windows_bootstrapper_deploy

Changes Summary

Removed Modified Added Renamed
2 6 0 0

ℹ️ Diff available in the job log.

@julien-lebot julien-lebot marked this pull request as ready for review January 10, 2025 13:56
@julien-lebot julien-lebot requested review from a team as code owners January 10, 2025 13:56
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Jan 10, 2025

[Fast Unit Tests Report]

On pipeline 52685707 (CI Visibility). The following jobs did not run any unit tests:

Jobs:
  • tests_deb-arm64-py3
  • tests_deb-x64-py3
  • tests_flavor_dogstatsd_deb-x64
  • tests_flavor_heroku_deb-x64
  • tests_flavor_iot_deb-x64
  • tests_rpm-arm64-py3
  • tests_rpm-x64-py3
  • tests_windows-x64

If you modified Go files and expected unit tests to run in these jobs, please double check the job logs. If you think tests should have been executed reach out to #agent-devx-help

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Jan 10, 2025

Uncompressed package size comparison

Comparison with ancestor f8433edd0418b05408e96c7598c4f52fb3c49ae6

Diff per package
package diff status size ancestor threshold
datadog-agent-amd64-deb 0.00MB 1010.16MB 1010.16MB 0.50MB
datadog-agent-arm64-deb 0.00MB 939.94MB 939.94MB 0.50MB
datadog-heroku-agent-amd64-deb 0.00MB 506.57MB 506.57MB 0.50MB
datadog-agent-x86_64-rpm 0.00MB 1019.48MB 1019.48MB 0.50MB
datadog-agent-x86_64-suse 0.00MB 1019.48MB 1019.48MB 0.50MB
datadog-agent-aarch64-rpm 0.00MB 949.24MB 949.24MB 0.50MB
datadog-dogstatsd-amd64-deb 0.00MB 58.83MB 58.83MB 0.50MB
datadog-dogstatsd-x86_64-rpm 0.00MB 58.90MB 58.90MB 0.50MB
datadog-dogstatsd-x86_64-suse 0.00MB 58.90MB 58.90MB 0.50MB
datadog-dogstatsd-arm64-deb 0.00MB 56.33MB 56.33MB 0.50MB
datadog-iot-agent-amd64-deb 0.00MB 114.00MB 114.00MB 0.50MB
datadog-iot-agent-x86_64-rpm 0.00MB 114.07MB 114.07MB 0.50MB
datadog-iot-agent-x86_64-suse 0.00MB 114.07MB 114.07MB 0.50MB
datadog-iot-agent-arm64-deb 0.00MB 109.44MB 109.44MB 0.50MB
datadog-iot-agent-aarch64-rpm 0.00MB 109.51MB 109.51MB 0.50MB

Decision

✅ Passed

Copy link

cit-pr-commenter bot commented Jan 10, 2025

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: abacfc82-2ce7-43f1-a6d5-fce37af5a055

Baseline: f8433ed
Comparison: 553e109
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
tcp_syslog_to_blackhole ingress throughput +1.33 [+1.26, +1.39] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization +0.79 [+0.11, +1.47] 1 Logs
file_tree memory utilization +0.60 [+0.47, +0.74] 1 Logs
quality_gate_idle_all_features memory utilization +0.41 [+0.32, +0.50] 1 Logs bounds checks dashboard
quality_gate_idle memory utilization +0.35 [+0.32, +0.39] 1 Logs bounds checks dashboard
file_to_blackhole_1000ms_latency_linear_load egress throughput +0.14 [-0.33, +0.61] 1 Logs
file_to_blackhole_0ms_latency_http2 egress throughput +0.04 [-0.80, +0.88] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput +0.03 [-0.89, +0.94] 1 Logs
file_to_blackhole_300ms_latency egress throughput +0.02 [-0.62, +0.65] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.01 [-0.11, +0.13] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.01, +0.01] 1 Logs
file_to_blackhole_0ms_latency egress throughput -0.02 [-0.92, +0.88] 1 Logs
file_to_blackhole_100ms_latency egress throughput -0.05 [-0.79, +0.69] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.07 [-0.83, +0.70] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.18 [-0.95, +0.59] 1 Logs
quality_gate_logs % cpu utilization -1.87 [-5.06, +1.33] 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_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, 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.

Copy link
Contributor

@clarkb7 clarkb7 left a comment

Choose a reason for hiding this comment

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

besides a possible typo, lgtm

.gitlab/deploy_packages/windows.yml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog medium review PR review might take time qa/no-code-change No code change in Agent code requiring validation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants