Skip to content

feat: add CPA-Manager config migration#82

Merged
seakee merged 3 commits into
mainfrom
feature/cpam-config-migration
May 13, 2026
Merged

feat: add CPA-Manager config migration#82
seakee merged 3 commits into
mainfrom
feature/cpam-config-migration

Conversation

@seakee
Copy link
Copy Markdown
Owner

@seakee seakee commented May 13, 2026

Summary

Add persisted CPA-Manager runtime configuration across Usage Service and the web panel, including request monitoring setup, collector controls, and migration docs.

Changes

  • Add SQLite-backed manager config APIs for Usage Service with legacy setup fallback, env precedence, collector restart, usage publishing enablement, and retention validation.
  • Add configuration-page controls and a hosted setup wizard for request monitoring, with availability detection and localized Usage Service errors.
  • Move external Usage Service setup out of System Info into CPA-Manager Configuration.
  • Update README and README_CN with setup, migration, and retention guidance.

Testing

  • go test ./...
  • npm run type-check

Related

Closes #78
Closes #79
Closes #80
Closes #81

seakee added 3 commits May 13, 2026 18:31
Add a persisted CPA-Manager configuration model with SQLite storage and a management API for reading and saving runtime settings.

Use the saved configuration to control collector startup, request monitoring enablement, poll interval, batch size, transport settings, and legacy setup fallback.

Validate collector polling against CPA queue retention and enable CPA usage publishing only when request monitoring is active, reducing data loss risk during setup.

Refs #78, #79, #80.
Add CPA-Manager configuration controls for Usage Service runtime settings, request monitoring enablement, and collector tuning from the configuration page.

Move external Usage Service setup out of System Info, add the hosted setup wizard, and expose monitoring availability so unavailable request monitoring has a clear path back to configuration.

Localize the new setup, monitoring, and Usage Service error states across supported languages while keeping legacy Usage Service bootstrap data compatible.

Refs #78, #79, #80.
Update the English and Chinese README files to describe the CPA versus CPA-Manager configuration boundary and the new persisted manager configuration flow.

Document setup behavior, queue retention constraints, request monitoring disable semantics, migration steps, and the updated Usage Service endpoints.

The documentation reduces upgrade ambiguity for users moving from environment variables, config files, or legacy setup storage to SQLite-backed CPAM settings.

Refs #81.
@seakee seakee merged commit faa591f into main May 13, 2026
3 checks passed
@seakee seakee deleted the feature/cpam-config-migration branch May 14, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant