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

[fleet] add install_script e2e test setup #31791

Merged
merged 11 commits into from
Dec 10, 2024
Merged

Conversation

raphaelgavache
Copy link
Member

@raphaelgavache raphaelgavache commented Dec 5, 2024

What does this PR do?

  • push installer and install script packages in installtesting s3 bucket
  • setup e2e test suite

Follow-ups after this PR

  • fix databricks install script logic to pass tests
  • use installer test framework (requires a bit of test refactoring)

Motivation

Describe how you validated your changes

Possible Drawbacks / Trade-offs

Additional Notes

@github-actions github-actions bot added team/agent-devx-loops short review PR is simple enough to be reviewed quickly labels Dec 5, 2024
@agent-platform-auto-pr
Copy link
Contributor

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

Gitlab CI Configuration Changes

Modified Jobs

variables (configuration)
  variables:
    AGENT_API_KEY_ORG2: agent-api-key-org-2
    AGENT_APP_KEY_ORG2: agent-ci-app-key-org-2
    AGENT_BINARIES_DIR: bin/agent
    AGENT_GITHUB_APP: agent-github-app
    AGENT_QA_E2E: agent-qa-e2e
    API_KEY_ORG2: ci.datadog-agent.datadog_api_key_org2
    ARTIFACT_DOWNLOAD_ATTEMPTS: 2
    ATLASSIAN_WRITE: atlassian-write
    BTFHUB_ARCHIVE_BRANCH: main
    BUCKET_BRANCH: dev
    CHANGELOG_COMMIT_SHA: ci.datadog-agent.gitlab_changelog_commit_sha
    CHOCOLATEY_API_KEY: ci.datadog-agent.chocolatey_api_key
    CI_IMAGE_BTF_GEN: v50263243-1a30c934
    CI_IMAGE_BTF_GEN_SUFFIX: ''
    CI_IMAGE_DD_AGENT_TESTING: v50263243-1a30c934
    CI_IMAGE_DD_AGENT_TESTING_SUFFIX: ''
    CI_IMAGE_DEB_ARM64: v50263243-1a30c934
    CI_IMAGE_DEB_ARM64_SUFFIX: ''
    CI_IMAGE_DEB_ARMHF: v50263243-1a30c934
    CI_IMAGE_DEB_ARMHF_SUFFIX: ''
    CI_IMAGE_DEB_X64: v50263243-1a30c934
    CI_IMAGE_DEB_X64_SUFFIX: ''
    CI_IMAGE_DOCKER_ARM64: v50263243-1a30c934
    CI_IMAGE_DOCKER_ARM64_SUFFIX: ''
    CI_IMAGE_DOCKER_X64: v50263243-1a30c934
    CI_IMAGE_DOCKER_X64_SUFFIX: ''
    CI_IMAGE_GITLAB_AGENT_DEPLOY: v50263243-1a30c934
    CI_IMAGE_GITLAB_AGENT_DEPLOY_SUFFIX: ''
    CI_IMAGE_LINUX_GLIBC_2_17_X64: v50263243-1a30c934
    CI_IMAGE_LINUX_GLIBC_2_17_X64_SUFFIX: ''
    CI_IMAGE_LINUX_GLIBC_2_23_ARM64: v50263243-1a30c934
    CI_IMAGE_LINUX_GLIBC_2_23_ARM64_SUFFIX: ''
    CI_IMAGE_RPM_ARM64: v50263243-1a30c934
    CI_IMAGE_RPM_ARM64_SUFFIX: ''
    CI_IMAGE_RPM_ARMHF: v50263243-1a30c934
    CI_IMAGE_RPM_ARMHF_SUFFIX: ''
    CI_IMAGE_RPM_X64: v50263243-1a30c934
    CI_IMAGE_RPM_X64_SUFFIX: ''
    CI_IMAGE_SYSTEM_PROBE_ARM64: v50263243-1a30c934
    CI_IMAGE_SYSTEM_PROBE_ARM64_SUFFIX: ''
    CI_IMAGE_SYSTEM_PROBE_X64: v50263243-1a30c934
    CI_IMAGE_SYSTEM_PROBE_X64_SUFFIX: ''
    CI_IMAGE_WIN_1809_X64: v50263243-1a30c934
    CI_IMAGE_WIN_1809_X64_SUFFIX: ''
    CI_IMAGE_WIN_LTSC2022_X64: v50263243-1a30c934
    CI_IMAGE_WIN_LTSC2022_X64_SUFFIX: ''
    CLANG_LLVM_VER: 12.0.1
    CLUSTER_AGENT_BINARIES_DIR: bin/datadog-cluster-agent
    CLUSTER_AGENT_CLOUDFOUNDRY_BINARIES_DIR: bin/datadog-cluster-agent-cloudfoundry
    CODECOV: codecov
    CODECOV_TOKEN: ci.datadog-agent.codecov_token
    CWS_INSTRUMENTATION_BINARIES_DIR: bin/cws-instrumentation
    DATADOG_AGENT_ARMBUILDIMAGES: v50263243-1a30c934
    DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX: ''
    DATADOG_AGENT_BTF_GEN_BUILDIMAGES: v50263243-1a30c934
    DATADOG_AGENT_BTF_GEN_BUILDIMAGES_SUFFIX: ''
    DATADOG_AGENT_BUILDIMAGES: v50263243-1a30c934
    DATADOG_AGENT_BUILDIMAGES_SUFFIX: ''
    DATADOG_AGENT_EMBEDDED_PATH: /opt/datadog-agent/embedded
    DATADOG_AGENT_SYSPROBE_BUILDIMAGES: v50263243-1a30c934
    DATADOG_AGENT_SYSPROBE_BUILDIMAGES_SUFFIX: ''
    DATADOG_AGENT_WINBUILDIMAGES: v50263243-1a30c934
    DATADOG_AGENT_WINBUILDIMAGES_SUFFIX: ''
    DD_AGENT_TESTING_DIR: $CI_PROJECT_DIR/test/new-e2e/tests
    DD_PKG_VERSION: latest
    DEB_GPG_KEY: ci.datadog-agent.deb_signing_private_key_${DEB_GPG_KEY_ID}
    DEB_GPG_KEY_ID: c0962c7d
    DEB_GPG_KEY_NAME: Datadog, Inc. APT key
    DEB_RPM_TESTING_BUCKET_BRANCH: testing
    DEB_S3_BUCKET: apt.datad0g.com
    DEB_SIGNING_PASSPHRASE: ci.datadog-agent.deb_signing_key_passphrase_${DEB_GPG_KEY_ID}
    DEB_TESTING_S3_BUCKET: apttesting.datad0g.com
    DOCKER_REGISTRY_LOGIN: ci.datadog-agent.docker_hub_login
    DOCKER_REGISTRY_PWD: ci.datadog-agent.docker_hub_pwd
    DOCKER_REGISTRY_RO: dockerhub-readonly
    DOCKER_REGISTRY_URL: docker.io
    DOGSTATSD_BINARIES_DIR: bin/dogstatsd
    E2E_AZURE: e2e-azure
    E2E_GCP: e2e-gcp
    EXECUTOR_JOB_SECTION_ATTEMPTS: 2
    FF_KUBERNETES_HONOR_ENTRYPOINT: true
    FF_SCRIPT_SECTIONS: 1
    GENERAL_ARTIFACTS_CACHE_BUCKET_URL: https://dd-agent-omnibus.s3.amazonaws.com
    GET_SOURCES_ATTEMPTS: 2
    GITLAB_TOKEN: gitlab-token
    GO_TEST_SKIP_FLAKE: 'true'
+   INSTALLER_TESTING_S3_BUCKET: installtesting.datad0g.com
    INSTALL_SCRIPT_API_KEY_ORG2: install-script-api-key-org-2
    INTEGRATION_WHEELS_CACHE_BUCKET: dd-agent-omnibus
    KERNEL_MATRIX_TESTING_ARM_AMI_ID: ami-0b5f838a19d37fc61
    KERNEL_MATRIX_TESTING_X86_AMI_ID: ami-05b3973acf5422348
    KITCHEN_INFRASTRUCTURE_FLAKES_RETRY: 2
    MACOS_GITHUB_APP_1: macos-github-app-one
    MACOS_GITHUB_APP_2: macos-github-app-two
    MACOS_S3_BUCKET: dd-agent-macostesting
    OMNIBUS_BASE_DIR: /omnibus
    OMNIBUS_GIT_CACHE_DIR: /tmp/omnibus-git-cache
    OMNIBUS_PACKAGE_DIR: $CI_PROJECT_DIR/omnibus/pkg/
    OMNIBUS_PACKAGE_DIR_SUSE: $CI_PROJECT_DIR/omnibus/suse/pkg
    PROCESS_S3_BUCKET: datad0g-process-agent
    RELEASE_VERSION_6: nightly
    RELEASE_VERSION_7: nightly-a7
    RESTORE_CACHE_ATTEMPTS: 2
    RPM_GPG_KEY: ci.datadog-agent.rpm_signing_private_key_${RPM_GPG_KEY_ID}
    RPM_GPG_KEY_ID: b01082d3
    RPM_GPG_KEY_NAME: Datadog, Inc. RPM key
    RPM_S3_BUCKET: yum.datad0g.com
    RPM_SIGNING_PASSPHRASE: ci.datadog-agent.rpm_signing_key_passphrase_${RPM_GPG_KEY_ID}
    RPM_TESTING_S3_BUCKET: yumtesting.datad0g.com
    RUN_E2E_TESTS: auto
    RUN_KMT_TESTS: auto
    RUN_UNIT_TESTS: auto
    S3_ARTIFACTS_URI: s3://dd-ci-artefacts-build-stable/$CI_PROJECT_NAME/$CI_PIPELINE_ID
    S3_CP_CMD: aws s3 cp $S3_CP_OPTIONS
    S3_CP_OPTIONS: --no-progress --region us-east-1 --sse AES256
    S3_DD_AGENT_OMNIBUS_BTFS_URI: s3://dd-agent-omnibus/btfs
    S3_DD_AGENT_OMNIBUS_JAVA_URI: s3://dd-agent-omnibus/openjdk
    S3_DD_AGENT_OMNIBUS_LLVM_URI: s3://dd-agent-omnibus/llvm
    S3_DSD6_URI: s3://dsd6-staging
    S3_OMNIBUS_CACHE_BUCKET: dd-ci-datadog-agent-omnibus-cache-build-stable
    S3_PERMANENT_ARTIFACTS_URI: s3://dd-ci-persistent-artefacts-build-stable/$CI_PROJECT_NAME
    S3_PROJECT_ARTIFACTS_URI: s3://dd-ci-artefacts-build-stable/$CI_PROJECT_NAME
    S3_RELEASE_ARTIFACTS_URI: s3://dd-release-artifacts/$CI_PROJECT_NAME/$CI_PIPELINE_ID
    S3_RELEASE_INSTALLER_ARTIFACTS_URI: s3://dd-release-artifacts/datadog-installer/$CI_PIPELINE_ID
    S3_SBOM_STORAGE_URI: s3://sbom-root-us1-ddbuild-io/$CI_PROJECT_NAME/$CI_PIPELINE_ID
    SLACK_AGENT: slack-agent-ci
    SMP_ACCOUNT: smp
    STATIC_BINARIES_DIR: bin/static
    SYSTEM_PROBE_BINARIES_DIR: bin/system-probe
    USE_S3_CACHING: --omnibus-s3-cache
    VCPKG_BLOB_SAS_URL: ci.datadog-agent-buildimages.vcpkg_blob_sas_url
    WINDOWS_BUILDS_S3_BUCKET: $WIN_S3_BUCKET/builds
    WINDOWS_POWERSHELL_DIR: $CI_PROJECT_DIR/signed_scripts
    WINDOWS_TESTING_S3_BUCKET_A6: pipelines/A6/$CI_PIPELINE_ID
    WINDOWS_TESTING_S3_BUCKET_A7: pipelines/A7/$CI_PIPELINE_ID
    WINGET_PAT: ci.datadog-agent.winget_pat
    WIN_S3_BUCKET: dd-agent-mstesting
.deploy_packages_oci
  .deploy_packages_oci:
    before_script:
    - ls $OMNIBUS_PACKAGE_DIR
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/gitlab_agent_deploy$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    rules:
    - if: $DEPLOY_AGENT == "true" || $DDR_WORKFLOW_ID != null
    - if: $DEPLOY_INSTALLER == "true" || $DDR_WORKFLOW_ID != null
    - if: $RUN_E2E_TESTS == "off"
      when: never
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $RUN_E2E_TESTS == "on"
      when: on_success
    - if: $CI_COMMIT_BRANCH == "main"
      when: on_success
    - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
      when: on_success
    - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/
      when: on_success
    - changes:
        compare_to: main
        paths:
        - .gitlab/e2e/e2e.yml
        - test/new-e2e/pkg/**/*
        - test/new-e2e/go.mod
        - flakes.yaml
    - changes:
        compare_to: main
        paths:
        - .gitlab/**/*
        - omnibus/config/**/*
        - pkg/fleet/**/*
        - cmd/installer/**/*
        - test/new-e2e/tests/installer/**/*
        - tasks/installer.py
      when: on_success
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - allow_failure: true
      when: manual
    script:
    - set +x
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache_tools.tar.xz -C $GOPATH/pkg/mod/cache
    - rm -f modcache_tools.tar.xz
    - VERSION="$(inv agent.version --url-safe)-1" || exit $?
    - git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf
      "https://github.com/DataDog/"
    - go env -w GOPRIVATE="github.com/DataDog/*"
    - export PATH=$PATH:$(go env GOPATH)/bin
    - go install github.com/DataDog/datadog-packages/cmd/datadog-package@latest
    - datadog-package push registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:${VERSION}
      ${OMNIBUS_PACKAGE_DIR}/${OCI_PRODUCT}-${VERSION}.oci.tar
    - datadog-package push registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:pipeline-${CI_PIPELINE_ID}
      ${OMNIBUS_PACKAGE_DIR}/${OCI_PRODUCT}-${VERSION}.oci.tar
+   - datadog-package replicate-s3 registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:pipeline-${CI_PIPELINE_ID}
+     us-east-1 ${INSTALLER_TESTING_S3_BUCKET} ${S3_PACKAGE} ${VERSION}
+   - datadog-package replicate-s3 registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:pipeline-${CI_PIPELINE_ID}
+     us-east-1 ${INSTALLER_TESTING_S3_BUCKET} ${S3_PACKAGE} ${CI_COMMIT_SHA}
    stage: deploy_packages
    tags:
    - arch:amd64
    variables:
      MAJOR_VERSION: 7
deploy_agent_oci
  deploy_agent_oci:
    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:
    - agent_oci
    - go_tools_deps
    rules:
    - if: $DEPLOY_AGENT == "true" || $DDR_WORKFLOW_ID != null
    - if: $DEPLOY_INSTALLER == "true" || $DDR_WORKFLOW_ID != null
    - if: $RUN_E2E_TESTS == "off"
      when: never
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $RUN_E2E_TESTS == "on"
      when: on_success
    - if: $CI_COMMIT_BRANCH == "main"
      when: on_success
    - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
      when: on_success
    - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/
      when: on_success
    - changes:
        compare_to: main
        paths:
        - .gitlab/e2e/e2e.yml
        - test/new-e2e/pkg/**/*
        - test/new-e2e/go.mod
        - flakes.yaml
    - changes:
        compare_to: main
        paths:
        - .gitlab/**/*
        - omnibus/config/**/*
        - pkg/fleet/**/*
        - cmd/installer/**/*
        - test/new-e2e/tests/installer/**/*
        - tasks/installer.py
      when: on_success
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - allow_failure: true
      when: manual
    script:
    - set +x
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache_tools.tar.xz -C $GOPATH/pkg/mod/cache
    - rm -f modcache_tools.tar.xz
    - VERSION="$(inv agent.version --url-safe)-1" || exit $?
    - git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf
      "https://github.com/DataDog/"
    - go env -w GOPRIVATE="github.com/DataDog/*"
    - export PATH=$PATH:$(go env GOPATH)/bin
    - go install github.com/DataDog/datadog-packages/cmd/datadog-package@latest
    - datadog-package push registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:${VERSION}
      ${OMNIBUS_PACKAGE_DIR}/${OCI_PRODUCT}-${VERSION}.oci.tar
    - datadog-package push registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:pipeline-${CI_PIPELINE_ID}
      ${OMNIBUS_PACKAGE_DIR}/${OCI_PRODUCT}-${VERSION}.oci.tar
+   - datadog-package replicate-s3 registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:pipeline-${CI_PIPELINE_ID}
+     us-east-1 ${INSTALLER_TESTING_S3_BUCKET} ${S3_PACKAGE} ${VERSION}
+   - datadog-package replicate-s3 registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:pipeline-${CI_PIPELINE_ID}
+     us-east-1 ${INSTALLER_TESTING_S3_BUCKET} ${S3_PACKAGE} ${CI_COMMIT_SHA}
    stage: deploy_packages
    tags:
    - arch:amd64
    variables:
      MAJOR_VERSION: 7
      OCI_PRODUCT: datadog-agent
+     S3_PACKAGE: agent-package
deploy_installer_oci
  deploy_installer_oci:
    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:
    - installer_oci
    - go_tools_deps
    rules:
    - if: $DEPLOY_AGENT == "true" || $DDR_WORKFLOW_ID != null
    - if: $DEPLOY_INSTALLER == "true" || $DDR_WORKFLOW_ID != null
    - if: $RUN_E2E_TESTS == "off"
      when: never
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $RUN_E2E_TESTS == "on"
      when: on_success
    - if: $CI_COMMIT_BRANCH == "main"
      when: on_success
    - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
      when: on_success
    - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/
      when: on_success
    - changes:
        compare_to: main
        paths:
        - .gitlab/e2e/e2e.yml
        - test/new-e2e/pkg/**/*
        - test/new-e2e/go.mod
        - flakes.yaml
    - changes:
        compare_to: main
        paths:
        - .gitlab/**/*
        - omnibus/config/**/*
        - pkg/fleet/**/*
        - cmd/installer/**/*
        - test/new-e2e/tests/installer/**/*
        - tasks/installer.py
      when: on_success
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - allow_failure: true
      when: manual
    script:
    - set +x
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache_tools.tar.xz -C $GOPATH/pkg/mod/cache
    - rm -f modcache_tools.tar.xz
    - VERSION="$(inv agent.version --url-safe)-1" || exit $?
    - git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf
      "https://github.com/DataDog/"
    - go env -w GOPRIVATE="github.com/DataDog/*"
    - export PATH=$PATH:$(go env GOPATH)/bin
    - go install github.com/DataDog/datadog-packages/cmd/datadog-package@latest
    - datadog-package push registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:${VERSION}
      ${OMNIBUS_PACKAGE_DIR}/${OCI_PRODUCT}-${VERSION}.oci.tar
    - datadog-package push registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:pipeline-${CI_PIPELINE_ID}
      ${OMNIBUS_PACKAGE_DIR}/${OCI_PRODUCT}-${VERSION}.oci.tar
+   - datadog-package replicate-s3 registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:pipeline-${CI_PIPELINE_ID}
+     us-east-1 ${INSTALLER_TESTING_S3_BUCKET} ${S3_PACKAGE} ${VERSION}
+   - datadog-package replicate-s3 registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:pipeline-${CI_PIPELINE_ID}
+     us-east-1 ${INSTALLER_TESTING_S3_BUCKET} ${S3_PACKAGE} ${CI_COMMIT_SHA}
    stage: deploy_packages
    tags:
    - arch:amd64
    variables:
      MAJOR_VERSION: 7
      OCI_PRODUCT: datadog-installer
+     S3_PACKAGE: installer-package

Added Jobs

new-e2e-installer-script
new-e2e-installer-script:
  after_script:
  - $CI_PROJECT_DIR/tools/ci/junit_upload.sh
  artifacts:
    expire_in: 2 weeks
    paths:
    - $E2E_OUTPUT_DIR
    - junit-*.tgz
    reports:
      annotations:
      - $EXTERNAL_LINKS_PATH
    when: always
  before_script:
  - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache_e2e.tar.xz -C $GOPATH/pkg/mod/cache
  - rm -f modcache_e2e.tar.xz
  - mkdir -p ~/.aws
  - $CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_QA_E2E profile >> ~/.aws/config
    || exit $?
  - export AWS_PROFILE=agent-qa-ci
  - $CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_QA_E2E ssh_public_key_rsa > $E2E_PUBLIC_KEY_PATH
    || exit $?
  - touch $E2E_PRIVATE_KEY_PATH && chmod 600 $E2E_PRIVATE_KEY_PATH && $CI_PROJECT_DIR/tools/ci/fetch_secret.sh
    $AGENT_QA_E2E ssh_key_rsa > $E2E_PRIVATE_KEY_PATH || exit $?
  - pulumi login "s3://dd-pulumi-state?region=us-east-1&awssdk=v2&profile=$AWS_PROFILE"
  - ARM_CLIENT_ID=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $E2E_AZURE client_id)
    || exit $?; export ARM_CLIENT_ID
  - ARM_CLIENT_SECRET=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $E2E_AZURE token)
    || exit $?; export ARM_CLIENT_SECRET
  - ARM_TENANT_ID=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $E2E_AZURE tenant_id)
    || exit $?; export ARM_TENANT_ID
  - ARM_SUBSCRIPTION_ID=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $E2E_AZURE subscription_id)
    || exit $?; export ARM_SUBSCRIPTION_ID
  - $CI_PROJECT_DIR/tools/ci/fetch_secret.sh $E2E_GCP credentials_json > ~/gcp-credentials.json
    || exit $?
  - export GOOGLE_APPLICATION_CREDENTIALS=~/gcp-credentials.json
  - inv -e gitlab.generate-ci-visibility-links --output=$EXTERNAL_LINKS_PATH
  image: registry.ddbuild.io/ci/test-infra-definitions/runner$TEST_INFRA_DEFINITIONS_BUILDIMAGES_SUFFIX:$TEST_INFRA_DEFINITIONS_BUILDIMAGES
  needs:
  - go_e2e_deps
  - deploy_installer_oci
  - qa_installer_script
  rules:
  - if: $RUN_E2E_TESTS == "off"
    when: never
  - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
    when: never
  - if: $RUN_E2E_TESTS == "on"
    when: on_success
  - if: $CI_COMMIT_BRANCH == "main"
    when: on_success
  - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
    when: on_success
  - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/
    when: on_success
  - changes:
      compare_to: main
      paths:
      - .gitlab/e2e/e2e.yml
      - test/new-e2e/pkg/**/*
      - test/new-e2e/go.mod
      - flakes.yaml
  - changes:
      compare_to: main
      paths:
      - .gitlab/**/*
      - omnibus/config/**/*
      - pkg/fleet/**/*
      - cmd/installer/**/*
      - test/new-e2e/tests/installer/**/*
      - tasks/installer.py
    when: on_success
  - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
    when: never
  - allow_failure: true
    when: manual
  script:
  - inv -e new-e2e-tests.run --targets $TARGETS -c ddagent:imagePullRegistry=669783387624.dkr.ecr.us-east-1.amazonaws.com
    -c ddagent:imagePullUsername=AWS -c ddagent:imagePullPassword=$(aws ecr get-login-password)
    --junit-tar junit-${CI_JOB_ID}.tgz ${EXTRA_PARAMS} --test-washer
  stage: e2e
  tags:
  - arch:amd64
  variables:
    E2E_COMMIT_SHA: $CI_COMMIT_SHORT_SHA
    E2E_KEY_PAIR_NAME: datadog-agent-ci-rsa
    E2E_OUTPUT_DIR: $CI_PROJECT_DIR/e2e-output
    E2E_PIPELINE_ID: $CI_PIPELINE_ID
    E2E_PRIVATE_KEY_PATH: /tmp/agent-qa-ssh-key
    E2E_PUBLIC_KEY_PATH: /tmp/agent-qa-ssh-key.pub
    EXTERNAL_LINKS_PATH: external_links_$CI_JOB_ID.json
    FLEET_INSTALL_METHOD: install_script
    KUBERNETES_CPU_REQUEST: 6
    KUBERNETES_MEMORY_LIMIT: 16Gi
    KUBERNETES_MEMORY_REQUEST: 12Gi
    SHOULD_RUN_IN_FLAKES_FINDER: 'true'
    TARGETS: ./tests/installer/script
    TEAM: fleet
qa_installer_script
qa_installer_script:
  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:
  - installer-install-scripts
  rules:
  - if: $RUN_E2E_TESTS == "off"
    when: never
  - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
    when: never
  - if: $RUN_E2E_TESTS == "on"
    when: on_success
  - if: $CI_COMMIT_BRANCH == "main"
    when: on_success
  - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
    when: on_success
  - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/
    when: on_success
  - changes:
      compare_to: main
      paths:
      - .gitlab/e2e/e2e.yml
      - test/new-e2e/pkg/**/*
      - test/new-e2e/go.mod
      - flakes.yaml
  - changes:
      compare_to: main
      paths:
      - .gitlab/**/*
      - omnibus/config/**/*
      - pkg/fleet/**/*
      - cmd/installer/**/*
      - test/new-e2e/tests/installer/**/*
      - tasks/installer.py
    when: on_success
  - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
    when: never
  - allow_failure: true
    when: manual
  script:
  - $S3_CP_CMD --recursive --exclude "*" --include "install-*.sh" "$OMNIBUS_PACKAGE_DIR"
    "s3://${INSTALLER_TESTING_S3_BUCKET}/${CI_COMMIT_SHA}/scripts/"
  stage: deploy_packages
  tags:
  - arch:amd64

Changes Summary

Removed Modified Added Renamed
0 4 2 0

ℹ️ Diff available in the job log.

@github-actions github-actions bot added medium review PR review might take time and removed short review PR is simple enough to be reviewed quickly labels Dec 5, 2024
@raphaelgavache raphaelgavache added qa/done QA done before merge and regressions are covered by tests changelog/no-changelog labels Dec 5, 2024
@raphaelgavache raphaelgavache force-pushed the raphael/e2e_install_script branch from e54da29 to 39f04f6 Compare December 5, 2024 14:21
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Dec 5, 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=50702100 --os-family=ubuntu

Note: This applies to commit 52a38ab

@raphaelgavache raphaelgavache force-pushed the raphael/e2e_install_script branch 6 times, most recently from c92d2c2 to 1b35d5f Compare December 5, 2024 16:58
Copy link

cit-pr-commenter bot commented Dec 5, 2024

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: c54f81af-cb4a-4a09-823a-aa67d2103f12

Baseline: 0744b78
Comparison: 52a38ab
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
quality_gate_logs % cpu utilization +1.51 [-1.40, +4.43] 1 Logs
quality_gate_idle_all_features memory utilization +1.23 [+1.11, +1.35] 1 Logs bounds checks dashboard
uds_dogstatsd_to_api_cpu % cpu utilization +0.40 [-0.34, +1.14] 1 Logs
quality_gate_idle memory utilization +0.04 [-0.00, +0.09] 1 Logs bounds checks dashboard
uds_dogstatsd_to_api ingress throughput +0.01 [-0.09, +0.11] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput +0.00 [-0.78, +0.78] 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.00 [-0.84, +0.84] 1 Logs
file_to_blackhole_1000ms_latency_linear_load egress throughput -0.02 [-0.49, +0.44] 1 Logs
file_to_blackhole_100ms_latency egress throughput -0.05 [-0.81, +0.70] 1 Logs
file_to_blackhole_0ms_latency_http2 egress throughput -0.06 [-0.90, +0.78] 1 Logs
file_to_blackhole_300ms_latency egress throughput -0.10 [-0.73, +0.53] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.14 [-0.91, +0.63] 1 Logs
file_tree memory utilization -0.28 [-0.39, -0.16] 1 Logs
tcp_syslog_to_blackhole ingress throughput -0.40 [-0.46, -0.34] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.51 [-1.30, +0.29] 1 Logs
otel_to_otel_logs ingress throughput -0.55 [-1.24, +0.13] 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_all_features, 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_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@raphaelgavache raphaelgavache force-pushed the raphael/e2e_install_script branch 2 times, most recently from 321eb5a to be671ec Compare December 9, 2024 19:35
@agent-platform-auto-pr
Copy link
Contributor

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

Package size comparison

Comparison with ancestor 0744b78e72154436a2b6a533abb5c80be831eea5

Diff per package
package diff status size ancestor threshold
datadog-agent-amd64-deb 1.40MB ⚠️ 1272.26MB 1270.86MB 140.00MB
datadog-iot-agent-amd64-deb 0.00MB 113.20MB 113.20MB 10.00MB
datadog-dogstatsd-amd64-deb 0.00MB 78.32MB 78.32MB 10.00MB
datadog-heroku-agent-amd64-deb 1.40MB ⚠️ 527.85MB 526.45MB 70.00MB
datadog-agent-x86_64-rpm 1.40MB ⚠️ 1281.49MB 1280.09MB 140.00MB
datadog-agent-x86_64-suse 1.40MB ⚠️ 1281.49MB 1280.09MB 140.00MB
datadog-iot-agent-x86_64-rpm 0.00MB 113.26MB 113.26MB 10.00MB
datadog-iot-agent-x86_64-suse 0.00MB 113.26MB 113.26MB 10.00MB
datadog-dogstatsd-x86_64-rpm 0.00MB 78.40MB 78.40MB 10.00MB
datadog-dogstatsd-x86_64-suse 0.00MB 78.40MB 78.40MB 10.00MB
datadog-agent-arm64-deb 1.41MB ⚠️ 1006.43MB 1005.02MB 140.00MB
datadog-iot-agent-arm64-deb 0.00MB 108.67MB 108.67MB 10.00MB
datadog-dogstatsd-arm64-deb 0.00MB 55.59MB 55.59MB 10.00MB
datadog-agent-aarch64-rpm 1.41MB ⚠️ 1015.65MB 1014.24MB 140.00MB
datadog-iot-agent-aarch64-rpm 0.00MB 108.74MB 108.74MB 10.00MB

Decision

⚠️ Warning

@raphaelgavache raphaelgavache force-pushed the raphael/e2e_install_script branch 2 times, most recently from 50394df to 8a601de Compare December 9, 2024 23:39
@raphaelgavache raphaelgavache force-pushed the raphael/e2e_install_script branch from 8a601de to 3089d41 Compare December 10, 2024 00:30
@raphaelgavache raphaelgavache force-pushed the raphael/e2e_install_script branch from 3089d41 to 59d0768 Compare December 10, 2024 10:02
@raphaelgavache raphaelgavache marked this pull request as ready for review December 10, 2024 12:55
@raphaelgavache raphaelgavache requested review from a team as code owners December 10, 2024 12:55
@raphaelgavache raphaelgavache changed the title add first test [fleet] add install_script e2e test setup Dec 10, 2024
.gitlab/deploy_packages/oci.yml Outdated Show resolved Hide resolved
.gitlab/deploy_packages/oci.yml Outdated Show resolved Hide resolved
.gitlab/deploy_packages/oci.yml Outdated Show resolved Hide resolved
@raphaelgavache
Copy link
Member Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Dec 10, 2024

Devflow running: /merge

View all feedbacks in Devflow UI.


2024-12-10 16:23:35 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 24m.

@dd-mergequeue dd-mergequeue bot merged commit b629273 into main Dec 10, 2024
313 of 314 checks passed
@dd-mergequeue dd-mergequeue bot deleted the raphael/e2e_install_script branch December 10, 2024 16:59
@github-actions github-actions bot added this to the 7.62.0 milestone Dec 10, 2024
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/done QA done before merge and regressions are covered by tests team/agent-devx-loops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants