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

ci(pipeline_source): Adapt rules following update on scheduled pipelines #34244

Merged
merged 6 commits into from
Feb 24, 2025

Conversation

chouetz
Copy link
Member

@chouetz chouetz commented Feb 20, 2025

What does this PR do?

  • Prevent usage of the schedule pipeline_source for the main branch as scheduled pipelines are now triggered by conductor.
  • Add a condition on the task to send daily/weekly summary to identify the conductor-scheduled pipeline using the pipeline creation date.

Motivation

As per ddci migration the pipeline_source will change for pushes. I thus checked other usages of the pipeline source and detected these must be changed
https://datadoghq.atlassian.net/browse/ACIX-534

Describe how you validated your changes

Bad configuration is handled by gitlab-ci tests + UT

Possible Drawbacks / Trade-offs

Additional Notes

@chouetz chouetz requested review from a team as code owners February 20, 2025 11:07
@chouetz chouetz added changelog/no-changelog qa/no-code-change No code change in Agent code requiring validation labels Feb 20, 2025
@github-actions github-actions bot added the medium review PR review might take time label Feb 20, 2025
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Feb 20, 2025

Gitlab CI Configuration Changes

Modified Jobs

.if_scheduled_main
  .if_scheduled_main:
+   if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
-   if: ($CI_PIPELINE_SOURCE == "schedule" || ($DDR_WORKFLOW_ID != null && $APPS =~
-     /^beta-build-/)) && $CI_COMMIT_BRANCH == "main"
.on_scheduled_main
  .on_scheduled_main:
- - if: ($CI_PIPELINE_SOURCE == "schedule" || ($DDR_WORKFLOW_ID != null && $APPS =~
-     /^beta-build-/)) && $CI_COMMIT_BRANCH == "main"
+ - if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
+   when: always
.trace_agent_benchmarks
  .trace_agent_benchmarks:
    allow_failure: true
    artifacts:
      expire_in: 3 months
      name: artifacts
      paths:
      - platform/artifacts/
      when: always
    image: $BENCHMARKS_CI_IMAGE
    needs:
    - setup_agent_version
    rules:
+   - if: $CI_PIPELINE_SOURCE == "schedule"
+     when: always
+   - if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
+     when: always
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
-   - if: $CI_PIPELINE_SOURCE == "schedule"
-     when: always
    - allow_failure: true
      when: manual
    script:
    - git clone --branch trace-agent https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform
      platform && cd platform
    - ./steps/run-benchmarks.sh
    stage: benchmarks
    tags:
    - team:apm-k8s-tweaked-metal-datadog-agent
    - specific:true
    timeout: 1h
    variables:
      DD_APM_MAX_CPU_PERCENT: 0
      DD_APM_MAX_MEMORY: 0
      FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: 'true'
      TRACE_AGENT_CPUS: 40-41
build_processed_btfhub_archive
  build_processed_btfhub_archive:
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/btf-gen$DATADOG_AGENT_BTF_GEN_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BTF_GEN_BUILDIMAGES
    rules:
+   - if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
+     when: always
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
-   - if: ($CI_PIPELINE_SOURCE == "schedule" || ($DDR_WORKFLOW_ID != null && $APPS =~
-       /^beta-build-/)) && $CI_COMMIT_BRANCH == "main"
-     when: always
    - allow_failure: true
      when: manual
    script:
    - inv -e system-probe.process-btfhub-archive --branch $BTFHUB_ARCHIVE_BRANCH
    - $S3_CP_CMD btfs-x86_64.tar $S3_DD_AGENT_OMNIBUS_BTFS_URI/$BTFHUB_ARCHIVE_BRANCH/btfs-x86_64.tar
      --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
    - $S3_CP_CMD btfs-arm64.tar $S3_DD_AGENT_OMNIBUS_BTFS_URI/$BTFHUB_ARCHIVE_BRANCH/btfs-arm64.tar
      --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
    stage: deps_build
    tags:
    - arch:amd64
    variables:
      KUBERNETES_CPU_REQUEST: 32
cancel-prev-pipelines
  cancel-prev-pipelines:
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    rules:
-   - if: $CI_PIPELINE_SOURCE =~ /^schedule.*$/
-     when: never
    - if: $CI_COMMIT_TAG
      when: never
    - if: $CI_COMMIT_BRANCH == "main"
      when: never
    - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
      when: never
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $CI_COMMIT_MESSAGE =~ /.*\[skip cancel\].*/
      when: never
    - if: $CI_COMMIT_REF_NAME =~ /.*-skip-cancel$/
      when: never
    - when: on_success
    script:
    - GITLAB_TOKEN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $GITLAB_TOKEN write_api)
      || exit $?; export GITLAB_TOKEN
    - inv pipeline.auto-cancel-previous-pipelines
    stage: .pre
    tags:
    - arch:amd64
close_failing_tests_stale_issues
  close_failing_tests_stale_issues:
    allow_failure: true
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs: []
    rules:
+   - if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
-   - if: $CI_COMMIT_BRANCH != "main" || $CI_PIPELINE_SOURCE != "schedule"
-     when: never
-   - if: $BUCKET_BRANCH != "nightly" && $BUCKET_BRANCH != "oldnightly" && $BUCKET_BRANCH
-       != "dev"
-     when: never
-   - if: $DEPLOY_AGENT == "true" || $DDR_WORKFLOW_ID != null
      when: always
    script:
    - weekday="$(date --utc '+%A')"
    - "if [ \"$weekday\" != \"Friday\" ]; then\n  echo \"This script is run weekly on\
      \ Fridays\"\n  exit\nfi\n"
    - DD_API_KEY=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_API_KEY_ORG2 token)
      || exit $?; export DD_API_KEY
    - DD_APP_KEY=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_APP_KEY_ORG2 token)
      || exit $?; export DD_APP_KEY
    - ATLASSIAN_PASSWORD=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $ATLASSIAN_WRITE
      token) || exit $?; export ATLASSIAN_PASSWORD
    - ATLASSIAN_USERNAME=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $ATLASSIAN_WRITE
      user) || exit $?; export ATLASSIAN_USERNAME
    - python3 -m pip install -r requirements.txt -r tasks/requirements_release_tasks.txt
      --break-system-packages
    - inv -e notify.close-failing-tests-stale-issues
    stage: notify
    tags:
    - arch:arm64
do-not-merge
  do-not-merge:
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs: []
    rules:
-   - if: $CI_PIPELINE_SOURCE =~ /^schedule.*$/
-     when: never
    - if: $CI_COMMIT_TAG
      when: never
    - if: $CI_COMMIT_BRANCH == "main"
      when: never
    - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
      when: never
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - when: always
    script:
    - "if [ ! -z \"$DATADOG_AGENT_BUILDIMAGES_SUFFIX\" ] ||\n   [ ! -z \"$DATADOG_AGENT_WINBUILDIMAGES_SUFFIX\"\
      \ ] ||\n   [ ! -z \"$DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX\" ] ||\n   [ ! -z \"\
      $DATADOG_AGENT_SYSPROBE_BUILDIMAGES_SUFFIX\" ] ||\n   [ ! -z \"$DATADOG_AGENT_BTF_GEN_BUILDIMAGES_SUFFIX\"\
      \ ] ||\n   [ ! -z \"$TEST_INFRA_DEFINITIONS_BUILDIMAGES_SUFFIX\" ]; then\n  echo\
      \ \"Pull request uses non-empty BUILDIMAGES_SUFFIX variable\"\n  echo \"This workflow\
      \ fails so that the pull request cannot be merged\"\n  exit 1\nfi\n"
    - inv -e release.check-omnibus-branches --no-worktree || exit 1
    - exit 0
    stage: check_merge
    tags:
    - arch:amd64
notify_failure_summary_daily
  notify_failure_summary_daily:
    allow_failure: true
    dependencies: []
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    resource_group: notification
    rules:
+   - if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
-   - if: $CI_COMMIT_BRANCH != "main" || $CI_PIPELINE_SOURCE != "schedule"
-     when: never
-   - if: $BUCKET_BRANCH != "nightly" && $BUCKET_BRANCH != "oldnightly" && $BUCKET_BRANCH
-       != "dev"
-     when: never
-   - if: $DEPLOY_AGENT == "true" || $DDR_WORKFLOW_ID != null
      when: always
    script:
    - SLACK_DATADOG_AGENT_BOT_TOKEN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SLACK_AGENT
      token) || exit $?; export SLACK_DATADOG_AGENT_BOT_TOKEN
    - GITLAB_TOKEN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $GITLAB_TOKEN read_api)
      || exit $?; export GITLAB_TOKEN
    - DD_API_KEY=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_API_KEY_ORG2 token)
      || exit $?; export DD_API_KEY
    - python3 -m pip install -r requirements.txt -r tasks/libs/requirements-notifications.txt
    - weekday="$(date --utc '+%A')"
    - "if [ \"$weekday\" = \"Sunday\" ] || [ \"$weekday\" = \"Monday\" ]; then\n  echo\
      \ \"Skipping daily summary on $weekday\"\n  exit\nfi\n"
    - inv -e notify.failure-summary-send-notifications --daily-summary
    - "if [ \"$weekday\" = \"Friday\" ]; then\n  echo 'Sending weekly summary'\n  inv\
      \ -e notify.failure-summary-send-notifications --weekly-summary\nfi\n"
    stage: notify
    tags:
    - arch:amd64
    timeout: 15 minutes
notify_failure_summary_on_pipeline
  notify_failure_summary_on_pipeline:
    allow_failure: true
    dependencies: []
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    resource_group: notification
    rules:
+   - if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
+     when: always
-   - if: $CI_PIPELINE_SOURCE != "push" && $CI_PIPELINE_SOURCE != "schedule"
?                                                                  ^^^^^^^^
+   - if: $CI_PIPELINE_SOURCE != "push" && $CI_PIPELINE_SOURCE != "api"
?                                                                  ^^^
      when: never
    - if: $CI_COMMIT_BRANCH == "main"
      when: always
    script:
    - SLACK_DATADOG_AGENT_BOT_TOKEN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SLACK_AGENT
      token) || exit $?; export SLACK_DATADOG_AGENT_BOT_TOKEN
    - GITLAB_TOKEN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $GITLAB_TOKEN read_api)
      || exit $?; export GITLAB_TOKEN
    - DD_API_KEY=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_API_KEY_ORG2 token)
      || exit $?; export DD_API_KEY
    - python3 -m pip install -r requirements.txt -r tasks/libs/requirements-notifications.txt
    - inv -e notify.failure-summary-upload-pipeline-data
    stage: notify
    tags:
    - arch:amd64
    timeout: 15 minutes
trace-agent-v04-2cpus-normal_load-fixed_sps
  trace-agent-v04-2cpus-normal_load-fixed_sps:
    allow_failure: true
    artifacts:
      expire_in: 3 months
      name: artifacts
      paths:
      - platform/artifacts/
      when: always
    image: $BENCHMARKS_CI_IMAGE
    needs:
    - setup_agent_version
    rules:
+   - if: $CI_PIPELINE_SOURCE == "schedule"
+     when: always
+   - if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
+     when: always
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
-   - if: $CI_PIPELINE_SOURCE == "schedule"
-     when: always
    - allow_failure: true
      when: manual
    script:
    - git clone --branch trace-agent https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform
      platform && cd platform
    - ./steps/run-benchmarks.sh
    stage: benchmarks
    tags:
    - team:apm-k8s-tweaked-metal-datadog-agent
    - specific:true
    timeout: 1h
    variables:
      DD_APM_MAX_CPU_PERCENT: 0
      DD_APM_MAX_MEMORY: 0
      DD_BENCHMARKS_CONFIGURATION: trace-agent-v04-2cpus-normal_load-fixed_sps
      FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: 'true'
      SCENARIOS: 'normal_load-10traces210spans-65ksps| normal_load-500traces8617spans-65ksps|
        normal_load-3885traces3891spans-65ksps
  
        '
      TRACE_AGENT_CPUS: 40-41
      TRACE_AGENT_ENDPOINT: v04
trace-agent-v04-2cpus-stress_load-fixed_sps
  trace-agent-v04-2cpus-stress_load-fixed_sps:
    allow_failure: true
    artifacts:
      expire_in: 3 months
      name: artifacts
      paths:
      - platform/artifacts/
      when: always
    image: $BENCHMARKS_CI_IMAGE
    needs:
    - setup_agent_version
    rules:
+   - if: $CI_PIPELINE_SOURCE == "schedule"
+     when: always
+   - if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
+     when: always
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
-   - if: $CI_PIPELINE_SOURCE == "schedule"
-     when: always
    - allow_failure: true
      when: manual
    script:
    - git clone --branch trace-agent https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform
      platform && cd platform
    - ./steps/run-benchmarks.sh
    stage: benchmarks
    tags:
    - team:apm-k8s-tweaked-metal-datadog-agent
    - specific:true
    timeout: 1h
    variables:
      DD_APM_MAX_CPU_PERCENT: 0
      DD_APM_MAX_MEMORY: 0
      DD_BENCHMARKS_CONFIGURATION: trace-agent-v04-2cpus-stress_load-fixed_sps
      FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: 'true'
      SCENARIOS: 'stress_load-10traces210spans-525ksps| stress_load-500traces8617spans-525ksps|
        stress_load-3885traces3891spans-525ksps
  
        '
      TRACE_AGENT_CPUS: 40-41
      TRACE_AGENT_ENDPOINT: v04
trace-agent-v05-2cpus-normal_load-fixed_sps
  trace-agent-v05-2cpus-normal_load-fixed_sps:
    allow_failure: true
    artifacts:
      expire_in: 3 months
      name: artifacts
      paths:
      - platform/artifacts/
      when: always
    image: $BENCHMARKS_CI_IMAGE
    needs:
    - setup_agent_version
    rules:
+   - if: $CI_PIPELINE_SOURCE == "schedule"
+     when: always
+   - if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
+     when: always
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
-   - if: $CI_PIPELINE_SOURCE == "schedule"
-     when: always
    - allow_failure: true
      when: manual
    script:
    - git clone --branch trace-agent https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform
      platform && cd platform
    - ./steps/run-benchmarks.sh
    stage: benchmarks
    tags:
    - team:apm-k8s-tweaked-metal-datadog-agent
    - specific:true
    timeout: 1h
    variables:
      DD_APM_MAX_CPU_PERCENT: 0
      DD_APM_MAX_MEMORY: 0
      DD_BENCHMARKS_CONFIGURATION: trace-agent-v05-2cpus-normal_load-fixed_sps
      FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: 'true'
      SCENARIOS: 'normal_load-10traces210spans-65ksps| normal_load-500traces8617spans-65ksps|
        normal_load-3885traces3891spans-65ksps
  
        '
      TRACE_AGENT_CPUS: 40-41
      TRACE_AGENT_ENDPOINT: v05
trace-agent-v05-2cpus-stress_load-fixed_sps
  trace-agent-v05-2cpus-stress_load-fixed_sps:
    allow_failure: true
    artifacts:
      expire_in: 3 months
      name: artifacts
      paths:
      - platform/artifacts/
      when: always
    image: $BENCHMARKS_CI_IMAGE
    needs:
    - setup_agent_version
    rules:
+   - if: $CI_PIPELINE_SOURCE == "schedule"
+     when: always
+   - if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
+     when: always
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
-   - if: $CI_PIPELINE_SOURCE == "schedule"
-     when: always
    - allow_failure: true
      when: manual
    script:
    - git clone --branch trace-agent https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform
      platform && cd platform
    - ./steps/run-benchmarks.sh
    stage: benchmarks
    tags:
    - team:apm-k8s-tweaked-metal-datadog-agent
    - specific:true
    timeout: 1h
    variables:
      DD_APM_MAX_CPU_PERCENT: 0
      DD_APM_MAX_MEMORY: 0
      DD_BENCHMARKS_CONFIGURATION: trace-agent-v05-2cpus-stress_load-fixed_sps
      FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: 'true'
      SCENARIOS: 'stress_load-10traces210spans-525ksps| stress_load-500traces8617spans-525ksps|
        stress_load-3885traces3891spans-525ksps
  
        '
      TRACE_AGENT_CPUS: 40-41
      TRACE_AGENT_ENDPOINT: v05

Removed Jobs

  • .on_scheduled_main_or_manual
  • single_machine_performance-nightly-amd64-a7

Changes Summary

Removed Modified Added Renamed
2 13 0 0

ℹ️ Diff available in the job log.

@chouetz chouetz force-pushed the nschweitzer/schedule_source branch from cd16d70 to 91c7510 Compare February 20, 2025 11:11
@chouetz chouetz requested review from a team as code owners February 20, 2025 11:11
@@ -3,8 +3,6 @@ cancel-prev-pipelines:
image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:amd64"]
rules: # this should only run on dev branches
- if: $CI_PIPELINE_SOURCE =~ /^schedule.*$/
Copy link
Member Author

Choose a reason for hiding this comment

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

Release branches are excluded below so we don't need this condition

- when: manual
allow_failure: true
- !reference [.on_scheduled_main]
- !reference [.manual]
Copy link
Member Author

Choose a reason for hiding this comment

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

the manual condition contains the MQ exclusion

@@ -3,8 +3,6 @@ do-not-merge:
image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:amd64"]
rules: # this should only run on dev branches
- if: $CI_PIPELINE_SOURCE =~ /^schedule.*$/
Copy link
Member Author

Choose a reason for hiding this comment

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

Release branches are excluded below so we don't need this condition

- !reference [.except_mergequeue]
- !reference [.on_scheduled_main_or_manual]
- !reference [.on_scheduled_main]
- !reference [.manual]
Copy link
Member Author

Choose a reason for hiding this comment

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

the manual condition contains the MQ exclusion

@@ -196,18 +196,6 @@ dev_nightly-ot-a7:
- IMG_SOURCES: ${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-ot-beta-jmx-amd64,${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-ot-beta-jmx-arm64
IMG_DESTINATIONS: agent-dev:nightly-ot-beta-${CI_COMMIT_REF_SLUG}-jmx

# deploy nightly build to single-machine-performance
Copy link
Member Author

Choose a reason for hiding this comment

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

Discussed with SMP, this jobs is not needed anymore

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Feb 20, 2025

[Fast Unit Tests Report]

On pipeline 56718454 (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 Feb 20, 2025

Uncompressed package size comparison

Comparison with ancestor dc5fc425460fbf98d591f1cf5457679aca0e8523

Diff per package
package diff status size ancestor threshold
datadog-agent-amd64-deb 0.00MB 866.74MB 866.74MB 0.50MB
datadog-agent-arm64-deb 0.00MB 856.05MB 856.05MB 0.50MB
datadog-agent-aarch64-rpm 0.00MB 865.80MB 865.80MB 0.50MB
datadog-dogstatsd-amd64-deb 0.00MB 41.40MB 41.40MB 0.50MB
datadog-dogstatsd-x86_64-rpm 0.00MB 41.48MB 41.48MB 0.50MB
datadog-dogstatsd-x86_64-suse 0.00MB 41.48MB 41.48MB 0.50MB
datadog-dogstatsd-arm64-deb 0.00MB 39.66MB 39.66MB 0.50MB
datadog-heroku-agent-amd64-deb 0.00MB 443.80MB 443.80MB 0.50MB
datadog-iot-agent-amd64-deb 0.00MB 62.02MB 62.02MB 0.50MB
datadog-iot-agent-x86_64-rpm 0.00MB 62.09MB 62.09MB 0.50MB
datadog-iot-agent-x86_64-suse 0.00MB 62.09MB 62.09MB 0.50MB
datadog-iot-agent-arm64-deb 0.00MB 59.26MB 59.26MB 0.50MB
datadog-iot-agent-aarch64-rpm 0.00MB 59.33MB 59.33MB 0.50MB
datadog-agent-x86_64-rpm -0.00MB 876.50MB 876.50MB 0.50MB
datadog-agent-x86_64-suse -0.00MB 876.50MB 876.50MB 0.50MB

Decision

✅ Passed

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Feb 20, 2025

Static quality checks ✅

Please find below the results from static quality gates

Successful checks

Info

Result Quality gate On disk size On disk size limit On wire size On wire size limit
static_quality_gate_agent_deb_amd64 837.88MiB 847.49MiB 202.56MiB 212.33MiB
static_quality_gate_agent_deb_arm64 827.67MiB 836.66MiB 182.58MiB 192.5MiB
static_quality_gate_agent_rpm_amd64 837.87MiB 847.82MiB 205.58MiB 215.76MiB
static_quality_gate_agent_rpm_arm64 827.66MiB 836.66MiB 185.11MiB 194.24MiB
static_quality_gate_agent_suse_amd64 837.87MiB 847.82MiB 205.58MiB 215.76MiB
static_quality_gate_agent_suse_arm64 827.66MiB 836.66MiB 185.11MiB 194.24MiB
static_quality_gate_dogstatsd_deb_amd64 39.56MiB 49.7MiB 10.55MiB 20.6MiB
static_quality_gate_dogstatsd_deb_arm64 37.9MiB 48.1MiB 9.13MiB 19.1MiB
static_quality_gate_dogstatsd_rpm_amd64 39.56MiB 49.7MiB 10.56MiB 20.6MiB
static_quality_gate_dogstatsd_suse_amd64 39.56MiB 49.7MiB 10.56MiB 20.6MiB
static_quality_gate_iot_agent_deb_amd64 59.22MiB 69.0MiB 14.88MiB 24.8MiB
static_quality_gate_iot_agent_deb_arm64 56.59MiB 66.4MiB 12.85MiB 22.8MiB
static_quality_gate_iot_agent_rpm_amd64 59.22MiB 69.0MiB 14.9MiB 24.8MiB
static_quality_gate_iot_agent_rpm_arm64 56.59MiB 66.4MiB 12.85MiB 22.8MiB
static_quality_gate_iot_agent_suse_amd64 59.22MiB 69.0MiB 14.9MiB 24.8MiB
static_quality_gate_docker_agent_amd64 922.7MiB 931.7MiB 308.75MiB 318.67MiB
static_quality_gate_docker_agent_arm64 935.78MiB 944.08MiB 293.74MiB 303.0MiB
static_quality_gate_docker_agent_jmx_amd64 1.09GiB 1.1GiB 383.85MiB 393.75MiB
static_quality_gate_docker_agent_jmx_arm64 1.1GiB 1.1GiB 364.81MiB 373.71MiB
static_quality_gate_docker_dogstatsd_amd64 47.7MiB 57.88MiB 18.26MiB 28.29MiB
static_quality_gate_docker_dogstatsd_arm64 46.09MiB 56.27MiB 17.02MiB 27.06MiB
static_quality_gate_docker_cluster_agent_amd64 264.95MiB 274.78MiB 106.33MiB 116.28MiB
static_quality_gate_docker_cluster_agent_arm64 280.91MiB 290.82MiB 101.19MiB 111.12MiB

Copy link

cit-pr-commenter bot commented Feb 20, 2025

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 35f23e07-8ece-4698-a989-2a41d26b6505

Baseline: dc5fc42
Comparison: ca86849
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
uds_dogstatsd_to_api_cpu % cpu utilization +2.21 [+1.28, +3.14] 1 Logs
quality_gate_idle memory utilization +0.21 [+0.16, +0.26] 1 Logs bounds checks dashboard
file_to_blackhole_500ms_latency egress throughput +0.16 [-0.61, +0.93] 1 Logs
file_tree memory utilization +0.06 [-0.00, +0.12] 1 Logs
file_to_blackhole_1000ms_latency_linear_load egress throughput +0.06 [-0.41, +0.53] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.02 [-0.86, +0.89] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.00 [-0.64, +0.65] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.02, +0.02] 1 Logs
uds_dogstatsd_to_api ingress throughput -0.01 [-0.31, +0.29] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput -0.01 [-0.82, +0.81] 1 Logs
file_to_blackhole_300ms_latency egress throughput -0.02 [-0.65, +0.61] 1 Logs
file_to_blackhole_0ms_latency_http2 egress throughput -0.04 [-0.82, +0.75] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.04 [-0.81, +0.73] 1 Logs
tcp_syslog_to_blackhole ingress throughput -0.14 [-0.21, -0.08] 1 Logs
quality_gate_logs % cpu utilization -0.29 [-3.29, +2.70] 1 Logs
quality_gate_idle_all_features memory utilization -0.52 [-0.57, -0.47] 1 Logs bounds checks dashboard

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 intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10
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_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@chouetz chouetz force-pushed the nschweitzer/schedule_source branch from 91c7510 to ae1c822 Compare February 20, 2025 13:27
Copy link
Member Author

Choose a reason for hiding this comment

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

The notify_failure_summary

  • uploads data for every push on main: it will change from push to api so we can exclude all other CI_PIPELINE_SOURCE
  • publish daily/weekly results on the scheduled main.

Similarly, we close stale jira cards on the scheduled main branch.
There are sometimes several conductor executions on main per day, I think we can accept that.

@chouetz chouetz added the ask-review Ask required teams to review this PR label Feb 20, 2025
Copy link
Member

@jennchenn jennchenn left a comment

Choose a reason for hiding this comment

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

lgtm for container-integrations owned file

Copy link
Contributor

@ajgajg1134 ajgajg1134 left a comment

Choose a reason for hiding this comment

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

Looks good for APM!

@chouetz chouetz requested a review from a team as a code owner February 20, 2025 17:48
@agent-platform-auto-pr
Copy link
Contributor

Static quality checks ❌

Please find below the results from static quality gates

Error

Result Quality gate On disk size On disk size limit On wire size On wire size limit
static_quality_gate_agent_suse_amd64 DataNotFound 847.82MiB DataNotFound 215.76MiB
Gate failure full details
Quality gate Error type Error message
static_quality_gate_agent_suse_amd64 StackTrace Traceback (most recent call last):
File "/go/src/github.com/DataDog/datadog-agent/tasks/quality_gates.py", line 121, in parse_and_trigger_gates
gate_mod.entrypoint(**gate_inputs)
File "/go/src/github.com/DataDog/datadog-agent/tasks/static_quality_gates/static_quality_gate_agent_suse_amd64.py", line 5, in entrypoint
generic_package_agent_quality_gate(
File "/go/src/github.com/DataDog/datadog-agent/tasks/static_quality_gates/lib/package_agent_lib.py", line 69, in generic_package_agent_quality_gate
package_on_wire_size, package_on_disk_size = calculate_package_size(
^^^^^^^^^^^^^^^^^^^^^^^
File "/go/src/github.com/DataDog/datadog-agent/tasks/static_quality_gates/lib/package_agent_lib.py", line 10, in calculate_package_size
extract_package(ctx=ctx, package_os=package_os, package_path=package_path, extract_dir=extract_dir)
File "/go/src/github.com/DataDog/datadog-agent/tasks/libs/package/size.py", line 72, in extract_package
return extract_rpm_package(ctx, package_path, extract_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/go/src/github.com/DataDog/datadog-agent/tasks/libs/package/size.py", line 65, in extract_rpm_package
ctx.run(f"rpm2cpio {package_path}
Successful checks

Info

Result Quality gate On disk size On disk size limit On wire size On wire size limit
static_quality_gate_agent_deb_amd64 837.52MiB 847.49MiB 202.37MiB 212.33MiB
static_quality_gate_agent_deb_arm64 826.6MiB 836.66MiB 182.5MiB 192.5MiB
static_quality_gate_agent_rpm_amd64 837.59MiB 847.82MiB 205.77MiB 215.76MiB
static_quality_gate_agent_rpm_arm64 826.51MiB 836.66MiB 184.07MiB 194.24MiB
static_quality_gate_agent_suse_arm64 826.48MiB 836.66MiB 184.07MiB 194.24MiB
static_quality_gate_dogstatsd_deb_amd64 39.52MiB 49.7MiB 10.54MiB 20.6MiB
static_quality_gate_dogstatsd_deb_arm64 37.86MiB 48.1MiB 9.12MiB 19.1MiB
static_quality_gate_dogstatsd_rpm_amd64 39.52MiB 49.7MiB 10.55MiB 20.6MiB
static_quality_gate_dogstatsd_suse_amd64 39.52MiB 49.7MiB 10.55MiB 20.6MiB
static_quality_gate_iot_agent_deb_amd64 59.01MiB 69.0MiB 14.84MiB 24.8MiB
static_quality_gate_iot_agent_deb_arm64 56.39MiB 66.4MiB 12.81MiB 22.8MiB
static_quality_gate_iot_agent_rpm_amd64 59.01MiB 69.0MiB 14.85MiB 24.8MiB
static_quality_gate_iot_agent_rpm_arm64 56.39MiB 66.4MiB 12.81MiB 22.8MiB
static_quality_gate_iot_agent_suse_amd64 59.01MiB 69.0MiB 14.85MiB 24.8MiB
static_quality_gate_docker_agent_amd64 921.91MiB 931.7MiB 308.29MiB 318.67MiB
static_quality_gate_docker_agent_arm64 934.25MiB 944.08MiB 292.32MiB 303.0MiB
static_quality_gate_docker_agent_jmx_amd64 1.09GiB 1.1GiB 383.38MiB 393.75MiB
static_quality_gate_docker_agent_jmx_arm64 1.09GiB 1.1GiB 363.43MiB 373.71MiB
static_quality_gate_docker_dogstatsd_amd64 47.67MiB 57.88MiB 18.25MiB 28.29MiB
static_quality_gate_docker_dogstatsd_arm64 46.05MiB 56.27MiB 17.01MiB 27.06MiB
static_quality_gate_docker_cluster_agent_amd64 264.78MiB 274.78MiB 106.28MiB 116.28MiB
static_quality_gate_docker_cluster_agent_arm64 280.82MiB 290.82MiB 101.13MiB 111.12MiB

Copy link
Contributor

@ddyurchenko ddyurchenko left a comment

Choose a reason for hiding this comment

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

Looks good!

@chouetz chouetz force-pushed the nschweitzer/schedule_source branch from d0f6bcd to 807b2c2 Compare February 24, 2025 09:14
@github-actions github-actions bot added long review PR is complex, plan time to review it and removed medium review PR review might take time labels Feb 24, 2025
tasks/notify.py Outdated
@@ -128,6 +128,14 @@ def failure_summary_send_notifications(
daily_summary or weekly_summary and not (daily_summary and weekly_summary)
), "Exactly one of daily or weekly summary must be set"

pipeline_start = datetime.fromisoformat(os.environ['CI_PIPELINE_CREATED_AT'])
if not (pipeline_start.hour == 6 and pipeline_start.minute < 30):
Copy link
Member Author

Choose a reason for hiding this comment

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

As discussed with @FlorentClarret we set a 30min delay to catch "scheduled" pipeline from conductor. As the start time is really early in the morning this is safe enough to validate this is the scheduled pipeline.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, it doesn't feel really proper, could you isolate this into a tiny function? Maybe something like is_nightly_pipeline()

tasks/notify.py Outdated
@@ -128,6 +128,14 @@ def failure_summary_send_notifications(
daily_summary or weekly_summary and not (daily_summary and weekly_summary)
), "Exactly one of daily or weekly summary must be set"

pipeline_start = datetime.fromisoformat(os.environ['CI_PIPELINE_CREATED_AT'])
if not (pipeline_start.hour == 6 and pipeline_start.minute < 30):
Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, it doesn't feel really proper, could you isolate this into a tiny function? Maybe something like is_nightly_pipeline()

@chouetz
Copy link
Member Author

chouetz commented Feb 24, 2025

/merge

@dd-devflow
Copy link

dd-devflow bot commented Feb 24, 2025

View all feedbacks in Devflow UI.
2025-02-24 10:02:57 UTC ℹ️ Start processing command /merge


2025-02-24 10:03:04 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.


2025-02-24 11:06:07 UTC ℹ️ MergeQueue: merge request added to the queue

The median merge time in main is 30m.


2025-02-24 11:31:11 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit f3ab028 into main Feb 24, 2025
237 of 239 checks passed
@dd-mergequeue dd-mergequeue bot deleted the nschweitzer/schedule_source branch February 24, 2025 11:31
@github-actions github-actions bot added this to the 7.65.0 milestone Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ask-review Ask required teams to review this PR changelog/no-changelog long review PR is complex, plan time to review it 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.

6 participants