Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(warehouse-sources): add five codecov coverage and test tables (#103348)

Tom Owers12dda38cdf53
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md
index 4c77a60b0767..da57151eefe0 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md
@@ -1746,13 +1746,13 @@ Today (7): `branches`, `commits`, `components`, `coverage_trend`, `flags`, `pull
Diffed against: <https://api.codecov.io/api/v2/schema>
-- [ ] `/{service}/{owner}/repos/{repo}/totals/` — Current coverage totals per repo (lines, hits, misses, partials) - the headline number, only available as a trend today (high)
-- [ ] `/{service}/{owner}/repos/{repo}/test-results/ (and /test-results/{id}/)` — Test Analytics: per-test failure rate, flake rate and runtime - Codecov's flagship non-coverage product, entirely unsynced (high)
-- [ ] `/{service}/{owner}/repos/{repo}/report/ and /report/tree` — The coverage report broken down by file and directory, which turns repo-level coverage into something actionable (high)
+- [x] `/{service}/{owner}/repos/{repo}/totals/` — Current coverage totals per repo (lines, hits, misses, partials) - the headline number, only available as a trend today (high)
+- [x] `/{service}/{owner}/repos/{repo}/test-results/ (and /test-results/{id}/)` — Test Analytics: per-test failure rate, flake rate and runtime - Codecov's flagship non-coverage product, entirely unsynced (high)
+- [x] `/{service}/{owner}/repos/{repo}/report/ and /report/tree` — The coverage report broken down by file and directory, which turns repo-level coverage into something actionable (high)
- [ ] `/{service}/{owner}/repos/{repo}/flags/{flag_name}/coverage/` — Coverage trend per flag - the breakdown dimension for the flags table already synced (medium)
- [ ] `/{service}/{owner}/repos/{repo}/file_report/{path}/` — Line-level coverage for a specific file, needed to find persistently uncovered hot spots (medium)
- [ ] `/{service}/{owner}/repos/{repo}/commits/{commitid}/uploads/` — Which CI jobs uploaded coverage for each commit - the way to detect missing or failed uploads skewing coverage (medium)
-- [ ] `/{service}/{owner}/users/` — Org member lookup resolving the author IDs on commits and pulls already synced (medium)
+- [x] `/{service}/{owner}/users/` — Org member lookup resolving the author IDs on commits and pulls already synced (medium)
- [ ] `/{service}/{owner}/repos/{repo}/compare/impacted_files (also /compare/flags, /compare/components)` — Coverage delta of a pull request by file, flag and component - the review-time metric teams actually track (medium)
- [ ] `/{service}/{owner}/repos/{repo}/test-analytics/` — Aggregated test-suite health summary that pairs with the raw test results (medium)
- [ ] `/{service}/{owner}/` — Owner/org record giving repos an organization-level parent to roll up to (low)
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/canonical_descriptions.py
index f1defff4fe68..7a9202ea2b73 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/canonical_descriptions.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/canonical_descriptions.py
@@ -78,6 +78,88 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {
"coverage": "Latest coverage percentage for the component.",
},
},
+ "repo_totals": {
+ "description": "Current coverage totals for a repository, measured on the head commit of its default branch.",
+ "docs_url": "https://docs.codecov.com/reference/repos_totals_retrieve",
+ "columns": {
+ "repo": "Repository the totals belong to (injected by the import).",
+ "files": "Number of files included in the coverage report.",
+ "lines": "Number of trackable lines across those files.",
+ "hits": "Number of lines covered by at least one test.",
+ "misses": "Number of lines not covered by any test.",
+ "partials": "Number of lines only partially covered (some branches taken).",
+ "coverage": "Coverage percentage of the repository.",
+ "branches": "Number of branch points in the report.",
+ "methods": "Number of methods in the report.",
+ "messages": "Number of messages recorded against the report.",
+ "sessions": "Number of coverage uploads merged into the report.",
+ "complexity": "Cyclomatic complexity covered, where the language reports it.",
+ "complexity_total": "Total cyclomatic complexity, where the language reports it.",
+ "complexity_ratio": "Covered complexity as a percentage of total complexity.",
+ "diff": "Coverage totals of the commit diff, when Codecov recorded them.",
+ "commit_file_url": "Codecov URL to view coverage for the commit these totals came from.",
+ },
+ },
+ "report_files": {
+ "description": "Current coverage of a single file in a repository, from the head commit of its default branch.",
+ "docs_url": "https://docs.codecov.com/reference/repos_report_retrieve",
+ "columns": {
+ "repo": "Repository the file belongs to (injected by the import).",
+ "name": "File path, relative to the repository root.",
+ "totals": "Coverage totals for the file (lines, hits, misses, partials, coverage percentage).",
+ "line_coverage": "Line-by-line coverage as [line number, state] pairs, where state is 0 hit, 1 miss, 2 partial.",
+ },
+ },
+ "report_tree": {
+ "description": "Coverage rolled up at one node of the repository file tree — a directory or a file.",
+ "docs_url": "https://docs.codecov.com/reference/repos_report_tree_retrieve",
+ "columns": {
+ "repo": "Repository the node belongs to (injected by the import).",
+ "name": "Name of the directory or file, without its parent path.",
+ "full_path": "Path of the node from the repository root.",
+ "coverage": "Coverage percentage of everything under this node.",
+ "lines": "Number of trackable lines under this node.",
+ "hits": "Number of covered lines under this node.",
+ "partials": "Number of partially covered lines under this node.",
+ "misses": "Number of uncovered lines under this node.",
+ },
+ },
+ "test_results": {
+ "description": "A single run of a single test, recorded by Codecov Test Analytics from an uploaded test report.",
+ "docs_url": "https://docs.codecov.com/reference/repos_test_results_list",
+ "columns": {
+ "repo": "Repository the test ran in (injected by the import).",
+ "test_id": "Identifier of the test, stable across runs.",
+ "name": "Test name as reported by the test framework.",
+ "classname": "Class the test belongs to, where the framework reports one.",
+ "testsuite": "Test suite the test belongs to.",
+ "computed_name": "Display name Codecov builds from the suite, class and test name.",
+ "outcome": "Result of the run: pass, failure, error or skip.",
+ "duration_seconds": "How long the test took to run, in seconds.",
+ "failure_message": "Failure output captured for a failing run.",
+ "framework": "Test framework that produced the result.",
+ "filename": "File the test is defined in.",
+ "repo_id": "Codecov internal repository id.",
+ "commit_sha": "SHA of the commit the test ran against.",
+ "branch": "Branch the test ran on.",
+ "flags": "Coverage flags attached to the upload this run came from.",
+ "upload_id": "Codecov id of the upload that carried this run.",
+ "properties": "Extra properties the test framework attached to the run.",
+ "timestamp": "When the test run was recorded.",
+ },
+ },
+ "users": {
+ "description": "A member of the Codecov organization, including whether they hold an active seat.",
+ "docs_url": "https://docs.codecov.com/reference/users_list",
+ "columns": {
+ "service": "Git hosting provider the member signed in through.",
+ "username": "Username on the git provider, unique within the organization.",
+ "name": "Display name of the member.",
+ "email": "Email address of the member.",
+ "activated": "Whether the member holds an activated seat in the organization.",
+ "is_admin": "Whether the member is an admin of the organization.",
+ },
+ },
"coverage_trend": {
"description": "Daily coverage time series for a repository's default branch.",
"docs_url": "https://docs.codecov.com/reference/repos_coverage_list",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/codecov.py b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/codecov.py
index 523196a35b91..ba27635127a2 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/codecov.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/codecov.py
@@ -12,6 +12,7 @@ from tenacity import retry, retry_if_exception_type, stop_after_attempt, wait_ex
from products.warehouse_sources.backend.temporal.data_imports.sources.codecov.settings import (
CODECOV_ENDPOINTS,
CodecovEndpointConfig,
+ CodecovResponseShape,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.common.http import make_tracked_session
from products.warehouse_sources.backend.temporal.data_imports.sources.common.resumable import ResumableSourceManager
@@ -108,6 +109,42 @@ def _format_start_date(cutoff: datetime) -> str:
return cutoff.date().isoformat()
+def _totals_rows(data: Any, repo: str) -> list[dict[str, Any]]:
+ """One row of headline coverage per repository, with `totals` flattened into the root.
+
+ The per-file breakdown the same response carries is the `report_files` grain, so it is
+ dropped here — which also means the row's `files` is the file *count* from `totals`.
+ """
+ if not data:
+ return []
+ return [{**(data.get("totals") or {}), "repo": repo, "commit_file_url": data.get("commit_file_url")}]
+
+
+def _report_file_rows(data: Any, repo: str) -> list[dict[str, Any]]:
+ return [{**file, "repo": repo} for file in (data or {}).get("files") or []]
+
+
+def _tree_rows(nodes: Any, repo: str) -> Iterator[dict[str, Any]]:
+ """Flatten the nested directory tree into one row per node, at every depth."""
+ for node in nodes or []:
+ yield {**{key: value for key, value in node.items() if key != "children"}, "repo": repo}
+ yield from _tree_rows(node.get("children"), repo)
+
+
+def _unpaginated_rows(shape: CodecovResponseShape, data: Any, repo: str) -> list[dict[str, Any]]:
+ match shape:
+ case CodecovResponseShape.BARE_LIST:
+ return [{**item, "repo": repo} for item in data or []]
+ case CodecovResponseShape.TOTALS:
+ return _totals_rows(data, repo)
+ case CodecovResponseShape.REPORT_FILES:
+ return _report_file_rows(data, repo)
+ case CodecovResponseShape.TREE:
+ return list(_tree_rows(data, repo))
+ case _:
+ raise ValueError(f"Endpoint response shape {shape} is paginated")
+
+
def parse_repositories(repositories: str | None) -> list[str]:
"""Split the optional comma-separated repository allow-list into clean names."""
if not repositories:
@@ -187,8 +224,10 @@ def _get_top_level_rows(
allowed = set(repositories)
for results, next_url in _iter_pages(session, url, headers, logger):
- # The repos list has no server-side name filter, so the allow-list applies client-side.
- rows = [item for item in results if not allowed or item.get("name") in allowed]
+ rows = results
+ if config.filtered_by_repository_allow_list and allowed:
+ # The repos list has no server-side name filter, so the allow-list applies client-side.
+ rows = [item for item in results if item.get("name") in allowed]
if rows:
yield rows
# Save AFTER yielding so a crash re-yields the last page rather than skipping it —
@@ -215,7 +254,7 @@ def _get_fan_out_rows(
cutoff = _normalize_cutoff(db_incremental_field_last_value) if should_use_incremental_field else None
params: dict[str, Any] = {**config.extra_params}
- if config.paginated:
+ if config.response_shape is CodecovResponseShape.PAGINATED_LIST:
params = {"page_size": PAGE_SIZE, **config.extra_params}
stop_field: str | None = None
if cutoff is not None and config.incremental_fields:
@@ -241,10 +280,9 @@ def _get_fan_out_rows(
resume_url = None # only the resumed-into repo uses the saved URL; the rest start fresh
try:
- if not config.paginated:
- # components returns a bare JSON array with no pagination envelope.
- items = _fetch_page(session, url, headers, logger)
- rows = [{**item, "repo": repo} for item in items or []]
+ if config.response_shape is not CodecovResponseShape.PAGINATED_LIST:
+ # Single-response endpoints: a bare array, or a report object we reshape.
+ rows = _unpaginated_rows(config.response_shape, _fetch_page(session, url, headers, logger), repo)
if rows:
yield rows
else:
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/settings.py
index 0d54674e36b3..75566f43f012 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/settings.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/settings.py
@@ -1,10 +1,27 @@
-from dataclasses import dataclass, field
+from dataclasses import field
+from enum import StrEnum
from typing import Optional
+from posthog.dataclasses import frozen
+
from products.warehouse_sources.backend.types import IncrementalField, IncrementalFieldType
+# Codecov returns only the top level of the tree unless `depth` asks for more, and no real
+# repository nests source files deeper than this.
+REPORT_TREE_DEPTH = 100
+
+
+class CodecovResponseShape(StrEnum):
+ """How an endpoint's response body maps onto warehouse rows."""
+
+ PAGINATED_LIST = "paginated_list" # DRF envelope: {count, next, previous, results}
+ BARE_LIST = "bare_list" # plain JSON array, one row per entry
+ TOTALS = "totals" # coverage report object, flattened to a single totals row
+ REPORT_FILES = "report_files" # coverage report object, one row per entry in `files`
+ TREE = "tree" # nested directory tree, one row per node at any depth
+
-@dataclass
+@frozen
class CodecovEndpointConfig:
name: str
path: str # Path template relative to /{service}/{owner_username}; "{repo}" is filled per repository during fan-out
@@ -17,9 +34,11 @@ class CodecovEndpointConfig:
incremental_server_param: Optional[str] = None
partition_key: Optional[str] = None # Stable datetime field (never one that mutates)
fan_out_over_repos: bool = False
- # Most endpoints are DRF-paginated ({count, next, previous, results}); components
- # returns a bare, unpaginated JSON array.
- paginated: bool = True
+ response_shape: CodecovResponseShape = CodecovResponseShape.PAGINATED_LIST
+ # The repository allow-list has no server-side equivalent, so the endpoint that lists
+ # repositories applies it client-side. Endpoints that fan out already only visit the
+ # allowed repositories, and owner-level endpoints are not repository-scoped at all.
+ filtered_by_repository_allow_list: bool = False
extra_params: dict[str, str] = field(default_factory=dict)
@@ -38,6 +57,7 @@ CODECOV_ENDPOINTS: dict[str, CodecovEndpointConfig] = {
# No server-side time filter and `updatestamp` mutates, so full refresh only.
incremental_fields=[],
primary_keys=["name"],
+ filtered_by_repository_allow_list=True,
),
"branches": CodecovEndpointConfig(
name="branches",
@@ -79,7 +99,7 @@ CODECOV_ENDPOINTS: dict[str, CodecovEndpointConfig] = {
incremental_fields=[], # Point-in-time coverage per component; no timestamps at all.
primary_keys=["repo", "component_id"],
fan_out_over_repos=True,
- paginated=False,
+ response_shape=CodecovResponseShape.BARE_LIST,
),
"coverage_trend": CodecovEndpointConfig(
name="coverage_trend",
@@ -93,6 +113,50 @@ CODECOV_ENDPOINTS: dict[str, CodecovEndpointConfig] = {
fan_out_over_repos=True,
extra_params={"interval": "1d"},
),
+ "repo_totals": CodecovEndpointConfig(
+ name="repo_totals",
+ path="/repos/{repo}/totals",
+ # Coverage of the default branch head as it stands right now; the response carries no
+ # timestamp to filter or order on.
+ incremental_fields=[],
+ primary_keys=["repo"],
+ fan_out_over_repos=True,
+ response_shape=CodecovResponseShape.TOTALS,
+ ),
+ "report_files": CodecovEndpointConfig(
+ name="report_files",
+ path="/repos/{repo}/report",
+ incremental_fields=[], # Same point-in-time report as repo_totals, at file grain.
+ primary_keys=["repo", "name"],
+ fan_out_over_repos=True,
+ response_shape=CodecovResponseShape.REPORT_FILES,
+ ),
+ "report_tree": CodecovEndpointConfig(
+ name="report_tree",
+ path="/repos/{repo}/report/tree",
+ incremental_fields=[], # Same point-in-time report as repo_totals, at directory grain.
+ primary_keys=["repo", "full_path"],
+ fan_out_over_repos=True,
+ response_shape=CodecovResponseShape.TREE,
+ extra_params={"depth": str(REPORT_TREE_DEPTH)},
+ ),
+ "test_results": CodecovEndpointConfig(
+ name="test_results",
+ path="/repos/{repo}/test-results",
+ # `timestamp` never moves, but the endpoint filters only on branch, commit and
+ # duration and exposes no ordering param, so there is nothing to sync incrementally
+ # against.
+ incremental_fields=[],
+ primary_keys=["repo", "test_id", "commit_sha", "timestamp"],
+ partition_key="timestamp",
+ fan_out_over_repos=True,
+ ),
+ "users": CodecovEndpointConfig(
+ name="users",
+ path="/users",
+ incremental_fields=[], # Membership state only; no timestamps at all.
+ primary_keys=["username"],
+ ),
}
ENDPOINTS = tuple(CODECOV_ENDPOINTS.keys())
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/source.py
index c236bcdef5d9..d82d4bf2565c 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/source.py
@@ -37,6 +37,11 @@ _ENDPOINT_DESCRIPTIONS: dict[str, str] = {
"coverage_trend": "Daily min/max/avg coverage time series per repository (default branch)",
"flags": "Current coverage percentage per flag, per repository",
"components": "Current coverage percentage per component, per repository",
+ "repo_totals": "Current coverage totals per repository (lines, hits, misses, partials, coverage percentage)",
+ "report_files": "Current coverage per file, with line-by-line coverage values",
+ "report_tree": "Current coverage rolled up per directory and file, following the repository's file tree",
+ "test_results": "Individual test runs from Test Analytics, with outcome, duration and failure message",
+ "users": "Members of the Codecov organization, resolving the author usernames on commits and pulls",
}
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/tests/test_codecov.py b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/tests/test_codecov.py
index d792f468ba47..357961ec8ba2 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/tests/test_codecov.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/tests/test_codecov.py
@@ -280,6 +280,135 @@ class TestFanOutRows:
assert rows == [{"component_id": "api", "name": "api", "coverage": 91.2, "repo": "r1"}]
+class TestCoverageReportEndpoints:
+ def test_repo_totals_flattens_totals_onto_one_row_per_repo(self, monkeypatch: Any) -> None:
+ pages = {
+ _ACTIVE_REPOS_URL: _page([{"name": "r1"}]),
+ f"{_BASE}/repos/r1/totals": {
+ "totals": {"files": 3, "lines": 100, "hits": 90, "misses": 8, "partials": 2, "coverage": 90.0},
+ # The per-file breakdown is the report_files grain and must not leak into this
+ # row, where `files` is the file count from `totals`.
+ "files": [{"name": "app.py", "totals": {"lines": 50}}],
+ "commit_file_url": "https://app.codecov.io/gh/acme/r1",
+ },
+ }
+ _patch_fetch(monkeypatch, pages)
+ rows = _collect(_FakeResumableManager(), repositories=None, endpoint="repo_totals")
+
+ assert rows == [
+ {
+ "repo": "r1",
+ "files": 3,
+ "lines": 100,
+ "hits": 90,
+ "misses": 8,
+ "partials": 2,
+ "coverage": 90.0,
+ "commit_file_url": "https://app.codecov.io/gh/acme/r1",
+ }
+ ]
+
+ def test_repo_without_a_coverage_report_yields_nothing(self, monkeypatch: Any) -> None:
+ # Codecov 404s a repo that has never had a report processed; the fan-out skips it.
+ pages = {
+ _ACTIVE_REPOS_URL: _page([{"name": "r1"}, {"name": "r2"}]),
+ f"{_BASE}/repos/r1/totals": _http_error(404),
+ f"{_BASE}/repos/r2/totals": {"totals": {"coverage": 80.0}, "files": [], "commit_file_url": None},
+ }
+ _patch_fetch(monkeypatch, pages)
+ rows = _collect(_FakeResumableManager(), repositories=None, endpoint="repo_totals")
+
+ assert [r["repo"] for r in rows] == ["r2"]
+
+ def test_report_files_yields_one_row_per_file(self, monkeypatch: Any) -> None:
+ pages = {
+ _ACTIVE_REPOS_URL: _page([{"name": "r1"}]),
+ f"{_BASE}/repos/r1/report": {
+ "totals": {"coverage": 90.0},
+ "files": [
+ {"name": "app.py", "totals": {"lines": 2}, "line_coverage": [[1, 0], [2, 1]]},
+ {"name": "lib/util.py", "totals": {"lines": 1}, "line_coverage": [[7, 2]]},
+ ],
+ "commit_file_url": "https://app.codecov.io/gh/acme/r1",
+ },
+ }
+ _patch_fetch(monkeypatch, pages)
+ rows = _collect(_FakeResumableManager(), repositories=None, endpoint="report_files")
+
+ assert [(r["repo"], r["name"]) for r in rows] == [("r1", "app.py"), ("r1", "lib/util.py")]
+ assert rows[0]["line_coverage"] == [[1, 0], [2, 1]]
+
+ def test_report_tree_flattens_every_nesting_level(self, monkeypatch: Any) -> None:
+ pages = {
+ _ACTIVE_REPOS_URL: _page([{"name": "r1"}]),
+ f"{_BASE}/repos/r1/report/tree?depth=100": [
+ {
+ "name": "foo",
+ "full_path": "foo",
+ "coverage": 62.5,
+ "lines": 8,
+ "hits": 5,
+ "partials": 0,
+ "misses": 3,
+ "children": [
+ {
+ "name": "bar",
+ "full_path": "foo/bar",
+ "coverage": 50.0,
+ "lines": 4,
+ "hits": 2,
+ "partials": 0,
+ "misses": 2,
+ "children": [
+ {
+ "name": "file1.py",
+ "full_path": "foo/bar/file1.py",
+ "coverage": 50.0,
+ "lines": 4,
+ "hits": 2,
+ "partials": 0,
+ "misses": 2,
+ }
+ ],
+ }
+ ],
+ },
+ {
+ "name": "file2.py",
+ "full_path": "file2.py",
+ "coverage": 100.0,
+ "lines": 1,
+ "hits": 1,
+ "partials": 0,
+ "misses": 0,
+ },
+ ],
+ }
+ _patch_fetch(monkeypatch, pages)
+ rows = _collect(_FakeResumableManager(), repositories=None, endpoint="report_tree")
+
+ # Directories and files become sibling rows keyed by full_path, and `children` is
+ # dropped rather than stored as a nested column.
+ assert [r["full_path"] for r in rows] == ["foo", "foo/bar", "foo/bar/file1.py", "file2.py"]
+ assert all(r["repo"] == "r1" for r in rows)
+ assert not any("children" in r for r in rows)
+
+
+class TestUsers:
+ def test_users_are_not_filtered_by_the_repository_allow_list(self, monkeypatch: Any) -> None:
+ # Users are owner-scoped, so the repository allow-list must not reach them — it would
+ # match on `name` and drop every row.
+ pages = {
+ f"{_BASE}/users?page_size=500": _page(
+ [{"username": "ana", "name": "Ana"}, {"username": "bo", "name": "Bo"}]
+ )
+ }
+ _patch_fetch(monkeypatch, pages)
+ rows = _collect(_FakeResumableManager(), repositories="r1", endpoint="users")
+
+ assert [r["username"] for r in rows] == ["ana", "bo"]
+
+
class TestIncrementalSync:
_WATERMARK = datetime(2026, 7, 5, tzinfo=UTC)
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/tests/test_codecov_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/tests/test_codecov_source.py
index 691cb68c6590..51c5f8ff9b08 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/tests/test_codecov_source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/codecov/tests/test_codecov_source.py
@@ -8,7 +8,18 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.generated_
)
_INCREMENTAL_ENDPOINTS = {"commits", "coverage_trend"}
-_FULL_REFRESH_ENDPOINTS = {"repos", "branches", "pulls", "flags", "components"}
+_FULL_REFRESH_ENDPOINTS = {
+ "repos",
+ "branches",
+ "pulls",
+ "flags",
+ "components",
+ "repo_totals",
+ "report_files",
+ "report_tree",
+ "test_results",
+ "users",
+}
class TestCodecovSource: