Skip to content

perf(cloud): poll results with ?view=summary and If-None-Match - #219

Merged
finalerock44 merged 1 commit into
devfrom
perf/results-poll-summary-etag
Oct 8, 2026
Merged

finalerock44 merged 1 commit into
devfrom
perf/results-poll-summary-etag

Conversation

@finalerock44

Copy link
Copy Markdown
Contributor

The dcd cloud poll loop fetched every result row in full, including result_files and its main_log, every 20-60s, even when nothing had changed. It now asks for ?view=summary, which an older API ignores (returning the full rows, a superset), and revalidates with the last ETag so an unchanged poll is an empty 304.

The conditional request also sends Cache-Control: max-age=0. Without it undici appends Cache-Control: no-cache, and Express then never answers 304. Only a non-empty result set with an ETag is cached; the 200 error envelope and empty sets are not.

What & why

Type of change

  • fix — bug fix
  • feat — new feature
  • perf — performance improvement
  • refactor — code change that's neither a fix nor a feature
  • docs — documentation only
  • chore / ci / build / test — tooling, no user-facing change
  • Breaking change (title has ! or PR notes a BREAKING CHANGE:)

Checklist

  • PR title follows the Conventional Commits format (see comment above)
  • pnpm lint passes
  • pnpm typecheck passes
  • pnpm build passes
  • I have not bumped the version or edited CHANGELOG.md (release-please handles this)
  • I have signed the CLA (the bot will prompt on first contribution)
  • Docs / README.md / STYLE_GUIDE.md updated if behaviour or output changed

How to test

The dcd cloud poll loop fetched every result row in full, including
result_files and its main_log, every 20-60s, even when nothing had
changed. It now asks for ?view=summary, which an older API ignores
(returning the full rows, a superset), and revalidates with the last
ETag so an unchanged poll is an empty 304.

The conditional request also sends Cache-Control: max-age=0. Without
it undici appends Cache-Control: no-cache, and Express then never
answers 304. Only a non-empty result set with an ETag is cached; the
200 error envelope and empty sets are not.
@finalerock44 finalerock44 self-assigned this Oct 7, 2026
@finalerock44
finalerock44 merged commit e916c59 into dev Oct 8, 2026
9 checks passed
@finalerock44
finalerock44 deleted the perf/results-poll-summary-etag branch October 8, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant