fix(pool): use stable NNTP provider IDs - #840
Conversation
|
Before landing this, I think we can avoid most of the complexity by fixing it at the source. nntppool derives the provider key as That lets us drop It also fixes the leak we're leaving in place today: The one real cost is quota state: Two things worth flagging regardless of which way we go:
If we do keep the boundary, the |
|
Follow-up to the source-level design: companion nntppool PR #87 adds the optional stable Provider.Name field with legacy fallback. AltMount will set Name to the validated provider ID and use that ID for pool metrics/errors; the canonical dependency must merge/release before this PR is merge-ready. Quota state migration and API contract updates are included here. |
d9ebc40 to
7fea717
Compare
|
Update: tip 7fea717 passes the local full suite with the review-only companion module, focused race/vet, and API/docs checks. Canonical CI |
7fea717 to
36e5503
Compare
|
Follow-up at 36e5503: migration failures now log only a fixed repository classification; a capture regression verifies raw repository text cannot reach logs. Provider IDs are documented and validated as stable public non-secret identifiers: unique, exact-trim, and graphic-only (including bidi/line-separator protection). Focused API/config/pool/database tests, race tests, and vet pass locally against the review-only nntppool #87 module; the replace is not committed. |
|
I already published the 4.17.0 can you change it? |
Summary
nntppool PR #87 adds an optional stable
Provider.Namewith the existing host/account fallback for callers that do not provide one. This change validates unique non-empty provider IDs, setsName: p.IDat the AltMount boundary, and uses the ID for pool lookup, metrics, speed tests, and propagated errors. Authentication usernames therefore do not enter external provider names while endpoint host context remains available where it is operationally useful.Provider status no longer includes an authentication username. Frontend types and checked-in Swagger/OpenAPI artifacts are synchronized. Existing quota keys are migrated atomically from the legacy host/account form to stable IDs; ambiguous legacy keys are retained rather than credited to multiple IDs.
The companion nntppool change must merge and release before this PR is merge-ready. No contributor-fork replace is part of this branch.
Tests
go test -race ./...andgo vet ./...pass.go vet ./...passes.go test ./...reaches the complete suite; only the existing environment-sensitiveinternal/metadatadirectory-mtime andinternal/updaterwritability tests fail.tsc) are not installed.