* perf: drop many unused indexes
- reference owner - only used for activity page which is unusable
*anyway*
- same for timeline and link doctypes
perf: drop unused index from Commment
Can't find a single query that uses this index
perf: drop pointless "Is home folder" index
just why? It's checkbox index with 1 entry which has unique name already
Most pointless index I've seen no far.
perf: Drop "attached to doctype" separate index
There is already a composite index for this.
perf: drop indexes from web page view log
BOTH are totally unused in any of the queries related to this doctype.
Only "website analytics" report uses this which doesn't even show this
data lmao.
perf: drop unused index from EPS log
We never filter by doctype or type. pointless indexing.
perf: fix up notification log indexes
- drop unused index
- add "for user" index
(cherry picked from commit 3a5a45d8af)
* perf: drop all old `parent` indexes
- re-add parent index on custom_docperm
(cherry picked from commit 7453e8e3a1)
Co-authored-by: Ankush Menat <ankush@frappe.io>
* allow multiple kanban board creation for the same doctype
* simplify show_kanban_dialog
* directly jump to a kanban if available/from last_opened_kanban property - no need to show a dialog for selection
(cherry picked from commit 255bc211af)
* feat: db.begin(read_only=True)
You can now start read only transaction by passing read only flag. Read
only transactions prevent any query that is of "WRITE" type like
insert/delete/update.
(cherry picked from commit 5e86e1f192)
* feat: allow reads during maintenance_mode
To reduce downtime reading from main db server during maintenance_mode
can be allowed. This lets users browse desk, static sites or any other
pages while ensuring that no writes happen to DB.
refactor: use read replica if available
(cherry picked from commit 5beccd8802)
* fix: always explicitly start a new transaction
Active read only transaction can be aborted by doing a commit and then
issuing queries. This prevents such edge cases.
(cherry picked from commit 4389447148)
* fix: dont renew session during read only mode
(cherry picked from commit 5922c0ea35)
* feat: wrap read only mode SQL errors
(cherry picked from commit f96505fae0)
* fix: defer logging during read only mode
Deferred:
- Error log
- view log
- web page view
Disable:
- "_seen" tracking used on list view to highlight unseen docs.
- "seen" on error log.
- dashboard chart last ts caching
(cherry picked from commit 55617b9e86)
* fix: ensure deferred insert are flushed during update
(cherry picked from commit 98b57f6a1a)
* fix: remove ad-hoc maintenance mode implementation
(cherry picked from commit e1253e8299)
* feat(UX): Disable write actions in read-only Desk
I won't be covering each and every aspect of desk that shouldn't work in
read only mode. This just handles major interactions and assumes that
user will get a hint about why other things aren't working.
Changes:
- Add read only badge on navbar.
- Disable forms
- Disable new doc creation
(cherry picked from commit 1ec03dacff)
* test: add api tests for read only mode
(cherry picked from commit 7f316fa427)
* feat(ux): `no-indicator-dot` for indicator pills
Adding this class will disable indicator's tiny dot added before text.
(cherry picked from commit f6c548c7b9)
* refactor: remove dead flag db.read_only
This was added in last DB refactor but it does nothing, it was probably
supposed to do something with the connection pool but to best of my
knowledge "read only" is not a property of a connection.
It can be achieved with users who only have read access, that however
isn't implemented anywhere.
Removing this for now.
(cherry picked from commit ea7fbb2c10)
# Conflicts:
# frappe/database/__init__.py
* fix(UX): show read only mode warning on web pages
(cherry picked from commit 06d888126b)
* perf: duplicate database initialization (#18049)
* fix: don't attempt to delete session during read only session
* fix: error handling without user set
* chore: conflicts
Co-authored-by: Ankush Menat <ankush@frappe.io>
Since we destroy the connection after app installation,
mariadb implicitly rollsback the transaction hence committing upon successfull
app installation to prevent data sync loss
(cherry picked from commit 3539dacdf0)
* fix: RQ reduce failed job TTL from 1 year to 7 days
(cherry picked from commit 5152f13b10)
* feat: RQ worker virtual doctype
Enuff manual JS and HTML crap, lets reuse list and form views!
(cherry picked from commit 330bd08210)
* feat: RQ job doctype
(cherry picked from commit fc0ff7bd2e)
* feat: delete background jobs from form views
(cherry picked from commit dca6592b7e)
* fix: disable count and stats
(cherry picked from commit c021b07255)
* refactor: remove dead code related to scheduler activation
(cherry picked from commit 7a3c3910fe)
* fix: serialize function objects to their repr
(cherry picked from commit 6d264b149a)
* feat: show scheduler status on RQ job page
(cherry picked from commit 46df97c3f2)
* feat: auto refresh RQ job page
(cherry picked from commit 4ae85b20db)
* test: add tests for bg job monitoring code
(cherry picked from commit 2267d40420)
* feat: kill a running background job -f
Also refactor permission checks
(cherry picked from commit 11936a76df)
Co-authored-by: Ankush Menat <ankush@frappe.io>
* test(UI): use non-admin user for tests
(cherry picked from commit f07bc3b369)
# Conflicts:
# .github/workflows/ui-tests.yml
* test: fix tests using admin account
(cherry picked from commit a6b341bd59)
# Conflicts:
# cypress/integration/dashboard_links.js
* test: add test role to user
(cherry picked from commit 0896873c8a)
* chore: conflicts
* test: fix broken test
Not sure why there's test on doctype "created by". Makes no sense.
Co-authored-by: Ankush Menat <ankush@frappe.io>
* refactor: improved CORS support and caching
(cherry picked from commit 23e8924a05)
* test: use `OPTIONS` method for CORS tests
(cherry picked from commit 5cb440c27f)
* fix: only set allowed headers if required
(cherry picked from commit 51a39bd693)
* fix: set `Vary` header to tell browser that response differs based on origin
(cherry picked from commit 48196915f6)
* test: ensure that `Vary` header is specified
(cherry picked from commit 5db5396b49)
Co-authored-by: Sagar Vora <sagar@resilient.tech>
* Added checkbox to disable pass login in settings
* Added user_pass disable option in Login page context
* Hide user-pass fields when option disabled
* Added check for social login key and LDAP
* feat: Disable API based usr-pwd login
* style: format with black
* refactor: simpify auth validation
No need for else clause
* refactor: fixup sys setting json and move field
* refactor: sys settings validation
* refactor: simpler imports
* chore: undo unintional changes
* test: add test for disabled user pass
Co-authored-by: Ankush Menat <ankush@frappe.io>
chore: run cypress migrator
fix: specPattern should be an array
test: correct intercept URL
This is breaking change in cypress 7.0
test: make list view test rerunnable
test: redo undo tests and add compare doc
test: scroll to action button
chore: drop flaky tests
fix: remove scroll behaviour
fix: clear filters before running count test
test: input delay causes flake
(cherry picked from commit e397b27d29)
* feat: review link for Custom, build and NavBar
* feat: review link for Custom, build and NavBar
* feat: review link for Custom, build and NavBar
* feat: review link for Custom, build and NavBar
* feat: review link for Custom, build and NavBar
* feat: review link for Custom, build and NavBar
* chore: linter json
* fix: replace Block Module By Module Profile
* chore: cypress test
* chore: reset package.json to develop
* refactor: workspace link, system logs section
- removed workspace listview link, visiting list view isn't required for
practically all the tasks
- Frappe Logs -> System Logs
[skip ci]
(cherry picked from commit df9e8c62dd)
Co-authored-by: HENRY Florian <florian.henry@open-concept.pro>