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

move junit upload from unit_tests_arm64_junit_upload to direct jobs #30191

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

paulcacheux
Copy link
Contributor

@paulcacheux paulcacheux commented Oct 16, 2024

What does this PR do?

Similarly to #30175, the unit_tests_arm64_junit_upload job is not needed anymore since datadog-ci is available on arm64. This PR removes it completely and does the junit upload directly from the job, as is already done for x64 versions of those.

Motivation

Describe how to test/QA your changes

Possible Drawbacks / Trade-offs

Additional Notes

@paulcacheux paulcacheux added qa/no-code-change No code change in Agent code requiring validation changelog/no-changelog labels Oct 16, 2024
@paulcacheux paulcacheux force-pushed the paulcacheux/remove-last-junit-upload branch from d5d2743 to 6c03e29 Compare October 16, 2024 17:16
@agent-platform-auto-pr
Copy link
Contributor

Gitlab CI Configuration Changes

Modified Jobs

tests_deb-arm64-py3
  tests_deb-arm64-py3:
    after_script:
+   - $CI_PROJECT_DIR/tools/ci/junit_upload.sh
    - CODECOV_TOKEN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $CODECOV_TOKEN) || exit
      $?; export CODECOV_TOKEN
    - inv -e coverage.upload-to-codecov $COVERAGE_CACHE_FLAG || true
    artifacts:
      expire_in: 2 weeks
      paths:
      - $TEST_OUTPUT_FILE
      - junit-*.tgz
      reports:
        annotations:
        - $EXTERNAL_LINKS_PATH
        junit:
        - '**/junit-out-*.xml'
      when: always
    before_script:
    - source /root/.bashrc && conda activate $CONDA_ENV
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
    - rm -f modcache.tar.xz
    - inv -e rtloader.make --install-prefix=$CI_PROJECT_DIR/dev
    - inv -e rtloader.install
    - inv -e rtloader.format --raise-if-changed
    - inv -e rtloader.test
    image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
    - go_deps
    - go_tools_deps
    rules:
    - if: $RUN_UNIT_TESTS == "off"
      when: never
    - if: $CI_COMMIT_BRANCH == "main"
      variables:
        COVERAGE_CACHE_FLAG: --push-coverage-cache
        FAST_TESTS: 'false'
    - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
      variables:
        COVERAGE_CACHE_FLAG: ''
        FAST_TESTS: 'false'
    - if: $CI_COMMIT_TAG != null
      variables:
        COVERAGE_CACHE_FLAG: ''
        FAST_TESTS: 'false'
    - if: $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "pipeline"
      variables:
        COVERAGE_CACHE_FLAG: ''
        FAST_TESTS: 'false'
    - if: $RUN_UNIT_TESTS == "on"
      variables:
        COVERAGE_CACHE_FLAG: ''
        FAST_TESTS: 'false'
    - variables:
        COVERAGE_CACHE_FLAG: --pull-coverage-cache
        FAST_TESTS: 'true'
    script:
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache_tools.tar.xz -C $GOPATH/pkg/mod/cache
    - rm -f modcache_tools.tar.xz
    - inv -e install-tools
    - inv -e gitlab.generate-ci-visibility-links --output=$EXTERNAL_LINKS_PATH
    - FAST_TESTS_FLAG=""
    - if [[ "$FAST_TESTS" == "true" ]]; then FAST_TESTS_FLAG="--only-impacted-packages";
      fi
    - inv -e sds.build-library
    - inv -e agent.build
    - inv -e test $FLAVORS --include-sds --race --profile --rerun-fails=2 --coverage
      --cpus $KUBERNETES_CPU_REQUEST $EXTRA_OPTS --save-result-json $TEST_OUTPUT_FILE
      --junit-tar "junit-${CI_JOB_NAME}.tgz" --build-stdlib $FAST_TESTS_FLAG --test-washer
    stage: source_test
    tags:
    - arch:arm64
    variables:
      CONDA_ENV: ddpy3
      EXTERNAL_LINKS_PATH: external_links_$CI_JOB_ID.json
      FLAVORS: --flavor base
      KUBERNETES_CPU_REQUEST: 16
      KUBERNETES_MEMORY_LIMIT: 16Gi
      KUBERNETES_MEMORY_REQUEST: 16Gi
      PYTHON_RUNTIMES: '3'
      TEST_OUTPUT_FILE: test_output.json
tests_rpm-arm64-py3
  tests_rpm-arm64-py3:
    after_script:
+   - $CI_PROJECT_DIR/tools/ci/junit_upload.sh
    - CODECOV_TOKEN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $CODECOV_TOKEN) || exit
      $?; export CODECOV_TOKEN
    - inv -e coverage.upload-to-codecov $COVERAGE_CACHE_FLAG || true
    artifacts:
      expire_in: 2 weeks
      paths:
      - $TEST_OUTPUT_FILE
      - junit-*.tgz
      reports:
        annotations:
        - $EXTERNAL_LINKS_PATH
        junit:
        - '**/junit-out-*.xml'
      when: always
    before_script:
    - source /root/.bashrc && conda activate $CONDA_ENV
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
    - rm -f modcache.tar.xz
    - inv -e rtloader.make --install-prefix=$CI_PROJECT_DIR/dev
    - inv -e rtloader.install
    - inv -e rtloader.format --raise-if-changed
    - inv -e rtloader.test
    image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
    - go_deps
    - go_tools_deps
    rules:
    - if: $RUN_UNIT_TESTS == "off"
      when: never
    - if: $CI_COMMIT_BRANCH == "main"
      variables:
        COVERAGE_CACHE_FLAG: --push-coverage-cache
        FAST_TESTS: 'false'
    - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
      variables:
        COVERAGE_CACHE_FLAG: ''
        FAST_TESTS: 'false'
    - if: $CI_COMMIT_TAG != null
      variables:
        COVERAGE_CACHE_FLAG: ''
        FAST_TESTS: 'false'
    - if: $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "pipeline"
      variables:
        COVERAGE_CACHE_FLAG: ''
        FAST_TESTS: 'false'
    - if: $RUN_UNIT_TESTS == "on"
      variables:
        COVERAGE_CACHE_FLAG: ''
        FAST_TESTS: 'false'
    - variables:
        COVERAGE_CACHE_FLAG: --pull-coverage-cache
        FAST_TESTS: 'true'
    script:
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache_tools.tar.xz -C $GOPATH/pkg/mod/cache
    - rm -f modcache_tools.tar.xz
    - inv -e install-tools
    - inv -e gitlab.generate-ci-visibility-links --output=$EXTERNAL_LINKS_PATH
    - FAST_TESTS_FLAG=""
    - if [[ "$FAST_TESTS" == "true" ]]; then FAST_TESTS_FLAG="--only-impacted-packages";
      fi
    - inv -e sds.build-library
    - inv -e agent.build
    - inv -e test $FLAVORS --include-sds --race --profile --rerun-fails=2 --coverage
      --cpus $KUBERNETES_CPU_REQUEST $EXTRA_OPTS --save-result-json $TEST_OUTPUT_FILE
      --junit-tar "junit-${CI_JOB_NAME}.tgz" --build-stdlib $FAST_TESTS_FLAG --test-washer
    stage: source_test
    tags:
    - arch:arm64
    variables:
      CONDA_ENV: ddpy3
      EXTERNAL_LINKS_PATH: external_links_$CI_JOB_ID.json
      FLAVORS: --flavor base
      KUBERNETES_CPU_REQUEST: 16
      KUBERNETES_MEMORY_LIMIT: 16Gi
      KUBERNETES_MEMORY_REQUEST: 16Gi
      PYTHON_RUNTIMES: '3'
      TEST_OUTPUT_FILE: test_output.json

Removed Jobs

  • unit_tests_arm64_junit_upload

Changes Summary

Removed Modified Added Renamed
1 2 0 0

ℹ️ Diff available in the job log.

@paulcacheux paulcacheux marked this pull request as ready for review October 16, 2024 17:46
@paulcacheux paulcacheux requested review from a team as code owners October 16, 2024 17:46
@paulcacheux
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Oct 17, 2024

🚂 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.

Use /merge -c to cancel this operation!

@dd-devflow
Copy link

dd-devflow bot commented Oct 17, 2024

🚂 MergeQueue: pull request added to the queue

The median merge time in main is 24m.

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit fb38ad1 into main Oct 17, 2024
213 checks passed
@dd-mergequeue dd-mergequeue bot deleted the paulcacheux/remove-last-junit-upload branch October 17, 2024 08:11
@github-actions github-actions bot added this to the 7.60.0 milestone Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog qa/no-code-change No code change in Agent code requiring validation team/agent-devx-infra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants