Skip to content

Cover activity log endpoints in org integration suite#180

Open
sdairs wants to merge 1 commit into
issue-152-bootstrap-org-integrationfrom
issue-155-activity-log
Open

Cover activity log endpoints in org integration suite#180
sdairs wants to merge 1 commit into
issue-152-bootstrap-org-integrationfrom
issue-155-activity-log

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented May 15, 2026

Summary

Adds an Activity Log phase to integration_org_test.rs covering the two previously-uncovered org-scoped methods.

  • activity_get_list — polled for up to ~30s (3s interval) for an entry whose createdAt falls within the current test window; falls back gracefully on a quiet org by recording a NonBlocking failure rather than panicking.
  • activity_get — fetched for the entry found above; asserts id round-trips, organizationId is non-empty, createdAt is non-zero.
  • Both steps are NonBlocking — eventual-consistency misses do not fail the run, they surface in the FailureRecorder summary.

Phase ordering

Placed after the Org Access phase. Once the Custom Roles phase (#154) lands directly above this one, the role create + delete events become the known-recent activity the polling check correlates against; until then the phase degrades to "any entry within the test window". Documented inline so a future reviewer adding #154 knows where to slot it.

Polling strategy

poll_until from support.rs with a 30s budget and 3s interval. On timeout the inner error is wrapped into a clean NonBlocking failure message ("no activity entry observed within 30s budget: ...") for readable FailureRecorder output.

Stacked PR note

This PR is stacked on #173 (#152 bootstrap) and is best-reviewed after the Custom Roles phase (#154) lands. GitHub will auto-retarget --base to main when #173 merges.

Closes #155
Parent: #151

Test plan

  • cargo build -p clickhouse-cloud-api clean
  • cargo clippy -p clickhouse-cloud-api --test integration_org_test -- -D warnings clean (pre-existing clippy errors in spec_coverage_test.rs and integration_test.rs are present on the base branch and unrelated)
  • cargo test -p clickhouse-cloud-api — all suites green; integration_org_test::cloud_org_lifecycle registers as one ignored lifecycle test as expected
  • Live --ignored run via cloud-integration workflow (requires the existing CLICKHOUSE_CLOUD_* secrets already wired up by Add integration_org_test.rs skeleton for org-only live coverage #152)

🤖 Generated with Claude Code

@sdairs sdairs requested a review from iskakaushik as a code owner May 15, 2026 16:07
@sdairs sdairs temporarily deployed to cloud-integration May 15, 2026 16:08 — with GitHub Actions Inactive
@sdairs sdairs linked an issue May 15, 2026 that may be closed by this pull request
@sdairs sdairs force-pushed the issue-152-bootstrap-org-integration branch 2 times, most recently from efa7803 to 4fbc39a Compare May 16, 2026 11:24
Adds an Activity Log phase to integration_org_test.rs that exercises
activity_get_list and activity_get against the production org. The
phase polls the activity list for up to 30s (3s interval) for an
entry whose createdAt falls within the current test window, then
calls activity_get on that entry and asserts id, organizationId,
and createdAt are populated. Both steps are NonBlocking and record
to FailureRecorder on miss; activity log writes are eventually
consistent so a short quiet window on the org should not fail the
run.

Placed after the Org Access phase so once the Custom Roles phase
(#154) lands directly above it, the role create + delete events
become the known-recent activity the polling check correlates
against. Until then the phase degrades to "any entry within the
test window" — documented inline.

Closes #155
@sdairs sdairs force-pushed the issue-155-activity-log branch from 0c44fd5 to cb42128 Compare May 16, 2026 11:28
@sdairs sdairs temporarily deployed to cloud-integration May 16, 2026 11:28 — with GitHub Actions Inactive
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.

Cover activity log endpoints in org integration suite

1 participant