Skip to content

test(cloud): add staging smoke test for recce-cloud upload#1114

Open
even-wei wants to merge 9 commits intomainfrom
feature/upload-smoke-test
Open

test(cloud): add staging smoke test for recce-cloud upload#1114
even-wei wants to merge 9 commits intomainfrom
feature/upload-smoke-test

Conversation

@even-wei
Copy link
Contributor

PR checklist

  • Ensure you have added or ran the appropriate tests for your PR.
  • DCO signed

What type of PR is this?

Test / CI

What this PR does / why we need it:

Adds an E2E smoke test for recce-cloud upload against the staging server, covering all testable authentication flows:

Test Flow Auth
1. GitHub PR Upload GITHUB_TOKEN → platform-specific endpoint Platform (GitHub API verify)
2. GitHub Prod Upload GITHUB_TOKEN + --type prod Platform
3. RECCE_API_TOKEN PR Upload RECCE_API_TOKEN → generic endpoint DB lookup
4. RECCE_API_TOKEN Prod Upload RECCE_API_TOKEN + --type prod DB lookup

Key design decisions:

  • Static fixtures — no dbt build needed (server stores files as-is)
  • env -u RECCE_API_TOKEN for GitHub flow isolation (CLI Priority 1 = API token)
  • Graceful degradation — tests 3-4 skip if SMOKE_TEST_API_TOKEN not set
  • Cleanup via GITHUB_TOKEN — delete auto-detect uses platform token regardless

Also removes the obsolete Recce State file operations (download/purge/upload) from the existing dbt cloud smoke test.

Secrets required

Secret Status
RECCE_CLOUD_TOKEN Already exists
SMOKE_TEST_GITHUB_REPO Needs to be added
SMOKE_TEST_API_TOKEN Needs to be created (optional — tests 3-4 skip without it)

Which issue(s) this PR fixes:

N/A — new test coverage

Special notes for your reviewer:

The workflow triggers on changes to recce_cloud/** and integration_tests/recce_cloud/**. It will not run until SMOKE_TEST_GITHUB_REPO is added as a repository secret.

Does this PR introduce a user-facing change?:

NONE

even-wei and others added 9 commits February 11, 2026 14:41
E2E test covering GitHub and RECCE_API_TOKEN upload flows against
the staging server. Uses static dbt fixtures (no dbt build needed)
and a cleanup trap to delete PR sessions after each run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: even-wei <evenwei@infuseai.io>
The recce state download/upload/purge tests are no longer needed —
state file workflows are separate from the artifact pipeline tested here.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: even-wei <evenwei@infuseai.io>
Remove SMOKE_TEST_GITHUB_REPO secret in favor of hardcoded repo name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: even-wei <evenwei@infuseai.io>
Tests 5-6 cover the --session-name (dev session) and --session-id
upload flows. Test 6 reuses the session created by test 5. Both
require SMOKE_TEST_API_TOKEN + SMOKE_TEST_ORG + SMOKE_TEST_PROJECT.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: even-wei <evenwei@infuseai.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: even-wei <evenwei@infuseai.io>
uv sync at the repo root doesn't install the recce_cloud workspace
member's entry point. Install from recce_cloud/ like tests-recce-cloud
workflow does.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: even-wei <evenwei@infuseai.io>
Match the pattern from tests-recce-cloud.yaml — let uv manage the
venv and PATH instead of manually activating.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: even-wei <evenwei@infuseai.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: even-wei <evenwei@infuseai.io>
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