Skip to content

feat: wire noop as a first-class southbound type in CreateDataStore#456

Merged
steiler merged 1 commit into
mainfrom
work/noop-target-connection
Jun 23, 2026
Merged

feat: wire noop as a first-class southbound type in CreateDataStore#456
steiler merged 1 commit into
mainfrom
work/noop-target-connection

Conversation

@steiler

@steiler steiler commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Wire noop in CreateDataStore — adds case "noop": to the SBI-type switch so noop datastore-creation requests are no longer rejected with "unknown targetconnection protocol type: noop"; hardens the default branch to return a proper gRPC InvalidArgument status; fixes the long-standing "unknowm" typo.
  • Remove silent empty-type → noop fallback — an omitted or empty SBI type now returns InvalidArgument immediately instead of silently constructing a noop target, making misconfiguration fail fast.
  • noop.AddSyncs becomes a silent no-op — callers can pass a full connection profile (address, port, TLS, credentials, sync config) without stripping fields; sync entries are accepted and discarded with a single debug-level log, consistent with how all other noop connection-profile fields are treated.

All target-type differences stay inside their own packages — no if type == noop checks appear in generic infrastructure code, in line with the no-tight-coupling workspace rule.

@steiler steiler requested a review from a team as a code owner June 22, 2026 15:01
The noop target was already implemented but unreachable via the gRPC
CreateDataStore path — every request with type: noop was rejected with
"unknown targetconnection protocol type: noop" before a target was
ever constructed.

This change makes noop fully usable for CI/test pipelines:

- pkg/server: add case "noop" to the SBI-type switch so noop
  datastore-creation requests are accepted; harden the default branch
  to return a proper gRPC InvalidArgument status; fix long-standing
  typo ("unknowm" → "unknown").
- pkg/datastore/target: remove the silent empty-type → noop fallback
  so an omitted/empty SBI type now returns an InvalidArgument error
  instead of silently becoming a noop target.
- pkg/datastore/target/noop: make AddSyncs a silent no-op (debug log
  only) so callers can pass a full connection profile — including sync
  config — without having to strip fields before the request.

All differences between target types are handled inside their own
packages; no if-type-==noop checks appear in generic infrastructure
code, consistent with the no-tight-coupling workspace rule.

New tests cover: noop acceptance and unknown-type rejection at the
server level, empty-type error and noop success in the target factory,
and AddSyncs / Get / Set / Status / Close behaviour in the noop package.

Co-authored-by: Cursor <cursoragent@cursor.com>
@steiler steiler force-pushed the work/noop-target-connection branch from 7c4f74e to a8680fa Compare June 22, 2026 15:40
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexandernorth alexandernorth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@steiler steiler merged commit 198c8fb into main Jun 23, 2026
8 checks passed
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.

2 participants