[pull] main from TryGhost:main#1083
Merged
Merged
Conversation
ref https://linear.app/ghost/issue/HKG-1708 The redis cache adapter only has unit tests today, and they stub the underlying cache layer completely - so they verify the implementation but not the behavioural contract against a real Redis. We're planning some changes to the redis cache and want full coverage of the current behaviour locked in before we touch the implementation, so any behavioural regression is caught immediately. Wires redis as a CI service alongside mysql and adds a default adapters.Redis block to the testing config so the suite reads the host through the standard config layer.
no-issue The cache adapter interface (@tryghost/adapter-base-cache) still requires a keys() method, but enumerating every key in redis is an O(n) SCAN that no production code path should rely on - the previous consumer was settings-cache.getAll(), which calls keys() synchronously and treats the result as an array. The redis impl was async, so any deployment that wired Redis to the settings cache would already crash on keys.forEach is not a function. The path is unreachable in practice but worth tightening up. The stub is sync (not async) so the throw surfaces directly to the same sync caller pattern that exposed the original bug, instead of becoming an unhandled rejection. A future bump to @tryghost/adapter-base-cache that drops keys from requiredFns will let us remove the stub entirely.
…gift subs ref https://linear.app/ghost/issue/BER-3482 - previously, the synthetic subscription constructed for non-Stripe subscriptions (comped, gift) always used the "Complimentary" nickname - now, it returns the nickname "Gift subscription" for gifts so Admin can render them distinctly - also uses the product's currency instead of hardcoding USD on the synthetic plan/price payload
ref https://linear.app/ghost/issue/BER-3482 - surfaces gift subscriptions on the member detail view using the new "Gift subscription" nickname returned by the API - renders "Gift subscription - Expires {date}" for gift subscriptions - hides the action menu for gift subs since they can't be edited or cancelled from Admin
no ref Updated the gift purchase confirmation page to show gift short URL (`/gift/<token>`) instead of the longer redemption URL (`/#/portal/gift/redeem/<token>`)
…7460) closes https://linear.app/ghost/issue/BER-3476 - when a new member redeemed a gift subscription, they were briefly created with status 'free' and only flipped to 'gift' by the subsequent redeem call, which triggered the "new free signup" staff notification - now fixed - they would also receive the free member welcome email - now fixed - wrapped member creation and gift redemption in a transaction to ensure atomicity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )