0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
Commit graph

39202 commits

Author SHA1 Message Date
Steve Larson
0f37ea5102 Updated logging 2024-09-10 09:58:26 -05:00
Steve Larson
ced8c1af9e Updated queueing system to run jobs from file
- added variable polling rates to try to handle bursts of activity/events
- added generic worker to process jobs from filepath (saved in jobs.metadata.job)
- prevented duplicate queue entries
2024-09-10 09:50:41 -05:00
Steve Larson
0fdd56adbc Added in memory queue to prevent duplicate entries
This is much simpler than trying to write to the db every time that something is queued vs. started vs. other states.
2024-09-10 07:59:34 -05:00
Steve Larson
f9229cb4e2 clean up the bad poller 2024-09-09 18:06:31 -05:00
Steve Larson
9ba8929cc2 Added copy of jobs manager for testing out workerpool 2024-09-09 17:50:57 -05:00
Steve Larson
830491f86f Added queueing using db 2024-09-06 10:46:38 -05:00
Steve Larson
d1a24d80c3 Use domain events and jobs manager for member aggregation 2024-09-05 10:36:48 -05:00
Steve Larson
1704b67d08 Fixed whitespace 2024-09-05 08:00:54 -05:00
Steve Larson
d11bce4742
Update ghost/core/core/server/data/migrations/versions/5.94/2024-09-03-20-09-40-null-analytics-jobs-timings.js
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2024-09-05 07:52:17 -05:00
Steve Larson
84025ac3ae Linter 2024-09-04 16:42:30 -05:00
Steve Larson
a9a12dbcc5 Removed only 2024-09-04 16:35:28 -05:00
Steve Larson
3117c2b580 Fixed unit tests 2024-09-04 16:35:20 -05:00
Steve Larson
8cafd6abc8 Commit snap 2024-09-04 15:53:26 -05:00
Steve Larson
053de69651 Updated snapshots and email tests
These call the aggregateStats query. There was a bug in the second email set, which was set to a count of 6 but has no fixture data for email recipients, so it was false. This should not be a fixed field but probably dynamic... though this part of the code base is a bit fraught as it is, and I'm reluctant to touch anything in this context.
2024-09-04 15:47:21 -05:00
Steve Larson
1a068e5ab8 Updated batch logging and optimized email stats query 2024-09-04 10:24:01 -05:00
Steve Larson
c236057e09 Updated migration to 5.94 and added try catch+logging 2024-09-04 08:11:13 -05:00
Steve Larson
92d2ba62c5 Improved logging for the analytics service
- updated batch data to aggregate to one message with timings
- updated aggregate queries to log times so we don't need to calculate it
- removed trying to run aggregation when we don't have any events, which led to extra logging and is unnecessary

The logging in general is quite verbose and more like debug logs. I'm good with that for the moment while we're working on this, but we can still be a bit more concise.
2024-09-03 15:51:57 -05:00
Steve Larson
2feb34456c Fixed unit tests for service 2024-09-03 15:36:35 -05:00
Steve Larson
d797848ed4 Updated fetchMissing to use db-persisted values - this helps tremendously with handles reboots to ensure we re-fetch every event to capture missing events 2024-09-03 15:27:46 -05:00
Steve Larson
719316df77 Added migration to remove jobs rows
This effectively forces the jobs to fetch the last run timestamps to set in the db, because this was previously implemented for a period and we didn't null these values when reverting that commit.
2024-09-03 15:15:43 -05:00
Steve Larson
5449d70143 Updated max events to better control throughput
If we conservatively (somewhat) figure ~2500 events/min, and that the job is on a 5min cron, we should try to keep the loop cycle to ~5 mins or less in order to repeat the fetch logic, which now prioritizes opens.

Open data is the only data to update any stats, so we want to make sure if people are pressing refresh that we do our best to keep it up to date.

Meanwhile, if we don't find opens, we can move on to filling in the other event data, collecting missed events, and scheduled backfills, in that order.
2024-09-03 15:05:53 -05:00
Steve Larson
99aa2e6dbe Revert "Reverted email analytics jobs commits (#20835)"
This reverts commit ae15e12ffc.
2024-09-03 14:19:48 -05:00
renovate[bot]
b2d7922f30 Update dependency nodemailer to v6.9.15 2024-09-03 16:26:49 +00:00
renovate[bot]
67291056b0
Update Koenig packages (#20911)
Ref: https://linear.app/tryghost/issue/ENG-1435/threads-embeds-contain-broken-images

Fixed broken Thumbnails and Icons
2024-09-03 16:13:13 +00:00
Ghost CI
4ce116d5fb v5.92.0 2024-09-03 15:21:50 +00:00
Kevin Ansfield
1bc34f7227 Added Tips & Donations one-off payments
no issue

Give your audience a simple way to support your work with one-time payments, no membership required.

- cleaned up `tipsAndDonations` labs flag
2024-09-03 16:00:48 +01:00
Kevin Ansfield
3744caa950 Fixed lint warnings from Admin feature-test
no issue

- converted use of promises to async/await
- removed return from async test functions to clear lint warnings
2024-09-03 10:59:08 +01:00
Kevin Ansfield
fd926193ce 🐛 Fixed unsaved changes modal showing when title has leading/trailing whitespace
closes https://linear.app/tryghost/issue/PLG-205

The server trims whitespace from the title when saving but our unsaved changes detection was comparing the raw title input field value meaning there would be a mismatch after publishing if the title field contained leading/trailing whitespace.

- updated title comparison to compare trimmed values
- moved and improved unsaved changes modal tests from publish-flow to unsaved-changes acceptance test file
  - added util for pasting content into the editor to test for content changes
2024-09-03 10:53:53 +01:00
Sodbileg Gansukh
1cee402339 Fixed publish flow related admin tests 2024-09-03 10:46:25 +01:00
Kevin Ansfield
cc72d368de Fixed Admin tests
no issue

- fixed eslint config so tests are correctly linted
- removed `.only` on stats tests preventing other tests from running
- removed unneccessary `return` from async setup functions
2024-09-03 10:46:25 +01:00
Daniel Lockyer
f96313e9c2 Enabled treeshaking for validator in AdminX design system
ref https://linear.app/tryghost/issue/DEV-20/faster-builds

- we can save 75KB by using a tree-shaking import for validator
- import string comes from validator docs
- also adds validator import, which was missing for this package
2024-09-03 10:44:14 +02:00
Daniel Lockyer
7db1cb4f14 Fixed treeshaking for lodash in AdminX apps
refs https://dev.to/pffigueiredo/making-lodash-tree-shakable-3h27
ref https://linear.app/tryghost/issue/DEV-20/faster-builds

- by importing `lodash`, we import a huge 500KB file into all AdminX
  apps
- we only use one function from this, so we can switch to `lodash-es`
  and Vite will treeshake the rest out of the final compiled JS
- this saves 500KB in each AdminX app and improves compile times
2024-09-03 10:18:04 +02:00
renovate[bot]
84b45581b6 Update dependency lint-staged to v15.2.10 2024-09-03 09:30:56 +02:00
Djordje Vlaisavljevic
3696d4305c Added static design for Replies
ref https://linear.app/tryghost/issue/AP-374/add-design-for-replies
2024-09-02 21:38:32 +01:00
Peter Zimon
397342a910
Added technical details to stats (#20898)
[ANAL-1](https://linear.app/tryghost/issue/ANAL-32/add-stats-kpis-charts)

The technical details section in Stats contains only the browser breakdown ATM. This PR adds the rest (devices, operating systems) and fixes a couple of minor UI details on the rest of the charts
2024-09-02 16:05:09 +02:00
Daniel Lockyer
47d1a3c451 Switched build and build:ts scripts
ref https://linear.app/tryghost/issue/DEV-20/faster-builds

- `build` should be the overall script to build the package
- `build:ts` should only build TypeScript
- by having them switched around, `build:ts` would call `yarn build`,
  and `yarn` adds several hundreds of milliseconds of time to each build
2024-09-02 15:20:03 +02:00
Daniël van der Winden
e369ca6489
Updated date notation (#20899)
fixes https://linear.app/tryghost/issue/DES-762/improve-date-notation-when-scheduling-posts

If a post goes out *today*, it will no longer show the full date. Also
formatted the subtitle in the modal to be a bit more legible.
2024-09-02 15:08:42 +02:00
Hannah Wolfe
4c5704bfa6 Added audience handling to stats
closes https://linear.app/tryghost/issue/ANAL-23/filtering-by-logged-out-logged-in-traffic

- Updated all of our tinybird datasources and pipes to handle member status
- Added member_status as an array query param to the API endpoints
- Added a really dodgy power select multiple to the stats page to demonstrate it works (needs styling)
- Added all of the wiring so each chart updates
- This was done pretty fast, and may not be 100% right yet
2024-09-02 12:56:37 +01:00
Kevin Ansfield
73d75413a0
🎨 Convert portal links to relative to avoid homepage flash on click (#20896)
closes https://linear.app/tryghost/issue/PLG-190

- often when adding portal links to your own site pages the URLs are added as absolute on the site's homepage due to copy+paste from displayed URLs in Admin
- when clicking absolute portal URLs the homepage is first loaded before the Portal popup is shown resulting in a slower and flashier experience
- added a transform for all local portal URLs on the page when Portal is initialized so links open the Portal popup immediately on the current page
2024-09-02 11:23:12 +00:00
Peter Zimon
ad9312451d
Stats tab charts (#20895)
[ANAL-1](https://linear.app/tryghost/issue/ANAL-1/v1-chart-list)

Creating first version of charts on Stats tab which includes KPIs, Content, Sources, Locations and technical data.
2024-09-02 13:22:39 +02:00
Kevin Ansfield
9467ffadb5 Removed sqlite skip in recommendation email test
no issue

- test runs OK locally in SQLite
- enabling it to run eliminates a potential tripping point when generating updated snapshots locally
2024-09-02 11:16:02 +01:00
Daniel Lockyer
33dd6b6b49 Removed concurrently from building apps
ref https://linear.app/tryghost/issue/DEV-20/faster-builds

- we added concurrently because, in theory, it should make builds faster
  by utilizing more cores
- however, when combined with Nx, it seems that we are trying to exceed
  the number of cores, which actually makes individual builds slower
- I've removed concurrently from the apps, which should improve the
  build time significantly
2024-09-02 12:06:27 +02:00
Djordje Vlaisavljevic
a3e498106d Added icons to Activity items to make it easier to scan the page
ref https://linear.app/tryghost/issue/AP-283/handle-incoming-likes
2024-09-02 10:43:38 +01:00
Djordje Vlaisavljevic
c260ed5202 Added support for badges to APAvatar
ref https://linear.app/tryghost/issue/AP-283/handle-incoming-likes
2024-09-02 10:43:38 +01:00
Daniël van der Winden
16d2987c0c
Updated URL encoding (#20891)
Fixes
https://linear.app/tryghost/issue/DES-760/make-a-line-break-between-the-post-title-and-url-when-sharing-to

When a post is shared to Twitter from the 'Share' modal (or in the
publishing flow), the URL now sits on the second line.

<img width="653" alt="Screenshot 2024-09-02 at 11 20 53"
src="https://github.com/user-attachments/assets/178066cc-01da-41b6-bf1d-d00943881209">
2024-09-02 09:27:32 +00:00
Ronald Langeveld
b62baa8b0b
Added sentry to support error on Portal (#20890)
ref PLG-204

- Added a sentry capture so we know when and if the support error
component gets triggered.
2024-09-02 16:58:22 +09:00
Daniel Lockyer
0f8fd441c7 Renamed ghost:build to ghost:build:assets
ref https://linear.app/tryghost/issue/DEV-20/faster-builds

- this was previously causing duplicate builds of the TS projects
  because Nx was building all projects with `build` targets, and we were
  also calling `build:ts`
- this cuts 12 compilation jobs from the archive process, which should
  help with container build times
2024-09-02 09:08:47 +02:00
Hannah Wolfe
c1798620bb
Added basic date-handling to stats page (#20887)
ref https://linear.app/tryghost/issue/ANAL-21/filtering-the-dashboard

- Added the very basic date filter back from the dashboard
- Without this, it's very hard to see that the basic concept is working
- This method can be reused for creating any filter
2024-09-01 16:33:31 +01:00
Chris Raible
03c388db91
Updated yarn.lock (#20885)
no issue

- Running `yarn` on `main` was making changes to the `yarn.lock` file
without any code/dependency changes — committing those changes to fix
this.
2024-08-30 11:23:17 -07:00
Ghost CI
bf4e6600a9 v5.91.0 2024-08-30 15:05:40 +00:00