Skip to content

Use clone strategy for sqg job to get correct ancestor#46859

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit intomainfrom
pgimalac/sqg-clone-git
Feb 24, 2026
Merged

Use clone strategy for sqg job to get correct ancestor#46859
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit intomainfrom
pgimalac/sqg-clone-git

Conversation

@pgimalac
Copy link
Copy Markdown
Member

What does this PR do?

Use clone strategy for sqg job.

Motivation

Get the correct ancestor in this job. When using s3 strategy some part of the history can be missing.

Describe how you validated your changes

CI

Additional Notes

@pgimalac pgimalac added changelog/no-changelog No changelog entry needed qa/no-code-change No code change in Agent code requiring validation team/agent-build labels Feb 24, 2026
@dd-octo-sts dd-octo-sts bot added the internal Identify a non-fork PR label Feb 24, 2026
@github-actions github-actions bot added the short review PR is simple enough to be reviewed quickly label Feb 24, 2026
@agent-platform-auto-pr
Copy link
Copy Markdown
Contributor

Gitlab CI Configuration Changes

Modified Jobs

static_quality_gates
  static_quality_gates:
    artifacts:
      expire_in: 1 week
      paths:
      - extract_rpm_package_report
      - static_gate_report.json
      when: always
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/docker_x64$CI_IMAGE_DOCKER_X64_SUFFIX:$CI_IMAGE_DOCKER_X64
    needs:
    - agent_deb-x64-a7
    - agent_deb-x64-a7-fips
    - agent_rpm-x64-a7
    - agent_rpm-x64-a7-fips
    - agent_rpm-arm64-a7
    - agent_rpm-arm64-a7-fips
    - agent_suse-x64-a7
    - agent_suse-x64-a7-fips
    - agent_suse-arm64-a7
    - agent_suse-arm64-a7-fips
    - agent_heroku_deb-x64-a7
    - docker_build_agent7
    - docker_build_agent7_arm64
    - docker_build_agent7_jmx
    - docker_build_agent7_jmx_arm64
    - docker_build_cluster_agent_amd64
    - docker_build_cluster_agent_arm64
    - docker_build_cws_instrumentation_amd64
    - docker_build_cws_instrumentation_arm64
    - docker_build_dogstatsd_amd64
    - docker_build_dogstatsd_arm64
    - dogstatsd_deb-x64
    - dogstatsd_deb-arm64
    - dogstatsd_rpm-x64
    - dogstatsd_suse-x64
    - iot_agent_deb-x64
    - iot_agent_deb-arm64
    - iot_agent_deb-armhf
    - iot_agent_rpm-x64
    - iot_agent_suse-x64
    - windows_msi_and_bosh_zip_x64-a7
    retry:
      exit_codes:
      - 42
      max: 2
      when:
      - runner_system_failure
      - stuck_or_timeout_failure
      - unknown_failure
      - api_failure
      - scheduler_failure
      - stale_schedule
      - data_integrity_failure
    rules:
    - if: $E2E_COVERAGE_PIPELINE == "true"
      when: never
    - if: $CI_COMMIT_BRANCH == "main"
    - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: on_success
    - 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_TAG != null
      when: never
    - changes:
        compare_to: $COMPARE_TO_BRANCH
        paths:
        - go.mod
        - go.sum
        - cmd/**/*
        - comp/**/*
        - internal/**/*
        - pkg/**/*
        - rtloader/**/*
        - tasks/**/*.py
        - deps/**/*
        - omnibus/**/*
        - .bazelrc
        - .bazelversion
        - bazel/**/*
        - BUILD.bazel
        - MODULE.bazel
        - release.json
        - test/regression/**/*
        - Dockerfiles/**/*
    - allow_failure: true
      when: manual
    script:
    - DOCKER_LOGIN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $DOCKER_REGISTRY_RO user)
      || exit $?
    - $CI_PROJECT_DIR/tools/ci/fetch_secret.sh $DOCKER_REGISTRY_RO token | crane auth
      login --username "$DOCKER_LOGIN" --password-stdin "$DOCKER_REGISTRY_URL"
    - EXIT="${PIPESTATUS[0]}"; if [ $EXIT -ne 0 ]; then echo "Unable to locate credentials
      needs gitlab runner restart"; exit $EXIT; fi
    - DATADOG_API_KEY="$("$CI_PROJECT_DIR"/tools/ci/fetch_secret.sh "$AGENT_API_KEY_ORG2"
      token)" || exit $?; export DATADOG_API_KEY
    - export DD_API_KEY="$DATADOG_API_KEY"
    - DD_APP_KEY="$("$CI_PROJECT_DIR"/tools/ci/fetch_secret.sh "$AGENT_APP_KEY_ORG2"
      token)" || exit $?; export DD_APP_KEY
    - GITHUB_KEY_B64=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_GITHUB_APP key_b64)
      || exit $?; export GITHUB_KEY_B64
    - GITHUB_APP_ID=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_GITHUB_APP app_id)
      || exit $?; export GITHUB_APP_ID
    - GITHUB_INSTALLATION_ID=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_GITHUB_APP
      installation_id) || exit $?; export GITHUB_INSTALLATION_ID
    - echo "Using agent GitHub App"
    - SLACK_DATADOG_AGENT_BOT_TOKEN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SLACK_AGENT
      token) || exit $?; export SLACK_DATADOG_AGENT_BOT_TOKEN
    - dda inv -- quality-gates.parse-and-trigger-gates || exit $?
    stage: functional_test
    tags:
    - arch:amd64
    - specific:true
    variables:
      GIT_DEPTH: 0
+     OVERRIDE_GIT_STRATEGY: clone

Changes Summary

Removed Modified Added Renamed
0 1 0 0

ℹ️ Diff available in the job log.

@agent-platform-auto-pr
Copy link
Copy Markdown
Contributor

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor 8aba893
📊 Static Quality Gates Dashboard
🔗 SQG Job

31 successful checks with minimal change (< 2 KiB)
Quality gate Current Size
agent_deb_amd64 743.863 MiB
agent_deb_amd64_fips 702.368 MiB
agent_heroku_amd64 310.982 MiB
agent_msi 607.443 MiB
agent_rpm_amd64 743.846 MiB
agent_rpm_amd64_fips 702.352 MiB
agent_rpm_arm64 721.949 MiB
agent_rpm_arm64_fips 683.492 MiB
agent_suse_amd64 743.846 MiB
agent_suse_amd64_fips 702.352 MiB
agent_suse_arm64 721.949 MiB
agent_suse_arm64_fips 683.492 MiB
docker_agent_amd64 804.880 MiB
docker_agent_arm64 807.722 MiB
docker_agent_jmx_amd64 995.791 MiB
docker_agent_jmx_arm64 987.416 MiB
docker_cluster_agent_amd64 203.414 MiB
docker_cluster_agent_arm64 217.834 MiB
docker_cws_instrumentation_amd64 7.135 MiB
docker_cws_instrumentation_arm64 6.689 MiB
docker_dogstatsd_amd64 38.504 MiB
docker_dogstatsd_arm64 36.812 MiB
dogstatsd_deb_amd64 29.724 MiB
dogstatsd_deb_arm64 27.885 MiB
dogstatsd_rpm_amd64 29.724 MiB
dogstatsd_suse_amd64 29.724 MiB
iot_agent_deb_amd64 42.613 MiB
iot_agent_deb_arm64 39.714 MiB
iot_agent_deb_armhf 40.439 MiB
iot_agent_rpm_amd64 42.613 MiB
iot_agent_suse_amd64 42.613 MiB
On-wire sizes (compressed)
Quality gate Change Size (prev → curr → max)
agent_deb_amd64 +35.93 KiB (0.02% increase) 173.710 → 173.746 → 186.090
agent_deb_amd64_fips +3.9 KiB (0.00% increase) 164.690 → 164.694 → 180.330
agent_heroku_amd64 +5.2 KiB (0.01% increase) 74.996 → 75.001 → 88.440
agent_msi +12.0 KiB (0.01% increase) 137.543 → 137.555 → 154.470
agent_rpm_amd64 -21.34 KiB (0.01% reduction) 175.623 → 175.602 → 189.170
agent_rpm_amd64_fips -24.93 KiB (0.01% reduction) 167.512 → 167.488 → 181.060
agent_rpm_arm64 -36.0 KiB (0.02% reduction) 157.895 → 157.860 → 170.020
agent_rpm_arm64_fips -6.38 KiB (0.00% reduction) 150.745 → 150.739 → 164.130
agent_suse_amd64 -21.34 KiB (0.01% reduction) 175.623 → 175.602 → 189.170
agent_suse_amd64_fips -24.93 KiB (0.01% reduction) 167.512 → 167.488 → 181.060
agent_suse_arm64 -36.0 KiB (0.02% reduction) 157.895 → 157.860 → 170.020
agent_suse_arm64_fips -6.38 KiB (0.00% reduction) 150.745 → 150.739 → 164.130
docker_agent_amd64 neutral 266.257 MiB → 279.410
docker_agent_arm64 neutral 253.528 MiB → 267.960
docker_agent_jmx_amd64 neutral 334.913 MiB → 348.040
docker_agent_jmx_arm64 neutral 318.173 MiB → 332.560
docker_cluster_agent_amd64 neutral 71.195 MiB → 71.920
docker_cluster_agent_arm64 neutral 66.831 MiB → 67.220
docker_cws_instrumentation_amd64 neutral 2.995 MiB → 3.330
docker_cws_instrumentation_arm64 neutral 2.726 MiB → 3.090
docker_dogstatsd_amd64 neutral 14.901 MiB → 15.820
docker_dogstatsd_arm64 neutral 14.236 MiB → 14.830
dogstatsd_deb_amd64 neutral 7.851 MiB → 8.790
dogstatsd_deb_arm64 neutral 6.742 MiB → 7.710
dogstatsd_rpm_amd64 neutral 7.865 MiB → 8.800
dogstatsd_suse_amd64 neutral 7.865 MiB → 8.800
iot_agent_deb_amd64 neutral 11.233 MiB → 12.040
iot_agent_deb_arm64 neutral 9.600 MiB → 10.450
iot_agent_deb_armhf neutral 9.800 MiB → 10.620
iot_agent_rpm_amd64 neutral 11.250 MiB → 12.060
iot_agent_suse_amd64 neutral 11.250 MiB → 12.060

@pgimalac pgimalac marked this pull request as ready for review February 24, 2026 16:44
@pgimalac pgimalac requested a review from a team as a code owner February 24, 2026 16:44
Copy link
Copy Markdown
Contributor

@rdesgroppes rdesgroppes left a comment

Choose a reason for hiding this comment

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

Freaking good catch, thanks @pgimalac!

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot merged commit af93157 into main Feb 24, 2026
300 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot deleted the pgimalac/sqg-clone-git branch February 24, 2026 18:23
@github-actions github-actions bot added this to the 7.78.0 milestone Feb 24, 2026
rdesgroppes added a commit that referenced this pull request Mar 23, 2026
### What does this PR do?
Sets GIT_DEPTH to 0 and OVERRIDE_GIT_STRATEGY to "clone" so
the job fetches the full commit history before determining
the ancestor for package size comparison.

### Motivation
The files inventory check was sometimes picking a wrong
ancestor commit due to a shallow clone, producing spurious
diffs (#43843). Same fix applied to
the static quality gate in #44001 and
#46859.
rdesgroppes added a commit that referenced this pull request Mar 23, 2026
### What does this PR do?
Sets GIT_DEPTH to 0 and OVERRIDE_GIT_STRATEGY to "clone" so
the job fetches the full commit history before determining
the ancestor for package size comparison.

### Motivation
The files inventory check was sometimes picking a wrong
ancestor commit due to a shallow clone, producing spurious
diffs (#43843). Same fix applied to
the static quality gate in #44001 and
#46859.
gh-worker-dd-mergequeue-cf854d bot pushed a commit that referenced this pull request Mar 23, 2026
### What does this PR do?
Set `GIT_DEPTH` to `0` so the job fetches the full commit history before determining the ancestor for package size comparison.

### Motivation
The files inventory check was sometimes picking a wrong ancestor commit due to a shallow clone, producing spurious diffs.
Same issue fixed for the static quality gate by #44001 together with #46859.

Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
aya-shimizu24 pushed a commit that referenced this pull request Mar 24, 2026
### What does this PR do?
Set `GIT_DEPTH` to `0` so the job fetches the full commit history before determining the ancestor for package size comparison.

### Motivation
The files inventory check was sometimes picking a wrong ancestor commit due to a shallow clone, producing spurious diffs.
Same issue fixed for the static quality gate by #44001 together with #46859.

Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
StephenWakely pushed a commit that referenced this pull request Mar 27, 2026
### What does this PR do?
Set `GIT_DEPTH` to `0` so the job fetches the full commit history before determining the ancestor for package size comparison.

### Motivation
The files inventory check was sometimes picking a wrong ancestor commit due to a shallow clone, producing spurious diffs.
Same issue fixed for the static quality gate by #44001 together with #46859.

Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
StephenWakely pushed a commit that referenced this pull request Mar 27, 2026
### What does this PR do?
Set `GIT_DEPTH` to `0` so the job fetches the full commit history before determining the ancestor for package size comparison.

### Motivation
The files inventory check was sometimes picking a wrong ancestor commit due to a shallow clone, producing spurious diffs.
Same issue fixed for the static quality gate by #44001 together with #46859.

Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog No changelog entry needed internal Identify a non-fork PR qa/no-code-change No code change in Agent code requiring validation short review PR is simple enough to be reviewed quickly team/agent-build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants