Skip to content

Run aix test CI job on changes - #55896

Open
pgimalac wants to merge 1 commit into
mainfrom
pgimalac/aix-test-on-job-change
Open

Run aix test CI job on changes#55896
pgimalac wants to merge 1 commit into
mainfrom
pgimalac/aix-test-on-job-change

Conversation

@pgimalac

@pgimalac pgimalac commented Sep 4, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Update the AIX unit test job to run automatically when changing it.

Motivation

Makes it simpler to validate changes to the job itself, and avoids breaking it by accident.

Describe how you validated your changes

CI

Additional Notes

@pgimalac pgimalac added the changelog/no-changelog No changelog entry needed label Sep 4, 2026
@pgimalac
pgimalac requested a review from a team as a code owner September 4, 2026 16:13
@pgimalac pgimalac added the qa/no-code-change No code change in Agent code requiring validation label Sep 4, 2026
@github-actions github-actions Bot added the short review PR is simple enough to be reviewed quickly label Sep 4, 2026
@dd-octo-sts dd-octo-sts Bot added internal Identify a non-fork PR team/agent-devx labels Sep 4, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AI review by Codex (OpenAI) - workflow run

Patch is correct. The new rule automatically runs the AIX unit-test job when its job definition or remote execution template changes, while preserving existing scheduled and manual behavior.

@dd-octo-sts

dd-octo-sts Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Gitlab CI Configuration Changes

Modified Jobs

tests_aix-ppc64
  tests_aix-ppc64:
    allow_failure: true
    before_script:
    - export AIX_HOST="$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SITEOX_AIX_CI_RUNNER
      hostname)"
    - export AIX_PORT="$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SITEOX_AIX_CI_RUNNER
      port)"
    - export AIX_USER="$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SITEOX_AIX_CI_RUNNER
      user)"
    - mkdir -p ~/.ssh && chmod 700 ~/.ssh
    - $CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SITEOX_AIX_CI_RUNNER key > ~/.ssh/aix_ci_key
      || exit $?
    - chmod 600 ~/.ssh/aix_ci_key
    - ssh-keyscan -p $AIX_PORT $AIX_HOST >> ~/.ssh/known_hosts
    - eval $(ssh-agent -s)
    - ssh-add ~/.ssh/aix_ci_key
    - 'echo "=== AIX: cloning agent source at $CI_COMMIT_SHA ==="'
    - "ssh -T -p $AIX_PORT $AIX_USER@$AIX_HOST bash -s <<EOF\nset -eu\nexport PATH=/opt/freeware/bin:/usr/bin:\\\
      $PATH\nif [ ! -d \"$AIX_AGENT_SRC/.git\" ]; then\n  git clone --progress \"$AIX_GIT_REMOTE\"\
      \ \"$AIX_AGENT_SRC\"\nfi\ncd \"$AIX_AGENT_SRC\"\ngit clean -df\ngit reset --hard\n\
      git fetch --progress origin\n# The commit under test may not be reachable from\
      \ origin yet (e.g. a\n# brand-new branch push); fetch the branch ref as a fallback.\n\
      git fetch --progress origin \"$CI_COMMIT_REF_NAME\" || true\ngit checkout \"$CI_COMMIT_SHA\"\
      \nEOF\n"
    - 'echo "=== AIX: provisioning host (setup-host.sh) ==="'
    - ssh -tt -p $AIX_PORT $AIX_USER@$AIX_HOST "sh $AIX_AGENT_SRC/packaging/aix/setup-host.sh"
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/linux$CI_IMAGE_LINUX_SUFFIX:$CI_IMAGE_LINUX
    needs: []
    resource_group: aix_ci_host
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
      when: always
+   - changes:
+       compare_to: $COMPARE_TO_BRANCH
+       paths:
+       - .gitlab/aix/aix_remote.yml
+       - .gitlab/aix/test/aix_unit_tests.yml
    - variables:
        EXTRA_TEST_FLAGS: --only-modified-packages
      when: manual
    script:
    - 'echo "=== AIX: running unit tests ==="'
    - "ssh -tt -p $AIX_PORT $AIX_USER@$AIX_HOST \"bash -c '\n  set -eu\n  cd $AIX_AGENT_SRC\n\
      \  . ./packaging/aix/lib/env.sh\n  python3.12 -m invoke -e test $EXTRA_TEST_FLAGS\
      \ --build-exclude=python --build-cpus=1\n'\"\n"
    stage: source_test
    tags:
    - arch:amd64
    - specific:true
    timeout: 2h
    variables:
      AIX_AGENT_SRC: /opt/dd-build/datadog-agent
      AIX_GIT_REMOTE: https://github.com/DataDog/datadog-agent.git
      EXTRA_TEST_FLAGS: ''
      GIT_DEPTH: 1

Changes Summary

Removed Modified Added Renamed
0 1 0 0

ℹ️ Diff available in the job log.

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.62% (+5.35%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 621fecb | Docs | View more details | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Files inventory check summary

File checks results against ancestor cc466279:

Results for datadog-agent_7.85.0~devel.git.16.621fecb.pipeline.135537206-1_amd64.deb:

No change detected

Results for datadog-iot-agent_7.85.0~devel.git.16.621fecb.pipeline.135537206-1_amd64.deb:

No change detected

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-devx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant