Skip to content

Commit

Permalink
Merge branch 'master' into update-to-v5
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov authored Dec 5, 2024
2 parents f7099a6 + e59b288 commit a415772
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -30,11 +30,11 @@ jobs:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: '3.8'
- name: Install Packaging Tools
run: |
make package.install
Expand Down
8 changes: 5 additions & 3 deletions codecovopentelem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,19 @@ def export(self, spans):
if not tracked_spans and not untracked_spans:
return SpanExportResult.SUCCESS
url = urllib.parse.urljoin(self._codecov_endpoint, "/profiling/uploads")
headers = {"Authorization": f"repotoken {self._repository_token}"}
json_data = {"profiling": self._code}
try:
res = requests.post(
url,
headers={"Authorization": f"repotoken {self._repository_token}"},
json={"profiling": self._code},
headers=headers,
json=json_data,
)
res.raise_for_status()
except requests.RequestException:
log.warning(
"Unable to send profiling data to codecov",
extra=dict(response_data=res.json())
extra=dict(url=url, json=json_data)
)
return SpanExportResult.FAILURE
location = res.json()["raw_upload_location"]
Expand Down

0 comments on commit a415772

Please sign in to comment.