agentops icon indicating copy to clipboard operation
agentops copied to clipboard

[Bug]: Python 3.11 unit test fails at the code coverage step

Open dot-agi opened this issue 8 months ago • 0 comments

📦 Package Version

0.4.6

🔎 Describe the Bug

In the python-tests.yaml workflow, code coverage is only enabled for python version 3.11 -

# Only upload coverage report for python3.11
- name: Upload coverage to Codecov
  if: ${{matrix.python-version == '3.11'}}
  uses: codecov/codecov-action@v5
  with:
    token: ${{ secrets.CODECOV_TOKEN }}
    files: ./coverage.xml
    flags: unittests
    name: codecov-umbrella
    fail_ci_if_error: true # Should we?

This test fails in the CI for the current PRs with the following error log -

Run codecov/codecov-action@v5
Run CC_ACTION_VERSION=$(cat ${GITHUB_ACTION_PATH}/src/version)
==> Running Action version 5.4.1
Run git config --global --add safe.directory "/home/runner/work/agentops/agentops"
Run CC_FORK="false"
Run actions/github-script@v7
Error: Error message: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable
    at OidcClient.<anonymous> (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:585:23)
    at Generator.next (<anonymous>)
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:522:71
    at new Promise (<anonymous>)
    at __webpack_modules__.8041.__awaiter (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:518:12)
    at OidcClient.getIDToken (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:571:16)
    at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:421:46)
    at Generator.next (<anonymous>)
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:133:71
    at new Promise (<anonymous>)
Error: Unhandled error: Error: Error message: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable

Questions -

  • Why is the coverage only enabled for 3.11 version?
  • What is the root cause of this issue?

🤝 Contribution

  • [ ] Yes, I'd be happy to submit a pull request with these changes.
  • [ ] I need some guidance on how to contribute.
  • [x] I'd prefer the AgentOps team to handle this update.

dot-agi avatar Apr 14 '25 20:04 dot-agi