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

log when raw upload contains no uploaded files #597

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion services/report/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,8 +926,20 @@ def parse_raw_report_from_storage(

raw_uploaded_report = parser.parse_raw_report_from_bytes(archive_file)

raw_report_count = len(raw_uploaded_report.get_uploaded_files())
if raw_report_count < 1:
log.warning(
"Raw upload contains no uploaded files",
extra=dict(
commit=upload.report.commit_id,
repoid=repo.repoid,
raw_report_count=raw_report_count,
upload_version=upload_version,
archive_url=archive_url,
),
)
RAW_UPLOAD_RAW_REPORT_COUNT.labels(version=upload_version).observe(
len(raw_uploaded_report.get_uploaded_files())
raw_report_count
)

return raw_uploaded_report
Expand Down
Loading