core/CHANGELOG.md

329 lines
13 KiB
Markdown
Raw Normal View History

2025-04-14 16:53:14 +00:00
#### [0.4.19] - 2025-04-14
- dropped `Shout.description` and `Draft.description` to be UX-generated
- use redis to init views counters after migrator
2025-04-10 19:51:07 +00:00
#### [0.4.18] - 2025-04-10
2025-04-14 13:02:19 +00:00
- Fixed `Topic.stat.authors` and `Topic.stat.comments`
2025-04-10 19:51:07 +00:00
- Fixed unique constraint violation for empty slug values:
- Modified `update_draft` resolver to handle empty slug values
- Modified `create_draft` resolver to prevent empty slug values
- Added validation to prevent inserting or updating drafts with empty slug
- Fixed database error "duplicate key value violates unique constraint draft_slug_key"
#### [0.4.17] - 2025-03-26
- Fixed `'Reaction' object is not subscriptable` error in hierarchical comments:
- Modified `get_reactions_with_stat()` to convert Reaction objects to dictionaries
- Added default values for limit/offset parameters
- Fixed `load_first_replies()` implementation with proper parameter passing
- Added doctest with example usage
- Limited child comments to 100 per parent for performance
#### [0.4.16] - 2025-03-22
- Added hierarchical comments pagination:
- Created new GraphQL query `load_comments_branch` for efficient loading of hierarchical comments
- Ability to load root comments with their first N replies
- Added pagination for both root and child comments
2025-03-26 05:25:18 +00:00
- Using existing `comments_count` field in `Stat` type to display number of replies
- Added special `first_replies` field to store first replies to a comment
- Optimized SQL queries for efficient loading of comment hierarchies
- Implemented flexible comment sorting system (by time, rating)
2025-03-22 08:47:19 +00:00
#### [0.4.15] - 2025-03-22
- Upgraded caching system described `docs/caching.md`
- Module `cache/memorycache.py` removed
- Enhanced caching system with backward compatibility:
- Unified cache key generation with support for existing naming patterns
- Improved Redis operation function with better error handling
- Updated precache module to use consistent Redis interface
- Integrated revalidator with the invalidation system for better performance
- Added comprehensive documentation for the caching system
- Enhanced cached_query to support template-based cache keys
- Standardized error handling across all cache operations
- Optimized cache invalidation system:
- Added targeted invalidation for individual entities (authors, topics)
- Improved revalidation manager with individual object processing
- Implemented batched processing for high-volume invalidations
- Reduced Redis operations by using precise key invalidation instead of prefix-based wipes
- Added special handling for slug changes in topics
- Unified caching system for all models:
- Implemented abstract functions `cache_data`, `get_cached_data` and `invalidate_cache_by_prefix`
- Added `cached_query` function for unified approach to query caching
- Updated resolvers `author.py` and `topic.py` to use the new caching API
- Improved logging for cache operations to simplify debugging
- Optimized Redis memory usage through key format unification
- Improved caching and sorting in Topic and Author modules:
- Added support for dictionary sorting parameters in `by` for both modules
- Optimized cache key generation for stable behavior with various parameters
- Enhanced sorting logic with direction support and arbitrary fields
- Added `by` parameter support in the API for getting topics by community
- Performance optimizations for author-related queries:
- Added SQLAlchemy-managed indexes to `Author`, `AuthorFollower`, `AuthorRating` and `AuthorBookmark` models
- Implemented persistent Redis caching for author queries without TTL (invalidated only on changes)
- Optimized author retrieval with separate endpoints:
- `get_authors_all` - returns all non-deleted authors without statistics
2025-03-22 15:44:31 +00:00
- `load_authors_by` - optimized to use caching and efficient sorting and pagination
2025-03-22 08:47:19 +00:00
- Improved SQL queries with optimized JOIN conditions and efficient filtering
- Added pre-aggregation of statistics (shouts count, followers count) in single efficient queries
- Implemented robust cache invalidation on author updates
- Created necessary indexes for author lookups by user ID, slug, and timestamps
#### [0.4.14] - 2025-03-21
- Significant performance improvements for topic queries:
- Added database indexes to optimize JOIN operations
- Implemented persistent Redis caching for topic queries (no TTL, invalidated only on changes)
- Optimized topic retrieval with separate endpoints for different use cases:
- `get_topics_all` - returns all topics without statistics for lightweight listing
- `get_topics_by_community` - adds pagination and optimized filtering by community
- Added SQLAlchemy-managed indexes directly in ORM models for automatic schema maintenance
- Created `sync_indexes()` function for automatic index synchronization during app startup
- Reduced database load by pre-aggregating statistics in optimized SQL queries
- Added robust cache invalidation on topic create/update/delete operations
- Improved query optimization with proper JOIN conditions and specific partial indexes
2025-03-20 09:52:44 +00:00
#### [0.4.13] - 2025-03-20
- Fixed Topic objects serialization error in cache/memorycache.py
- Improved CustomJSONEncoder to support SQLAlchemy models with dict() method
- Enhanced error handling in cache_on_arguments decorator
2025-03-21 09:34:10 +00:00
- Modified `load_reactions_by` to include deleted reactions when `include_deleted=true` for proper comment tree building
- Fixed featured/unfeatured logic in reaction processing:
- Dislike reactions now properly take precedence over likes
- Featured status now requires more than 4 likes from users with featured articles
- Removed unnecessary filters for deleted reactions since rating reactions are physically deleted
- Author's featured status now based on having non-deleted articles with featured_at
2025-03-20 09:52:44 +00:00
2025-03-20 08:55:21 +00:00
#### [0.4.12] - 2025-03-19
2025-03-20 08:01:39 +00:00
- `delete_reaction` detects comments and uses `deleted_at` update
2025-03-20 08:55:21 +00:00
- `check_to_unfeature` etc. update
- dogpile dep in `services/memorycache.py` optimized
2025-03-20 08:01:39 +00:00
2025-02-12 18:59:05 +00:00
#### [0.4.11] - 2025-02-12
- `create_draft` resolver requires draft_id fixed
2025-02-27 13:16:41 +00:00
- `create_draft` resolver defaults body and title fields to empty string
2025-02-10 16:10:13 +00:00
2025-02-09 14:18:01 +00:00
#### [0.4.9] - 2025-02-09
- `Shout.draft` field added
- `Draft` entity added
- `create_draft`, `update_draft`, `delete_draft` mutations and resolvers added
2025-02-09 19:26:50 +00:00
- `create_shout`, `update_shout`, `delete_shout` mutations removed from GraphQL API
- `load_drafts` resolver implemented
- `publish_` and `unpublish_` mutations and resolvers added
- `create_`, `update_`, `delete_` mutations and resolvers added for `Draft` entity
2025-02-10 08:30:58 +00:00
- tests with pytest for original auth, shouts, drafts
2025-02-10 15:04:08 +00:00
- `Dockerfile` and `pyproject.toml` removed for the simplicity: `Procfile` and `requirements.txt`
2025-02-09 14:18:01 +00:00
2025-02-04 12:27:59 +00:00
#### [0.4.8] - 2025-02-03
2025-02-03 20:16:50 +00:00
- `Reaction.deleted_at` filter on `update_reaction` resolver added
- `triggers` module updated with `after_shout_handler`, `after_reaction_handler` for cache revalidation
2025-02-03 20:22:45 +00:00
- `after_shout_handler`, `after_reaction_handler` now also handle `deleted_at` field
2025-02-03 23:53:01 +00:00
- `get_cached_topic_followers` fixed
- `get_my_rates_comments` fixed
2025-02-03 20:16:50 +00:00
2024-11-20 20:59:11 +00:00
#### [0.4.7]
- `get_my_rates_shouts` resolver added with:
- `shout_id` and `my_rate` fields in response
- filters by `Reaction.deleted_at.is_(None)`
- filters by `Reaction.kind.in_([ReactionKind.LIKE.value, ReactionKind.DISLIKE.value])`
- filters by `Reaction.reply_to.is_(None)`
- uses `local_session()` context manager
- returns empty list on errors
- SQLAlchemy syntax updated:
- `select()` statement fixed for newer versions
- `Reaction` model direct selection instead of labeled columns
- proper row access with `row[0].shout` and `row[0].kind`
- GraphQL resolver fixes:
- added root parameter `_` to match schema
- proper async/await handling with `@login_required`
- error logging added via `logger.error()`
2024-11-01 07:04:32 +00:00
#### [0.4.6]
2024-11-12 14:56:20 +00:00
- login_accepted decorator added
2024-11-01 07:04:32 +00:00
- `docs` added
2024-11-01 06:50:19 +00:00
- optimized and unified `load_shouts_*` resolvers with `LoadShoutsOptions`
- `load_shouts_bookmarked` resolver fixed
2024-11-01 08:09:16 +00:00
- resolvers updates:
- new resolvers group `feed`
- `load_shouts_authored_by` resolver added
- `load_shouts_with_topic` resolver added
- `load_shouts_followed` removed
- `load_shouts_random_topic` removed
- `get_topics_random` removed
2024-11-01 06:50:19 +00:00
- model updates:
- `ShoutsOrderBy` enum added
2024-11-01 07:04:32 +00:00
- `Shout.main_topic` from `ShoutTopic.main` as `Topic` type output
2024-11-01 06:50:19 +00:00
- `Shout.created_by` as `Author` type output
2024-11-01 07:04:32 +00:00
#### [0.4.5]
2024-11-01 06:50:19 +00:00
- `bookmark_shout` mutation resolver added
2024-11-01 07:04:32 +00:00
- `load_shouts_bookmarked` resolver added
2024-11-01 06:50:19 +00:00
- `get_communities_by_author` resolver added
2024-11-01 07:04:32 +00:00
- `get_communities_all` resolver fixed
- `Community` stats in orm
- `Community` CUDL resolvers added
- `Reaction` filter by `Reaction.kind`s
2024-11-01 06:50:19 +00:00
- `ReactionSort` enum added
- `CommunityFollowerRole` enum added
- `InviteStatus` enum added
- `Topic.parents` ids added
- `get_shout` resolver accepts slug or shout_id
2024-10-21 07:52:23 +00:00
2024-11-01 07:04:32 +00:00
#### [0.4.4]
- `followers_stat` removed for shout
2024-10-14 06:23:11 +00:00
- sqlite3 support added
2025-03-26 05:25:18 +00:00
- `rating_stat` and `comments_count` fixes
2024-10-14 06:23:11 +00:00
2024-11-01 07:04:32 +00:00
#### [0.4.3]
2024-08-07 08:35:59 +00:00
- cache reimplemented
2024-08-07 15:03:30 +00:00
- load shouts queries unified
2024-11-01 07:04:32 +00:00
- `followers_stat` removed from shout
2024-08-07 08:35:59 +00:00
2024-11-01 07:04:32 +00:00
#### [0.4.2]
2024-07-22 08:32:47 +00:00
- reactions load resolvers separated for ratings (no stats) and comments
- reactions stats improved
2024-11-01 07:04:32 +00:00
- `load_comment_ratings` separate resolver
2024-07-22 08:32:47 +00:00
2024-11-01 07:04:32 +00:00
#### [0.4.1]
2024-06-05 14:45:55 +00:00
- follow/unfollow logic updated and unified with cache
2024-11-01 07:04:32 +00:00
#### [0.4.0]
2024-05-30 18:13:50 +00:00
- chore: version migrator synced
- feat: precache_data on start
- fix: store id list for following cache data
- fix: shouts stat filter out deleted
2024-11-01 07:04:32 +00:00
#### [0.3.5]
2024-05-20 22:40:57 +00:00
- cache isolated to services
- topics followers and authors cached
- redis stores lists of ids
2024-11-01 07:04:32 +00:00
#### [0.3.4]
- `load_authors_by` from cache
2024-04-30 09:35:51 +00:00
2024-11-01 07:04:32 +00:00
#### [0.3.3]
2024-04-09 16:50:27 +00:00
- feat: sentry integration enabled with glitchtip
2024-04-08 07:38:58 +00:00
- fix: reindex on update shout
- packages upgrade, isort
2024-04-23 11:31:34 +00:00
- separated stats queries for author and topic
2024-04-25 09:08:20 +00:00
- fix: feed featured filter
2024-04-26 22:41:47 +00:00
- fts search removed
2024-04-08 07:38:58 +00:00
2024-11-01 07:04:32 +00:00
#### [0.3.2]
2024-02-21 07:27:16 +00:00
- redis cache for what author follows
2024-02-29 07:31:49 +00:00
- redis cache for followers
2024-02-21 08:52:57 +00:00
- graphql add query: get topic followers
2024-02-21 07:27:16 +00:00
2024-11-01 07:04:32 +00:00
#### [0.3.1]
2024-02-16 16:46:57 +00:00
- enabling sentry
- long query log report added
- editor fixes
2024-11-01 07:04:32 +00:00
- authors links cannot be updated by `update_shout` anymore
2024-02-16 16:46:57 +00:00
2024-11-01 07:04:32 +00:00
#### [0.3.0]
- `Shout.featured_at` timestamp of the frontpage featuring event
2024-02-02 12:03:44 +00:00
- added proposal accepting logics
- schema modulized
2024-02-02 16:36:30 +00:00
- Shout.visibility removed
2024-02-02 12:03:44 +00:00
2024-11-01 07:04:32 +00:00
#### [0.2.22]
2024-01-25 19:41:27 +00:00
- added precommit hook
- fmt
- granian asgi
2024-11-01 07:04:32 +00:00
#### [0.2.21]
2024-01-23 13:04:38 +00:00
- fix: rating logix
2024-11-01 07:04:32 +00:00
- fix: `load_top_random_shouts`
- resolvers: `add_stat_*` refactored
2024-01-23 13:04:38 +00:00
- services: use google analytics
- services: minor fixes search
2024-11-01 07:04:32 +00:00
#### [0.2.20]
2024-01-23 01:03:15 +00:00
- services: ackee removed
- services: following manager fixed
2024-01-23 13:04:38 +00:00
- services: import views.json
2024-01-23 01:03:15 +00:00
2024-11-01 07:04:32 +00:00
#### [0.2.19]
- fix: adding `author` role
- fix: stripping `user_id` in auth connector
2024-01-10 13:29:49 +00:00
2024-11-01 07:04:32 +00:00
#### [0.2.18]
- schema: added `Shout.seo` string field
- resolvers: added `/new-author` webhook resolver
2023-12-17 05:28:34 +00:00
- resolvers: added reader.load_shouts_top_random
- resolvers: added reader.load_shouts_unrated
2024-11-01 07:04:32 +00:00
- resolvers: community follower id property name is `.author`
- resolvers: `get_authors_all` and `load_authors_by`
2023-12-17 05:08:35 +00:00
- services: auth connector upgraded
2024-11-01 07:04:32 +00:00
#### [0.2.17]
- schema: enum types workaround, `ReactionKind`, `InviteStatus`, `ShoutVisibility`
- schema: `Shout.created_by`, `Shout.updated_by`
- schema: `Shout.authors` can be empty
- resolvers: optimized `reacted_shouts_updates` query
2023-12-17 05:08:35 +00:00
2024-11-01 07:04:32 +00:00
#### [0.2.16]
2023-11-28 10:46:06 +00:00
- resolvers: collab inviting logics
2023-11-28 07:53:48 +00:00
- resolvers: queries and mutations revision and renaming
2024-11-01 07:04:32 +00:00
- resolvers: `delete_topic(slug)` implemented
- resolvers: added `get_shout_followers`
- resolvers: `load_shouts_by` filters implemented
2023-11-29 07:23:41 +00:00
- orm: invite entity
2024-11-01 07:04:32 +00:00
- schema: `Reaction.range` -> `Reaction.quote`
- filters: `time_ago` -> `after`
2023-11-29 07:23:41 +00:00
- httpx -> aiohttp
2023-11-27 16:03:47 +00:00
2024-11-01 07:04:32 +00:00
#### [0.2.15]
- schema: `Shout.created_by` removed
- schema: `Shout.mainTopic` removed
2023-11-23 23:00:28 +00:00
- services: cached elasticsearch connector
2024-11-01 07:04:32 +00:00
- services: auth is using `user_id` from authorizer
- resolvers: `notify_*` usage fixes
- resolvers: `getAuthor` now accepts slug, `user_id` or `author_id`
2023-11-23 23:00:28 +00:00
- resolvers: login_required usage fixes
2024-11-01 07:04:32 +00:00
#### [0.2.14]
2023-11-22 16:38:39 +00:00
- schema: some fixes from migrator
2024-11-01 07:04:32 +00:00
- schema: `.days` -> `.time_ago`
- schema: `excludeLayout` + `layout` in filters -> `layouts`
2023-11-22 16:38:39 +00:00
- services: db access simpler, no contextmanager
- services: removed Base.create() method
- services: rediscache updated
- resolvers: get_reacted_shouts_updates as followedReactions query
2024-11-01 07:04:32 +00:00
#### [0.2.13]
2023-11-03 10:10:22 +00:00
- services: db context manager
2024-11-01 07:04:32 +00:00
- services: `ViewedStorage` fixes
2023-11-03 10:10:22 +00:00
- services: views are not stored in core db anymore
- schema: snake case in model fields names
- schema: no DateTime scalar
2024-11-01 07:04:32 +00:00
- resolvers: `get_my_feed` comments filter reactions body.is_not('')
- resolvers: `get_my_feed` query fix
- resolvers: `LoadReactionsBy.days` -> `LoadReactionsBy.time_ago`
- resolvers: `LoadShoutsBy.days` -> `LoadShoutsBy.time_ago`
2023-11-03 10:10:22 +00:00
2024-11-01 07:04:32 +00:00
#### [0.2.12]
- `Author.userpic` -> `Author.pic`
- `CommunityFollower.role` is string now
- `Author.user` is string now
2023-10-25 16:55:30 +00:00
2024-11-01 07:04:32 +00:00
#### [0.2.11]
2023-10-23 14:47:11 +00:00
- redis interface updated
2024-11-01 07:04:32 +00:00
- `viewed` interface updated
- `presence` interface updated
2023-10-23 14:47:11 +00:00
- notify on create, update, delete for reaction and shout
- notify on follow / unfollow author
- use pyproject
- devmode fixed
2024-11-01 07:04:32 +00:00
#### [0.2.10]
2023-10-23 14:47:11 +00:00
- community resolvers connected
2024-11-01 07:04:32 +00:00
#### [0.2.9]
2023-10-23 14:47:11 +00:00
- starlette is back, aiohttp removed
- aioredis replaced with aredis
2024-11-01 07:04:32 +00:00
#### [0.2.8]
2023-10-23 14:47:11 +00:00
- refactored
2024-11-01 07:04:32 +00:00
#### [0.2.7]
2025-03-22 08:47:19 +00:00
- `loadFollowedReactions` now with `