Commit graph

36 commits

Author SHA1 Message Date
Shadrak Gurupnor
d9b2d23ec3
feat: track skipped patch with traceback (#20931)
* feat: track skipped patch with traceback

* fix: dump all the patches in patch log

* fix: check non-skipped patches

* fix: print traceback if failed && reload patch_log before migrate

* chore: dont force patch log reload

* chore: remove unnecessary checks

---------

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-05-10 18:44:40 +05:30
Gavin D'souza
d357af1533 refactor: Add a maxsplit limit to string splits 2023-01-24 19:22:51 +05:30
Ankush Menat
bbcc365a24
fix: use monotonic clock for timing code (#19138)
* fix: use monotonic time for timing code

`time.time()` depends on system clock which can drift away and get corrected
over time. If you're unlucky it will get corrected in your timing code
and give absurd results.

* test: dont check for status

can refresh and give wrong output

[skip ci]
2022-12-06 15:42:37 +05:30
Ankush Menat
1d186db6a6
fix: disable autocommit before each patch (#18307) 2022-10-06 16:08:39 +05:30
Ankush Menat
e1253e8299 fix: remove ad-hoc maintenance mode implementation 2022-09-09 17:34:46 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Gavin D'souza
96d298abf4 feat(minor): Add patch docstring if available in patch runner 2022-02-28 17:41:31 +05:30
Ankush Menat
8b30b61c3e fix: allow empty patches.txt 2022-01-27 09:34:41 +05:30
Ankush Menat
fd227d38f4
feat: post model-sync patches (#15351)
Ability to run a few patches after the doctype model schema is synced.

Read module-level docstring of patch_handler.py for more info.
2022-01-26 11:21:30 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Rucha Mahabal
19c69e5316 fix: anti-pattern code 2020-01-27 12:26:12 +05:30
Rucha Mahabal
739b033489 feat: implemented pull trigger in follower nodes 2019-10-11 02:16:31 +05:30
Faris Ansari
d06abbd852
feat: Option to skip failing patches in migrate (#7959) 2019-07-23 16:46:15 +05:30
Manas Solanki
62fe836f43 time taken by the patch along with success message (#5524) 2018-05-04 13:14:10 +05:30
Aditya Hase
729bbf0dad Replaced Python 2 exec syntax usage with Python 3 syntax (#3835) 2017-08-02 17:05:39 +05:30
tundebabzy
7b41d7e5eb Python 3 compatible print statements (#3199)
* changes print statements in file to python 3 compatible style using `__future__`

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* changes deprecated md5 module to hashlib

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements
2017-05-01 12:34:29 +05:30
Rushabh Mehta
28b38d45e7 [fix] patches 2017-03-08 11:57:33 +05:30
Rushabh Mehta
e199d21664 [minor] [patch] import os for patches 2016-08-29 22:08:48 +05:30
Rushabh Mehta
7ef8f5f7a2 [minor] fixes to patches, ignore validate if in patch, move some events to hourly 2016-08-16 10:24:09 +05:30
Anand Doshi
2995f02f3b Web Notes to Frappe, better alerts, css fixes, fixed splash 2015-03-03 15:09:34 +05:30
Nabin Hait
da825bd130 bypass shopping_cart in patch handler 2015-01-02 12:49:42 +05:30
Rushabh Mehta
b0a43c28d3 [docs] 2014-11-25 17:56:12 +05:30
Rushabh Mehta
70f84020d2 updates to print 2014-07-25 13:01:49 +05:30
Anand Doshi
2fefadd976 Re-raise error in patch handler 2014-06-09 17:53:51 +05:30
Anand Doshi
bfd8b88b39 Set frappe.flags.in_patch when running a patch 2014-05-14 19:33:30 +05:30
Anand Doshi
ac2261e114 Fixed patch handler and update_reports method 2014-05-13 21:02:23 +05:30
Anand Doshi
b0b163918c Removed unused code from patch_handler 2014-05-13 19:36:13 +05:30
Anand Doshi
7ea509274a Fixed check if patch already executed 2014-05-12 19:46:03 +05:30
Rushabh Mehta
7bef30b270 frappe/frappe#478 2014-03-28 16:52:23 +05:30
Anand Doshi
9eb55aa102 Fixed naming in response.py, build_response only if response.data does not exist 2014-03-12 19:27:05 +05:30
Anand Doshi
7abc5b5e41 Fixes in Celery and Scheduler Hooks 2014-03-10 17:04:53 +05:30
Anand Doshi
edbadc18b2 Changed frappe.conn to frappe.db 2014-02-26 12:35:02 +05:30
Rushabh Mehta
482e55ec33 bugfixes 2014-02-14 17:28:47 +05:30
Rushabh Mehta
024ddfcc5b -webnotes +frappe 💥 2014-02-14 14:55:11 +05:30
Renamed from webnotes/modules/patch_handler.py (Browse further)