Skip to content

Breaking Db change#53

Closed
dbrowne wants to merge 18 commits intomasterfrom
db_change
Closed

Breaking Db change#53
dbrowne wants to merge 18 commits intomasterfrom
db_change

Conversation

@dbrowne
Copy link
Copy Markdown
Owner

@dbrowne dbrowne commented Feb 7, 2026

No description provided.

   - Create new crypto-loaders crate for non-AlphaVantage crypto data
   - Move CoinGecko, CoinMarketCap, CoinPaprika, CoinCap, SosoValue providers
   - Add CryptoSymbolLoader, CryptoMappingService, and details loader
   - Implement unified CacheHelper with CacheConfig and CacheConfigProvider trait
   - Refactor price loaders to use CacheRepository instead of direct DB connections
   - Add standard cache TTL constants and key prefixes
   - Refactor av-core market types into separate modules
   - Create new crypto-loaders crate for non-AlphaVantage crypto data
   - Move CoinGecko, CoinMarketCap, CoinPaprika, CoinCap, SosoValue providers
   - Add CryptoSymbolLoader, CryptoMappingService, and details loader
   - Implement unified CacheHelper with CacheConfig and CacheConfigProvider trait
   - Refactor price loaders to use CacheRepository instead of direct DB connections
   - Add standard cache TTL constants and key prefixes
   - Refactor av-core market types into separate modules
# Conflicts:
#	crates/av-database/postgres/scripts/backup_postgres.sh
#	crates/av-database/postgres/scripts/populate_for_symbol.sh
#	crates/av-database/postgres/scripts/populate_intraday_from_year.sh
  Removed duplicate/overlapping variants and added structured context:
  - Removed: MissingAPIKey, InvalidAPIKey, CoinGeckoEndpoint, InternalServerError, ServiceUnavailable
  - Changed RateLimitExceeded(String) → RateLimitExceeded { provider, retry_after_secs } - now preserves retry info
  - Changed ApiError(String) → ApiError { provider, message } - now includes source attribution
  - Changed InvalidResponse { api_source, .. } → InvalidResponse { provider, .. } - consistent naming (avoided source which conflicts with thiserror)
  - Added: ServerError { provider, message }, AccessDenied { provider, message }

  2. Error Conversion (av-loaders/src/crypto/mod.rs)

  Improved From<CryptoLoaderError> for LoaderError:
  - Now preserves retry_after_secs from rate limit errors (defaults to 60 if not provided)
  - All variants handled explicitly - removed catch-all _ => arm
  - Context preserved in error messages (provider name included)
  1. CryptoLoaderError (crypto-loaders/src/error.rs)
fixed async trait warning in CacheRepositoryExt
@dbrowne dbrowne closed this Feb 7, 2026
@dbrowne
Copy link
Copy Markdown
Owner Author

dbrowne commented Feb 7, 2026

Performed in error

@dbrowne dbrowne deleted the db_change branch February 7, 2026 06:43
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