Commit graph

1550 commits

Author SHA1 Message Date
Kailash Nadh
136d9d1fa9 Don't fail on chown in Docker entry script. Closes #2104. 2024-10-28 12:56:49 +05:30
Kailash Nadh
8ef71aa7a4 Fix docker-compose curl command examples. 2024-10-28 00:16:26 +05:30
Kailash Nadh
120d27575b Update release link on static site homepage. 2024-10-28 00:08:59 +05:30
Kailash Nadh
3894571d1a Remove obsolete demo file reference from Docker build commands. 2024-10-27 18:55:21 +05:30
Kailash Nadh
0f2c679e5b Remove deprecated goreleaser flag from GitHub action workflow. 2024-10-27 18:36:02 +05:30
Kailash Nadh
11cb3ce890 Update gorelease Go build version to latest. 2024-10-27 18:31:08 +05:30
Kailash Nadh
79f94d3528 Update gorelease command and remove deprecated flags. 2024-10-27 18:14:32 +05:30
Kailash Nadh
afd5db994a Fix incorrect image tag in docker-compose. 2024-10-27 18:00:30 +05:30
Kailash Nadh
fd04fc1c3a Refresh i18n language files and add (GPT 3.5) auto-translations for new strings. 2024-10-27 17:38:51 +05:30
Abhinand KR
4eefd4215e
Remove redundant campaign manager config validations (#2095) 2024-10-27 17:25:48 +05:30
dependabot[bot]
9bad699a5c
Bump google.golang.org/protobuf from 1.31.0 to 1.33.0 (#2083)
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-27 17:24:56 +05:30
dependabot[bot]
d35dbb0f55
Bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.3 (#2084)
Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.1 to 3.0.3.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Changelog](https://github.com/go-jose/go-jose/blob/v3.0.3/CHANGELOG.md)
- [Commits](https://github.com/go-jose/go-jose/compare/v3.0.1...v3.0.3)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-27 17:24:46 +05:30
Kailash Nadh
b8ae4f6f9e Change v4.0.0 migration script to not auto-generate credentials. 2024-10-27 17:18:28 +05:30
Kailash Nadh
7fcc6f71e2 Simplify and refactor docker-compose.yml and remove install scripts.
- Remove "demo", "production" containers and have just one.
- Remove dependency on config.toml and inline config to env vars.
- Have a single idempotent instal+upgrade+run command that eliminates
  the need for manual upgrade steps.
- Remove `.sh` install scripts.
- Simplify and clean up install and update docs.
2024-10-27 15:36:35 +05:30
Kailash Nadh
24bab75996 Add first time login setup template 2024-10-27 15:14:31 +05:30
Kailash Nadh
178fa94880 Update user login time on password login. 2024-10-26 23:56:12 +05:30
Kailash Nadh
5b3d6e2be0 Add first-time Super Admin setup UI on fresh install.
- Don't setup username+password from config file during fresh install.
- If `LISTMONK_ADMIN_USER` and `LISTMONK_ADMIN_PASSWORD` env vars are
  set during `--install`, use them.
- Otherwise, render new username+password creation UI on `/admin/login`.
- Add Cypress tests.
2024-10-26 19:47:01 +05:30
Kailash Nadh
1e4b3a26f2 Separate get individual user and get all users queries. 2024-10-26 17:03:02 +05:30
Kailash Nadh
87db0d596b Fix Cypress admin form test to support <codeflask> rendered HTML. 2024-10-26 13:27:45 +05:30
Kailash Nadh
25cdb7b18e Pull e-mail from userinfo endpoint if OIDC token endpoint doesn't return it. 2024-10-23 15:09:05 +05:30
Kailash Nadh
a37d414869 Add missing GH token to Swagger docs workflow. 2024-10-23 12:31:01 +05:30
Kailash Nadh
9760d19b4d Fix button focus/active styles on the UI. 2024-10-23 12:21:15 +05:30
Kailash Nadh
69de02ab6d Restyle and simplify subscriber form UI with tabs. 2024-10-23 00:06:53 +05:30
Kailash Nadh
b5382b81a1 Add user UI frontend tests. 2024-10-22 23:11:15 +05:30
Kailash Nadh
b2866b1f12 Apply minor style changes and improvements to modals. 2024-10-22 23:10:16 +05:30
Kailash Nadh
74e77bd6e0 Add names to user form fields for testing. 2024-10-22 22:50:09 +05:30
Kailash Nadh
3fdf6fe31e Add individual list permission checks on admin UI. 2024-10-22 21:37:19 +05:30
Kailash Nadh
887d5823f4 Fix get-users query to return all users when no ID param is given. 2024-10-21 23:20:07 +05:30
Kailash Nadh
1075485ca9 Merge branch 'fix-user-query' 2024-10-21 17:57:28 +05:30
Kailash Nadh
e7109daaf3 Fix missing email validation in OIDC exchange. 2024-10-21 17:54:58 +05:30
Kailash Nadh
7847167145 Fix incorrect id logic in user selection. 2024-10-20 23:50:06 +05:30
Kailash Nadh
13222b5eb9 Fix random timing related Cypress test failures (huh). 2024-10-20 23:50:06 +05:30
Kailash Nadh
29aa977e6a Expand search input width on subscribers UI for smaller screens. 2024-10-20 23:50:06 +05:30
Kailash Nadh
354fb300f7 Replace hardcoded perm literal with const. 2024-10-20 23:50:06 +05:30
Kailash Nadh
6258fd5cee Increase settings UI poll interval to reduce broken requests. 2024-10-20 23:50:06 +05:30
Kailash Nadh
30be235e2a Add microseconds to log lines. 2024-10-20 23:50:06 +05:30
Kailash Nadh
0f785b7173 Fix Cypress tests to work with new auth and other UI changes. 2024-10-20 23:50:06 +05:30
Kailash Nadh
8c07a2a1c4 Fix broken status in subscriber export query. 2024-10-20 23:50:06 +05:30
Kailash Nadh
71f9e861e4 Show OIDC URL warning only when enabled on the UI. 2024-10-20 23:50:06 +05:30
Kailash Nadh
03744e0dde Fix broken settings references on forms page 2024-10-20 23:50:06 +05:30
albanobattistella
d02a9d62b5
Update it.json (#2085) 2024-10-14 22:17:53 +05:30
Kailash Nadh
6fe47b2e61
Merge pull request #2082 from knadh/multiuser
Add multi-user auth, permissions, and user management.
2024-10-13 21:54:36 +05:30
Kailash Nadh
39463d719d Refresh i18n langauge strings. 2024-10-13 18:58:28 +05:30
Kailash Nadh
cc71899e86 Add non-prod ODIC URL warning on admin settings UI. 2024-10-13 18:53:39 +05:30
Kailash Nadh
af06d2e462 Upgrade prismjs. 2024-10-13 18:16:43 +05:30
Kailash Nadh
f226acaa23 Add missing auth permissions file. 2024-10-13 17:03:59 +05:30
Kailash Nadh
cea65c009d Fix and refactor subscriber batch fetching in campaign processing.
This has been a hair-pulling rabbit hole of an issue. #1931 and others.
When the `next-campaign-subscribers` query that fetches $n subscribers
per batch for a campaign returns no results, the manager assumes
that the campaign is done and marks as finished.

Marathon debugging revealed fundamental flaws in qyery's logic that
would incorrectly return 0 rows under certain conditions.
- Based on the "layout" of subscribers for eg: a series of blocklisted
  subscribers between confirmed subscribers.
  A series of unconfirmed subscribers in a batch belonging to a double
  opt-in list.
- Bulk import blocklisting users, but not marking their subscriptions
  as 'unsubscribed'.
- Conditions spread across multiple CTEs resulted in returning an
  arbitrary number of rows and $N per batch as the selected $N rows
  would get filtered out elsewhere, possibly even becoming 0.

After fixing this and testing it on our prod instance that has
15 million subscribers and ~70 million subscriptions in the
`subscriber_lists` table, ended up discovered significant inefficiences
in Postgres query planning. When `subscriber_lists` and campaign list IDs
are joined dynamically (CTE or ANY() or any kind of JOIN that involves)
a query, the Postgres query planner is unable to use the right indexes.

After testing dozens of approaches, discovered that statically passing
the values to join on (hardcoding or passing via parametrized $1 vars),
the query uses the right indexes. The difference is staggering.
For the particular scenario on our large prod DB to pull a batch,
~15 seconds vs. ~50ms, a whopping 300x improvement!

This patch splits `next-campaign-subscribers` into two separate queries,
one which fetches campaign metadata and list_ids, whose values are then
passed statically to the next query to fetch subscribers by batch.

In addition, it fixes and refactors broken filtering and counting logic
in `create-campaign` and `next-campaign` queries.

Closes #1931, #1993, #1986.
2024-10-13 17:03:59 +05:30
Kailash Nadh
ee119b0088 Fix import not 'unsubscribing' list subs for already blacklisted subscribers. Ref #1931. 2024-10-13 17:03:59 +05:30
Kailash Nadh
a26834196e Refactor subscriber APIs list permission filtering. 2024-10-13 17:03:59 +05:30
Kailash Nadh
d9b4bae0a8 Rename migration to v4.0.0 2024-10-13 17:03:59 +05:30