gristlabs_grist-core/sandbox/grist
Paul Fitzpatrick dd0f1be117 (core) get all tests working under python3/gvisor
Summary:
This verifies that all existing tests are capable of running under python3/gvisor, and fixes the small issues that came up. It does not yet activate python3 tests on all diffs, only diffs that specifically request them.

 * Adds a suffix in test names and output directories for tests run with PYTHON_VERSION=3, so that results of the same test run with and without the flag can be aggregated cleanly.
 * Adds support for checkpointing to the gvisor sandbox adapter.
 * Prepares a checkpoint made after grist python code has loaded in the gvisor sandbox.
 * Changes how `DOC_URL` is passed to the sandbox, since it can no longer be passed in as an environment variable when using checkpoints.
 * Uses the checkpoint to speed up tests using the gvisor sandbox, otherwise a lot of tests need more time (especially on mac under docker).
 * Directs jenkins to run all tests with python2 and python3 when a new file `buildtools/changelogs/python.txt` is touched (this diff counts as touching that file).
 * Tweaks miscellaneous tests
   - some needed fixes exposed by slightly different timing
   - a small number actually give different results in py3 (removal of `u` prefixes).
   - some needed a little more time

The DOC_URL change is not the ultimate solution we want for DOC_URL. Eventually it should be a variable that gets updated, like the date perhaps. This is just a small pragmatic change to preserve existing behavior.

Tests are run mindlessly as py3, and for some tests it won't change anything (e.g. if they do not use NSandbox). Tests are not run in parallel, doubling overall test time.

Checkpoints could be useful in deployment, though this diff doesn't use them there.

The application of checkpoints doesn't check for other configuration like 3-versus-5-pipe that we don't actually use.

Python2 tests run using pynbox as always for now.

The diff got sufficiently bulky that I didn't tackle running py3 on "regular" diffs in it. My preference, given that most tests don't appear to stress the python side of things, would be to make a selection of the tests that do and a few wild cards, and run those tests on both pythons rather then all of them. For diffs making a significant python change, I'd propose touching buildtools/changelogs/python.txt for full tests. But this is a conversation in progress.

A total of 6886 tests ran on this diff.

Test Plan: this is a step in preparing tests for py3 transition

Reviewers: dsagal

Reviewed By: dsagal

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3066
2021-10-18 17:44:15 -04:00
..
functions (core) Add CellError to explain when a formula refers to a cell with an error value 2021-07-30 22:58:45 +02:00
imports (core) Fix import parsing from choking up on Python isdigit() surprises 2021-09-20 16:17:34 -04:00
acl_formula.py (core) Remaining Python 3 compatibility changes 2021-06-25 12:00:58 +02:00
acl.py (core) Remaining Python 3 compatibility changes 2021-06-25 12:00:58 +02:00
action_obj.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
action_summary.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
actions.py (core) Remaining Python 3 compatibility changes 2021-06-25 12:00:58 +02:00
autocomplete_context.py (core) Make CONTAINS a function for consistency with mkpydocs etc. 2021-07-21 13:18:23 +02:00
codebuilder.py (core) Raise syntax errors that Python can format nicely to show the location 2021-09-24 15:07:09 +02:00
column.py (core) Only update changed records with RenameChoices 2021-10-01 21:32:52 +02:00
csv_patch.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
depend.py (core) Implement trigger formulas (generalizing default formulas) 2021-06-25 22:53:07 -04:00
docactions.py (core) Implement trigger formulas (generalizing default formulas) 2021-06-25 22:53:07 -04:00
docmodel.py (core) Refactor Table.Record[Set] classes 2021-07-19 14:53:28 +02:00
engine.py (core) Adding traceback to trigger formulas 2021-09-27 17:12:39 +02:00
gencode.py (core) Add 'user' variable to trigger formulas 2021-07-15 15:18:32 -07:00
gpath.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
grist.py (core) Add ChoiceList type, cell widget, and editor widget. 2021-05-12 10:38:32 -04:00
identifiers.py (core) Remove accents when picking identifiers 2021-08-24 14:47:50 +02:00
import_actions.py (core) Migrate import code from data engine to Node 2021-10-04 10:27:00 -07:00
logger.py (core) move data engine code to core 2020-07-29 08:57:25 -04:00
lookup.py (core) Make CONTAINS a function for consistency with mkpydocs etc. 2021-07-21 13:18:23 +02:00
main.py (core) get all tests working under python3/gvisor 2021-10-18 17:44:15 -04:00
match_counter.py (core) move data engine code to core 2020-07-29 08:57:25 -04:00
migrations.py (core) Initial webhooks implementation 2021-09-23 14:35:39 +02:00
moment_parse.py (core) Remaining Python 3 compatibility changes 2021-06-25 12:00:58 +02:00
moment.py (core) Remaining Python 3 compatibility changes 2021-06-25 12:00:58 +02:00
objtypes.py (core) Adding traceback to trigger formulas 2021-09-27 17:12:39 +02:00
parse_data.py (core) Move file import plugins into core/sandbox/grist 2021-08-09 18:37:14 +02:00
records.py (core) Suggest correct table when converting to RefList 2021-08-20 23:04:48 +02:00
relabeling.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
relation.py (core) Polish and enable Reference List widget 2021-08-12 11:51:21 -07:00
runtests.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
sandbox.py (core) communicate with sandbox via standard pipes 2021-07-12 06:45:47 -04:00
schema.py (core) Initial webhooks implementation 2021-09-23 14:35:39 +02:00
summary.py (core) Fix changing type of source column from choice to choicelist 2021-08-11 23:45:15 +02:00
table_data_set.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
table.py (core) treat summary tables like formulas for access control purposes 2021-09-16 18:44:50 -04:00
test_acl_formula.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_acl_renames.py (core) Update ACL resources/rules when tables/columns get renamed 2021-01-04 22:03:01 -05:00
test_actions.py (core) move data engine code to core 2020-07-29 08:57:25 -04:00
test_codebuilder.py (core) Raise syntax errors that Python can format nicely to show the location 2021-09-24 15:07:09 +02:00
test_column_actions.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_completion.py (core) update tests after jenkins engine freshening 2021-09-18 09:58:35 -04:00
test_default_formulas.py (core) Fix lookups in default formulas 2020-09-10 18:06:06 -04:00
test_depend.py (core) Fix recursion error in invalidate_deps 2021-06-18 15:42:20 +02:00
test_derived.py (core) Store formula values in DB, and include them into .stored/.undo fields of actions. 2020-11-04 16:45:47 -05:00
test_display_cols.py (core) discount indirect changes for access control purposes 2021-05-12 11:26:21 -04:00
test_docmodel.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_engine.py (core) Add RenameChoices user action 2021-09-30 16:43:40 +02:00
test_find_col.py (core) move data engine code to core 2020-07-29 08:57:25 -04:00
test_formula_error.py (core) Adding traceback to trigger formulas 2021-09-27 17:12:39 +02:00
test_formula_undo.py (core) Suggest correct table when converting to RefList 2021-08-20 23:04:48 +02:00
test_functions.py (core) Remaining Python 3 compatibility changes 2021-06-25 12:00:58 +02:00
test_gencode.py (core) Raise syntax errors that Python can format nicely to show the location 2021-09-24 15:07:09 +02:00
test_gpath.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_import_actions.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_logger.py (core) move data engine code to core 2020-07-29 08:57:25 -04:00
test_lookups.py (core) CONTAINS() and summarising by ChoiceList columns with flattening 2021-07-19 16:35:35 +02:00
test_match_counter.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_migrations.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_moment.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_record_func.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_recordlist.py (core) Implement trigger formulas (generalizing default formulas) 2021-06-25 22:53:07 -04:00
test_reflist_rel.py (core) Fix a bug that occurs after remaing a table containing a RefList column. 2020-11-26 22:29:37 -05:00
test_relabeling.py (core) Remaining Python 3 compatibility changes 2021-06-25 12:00:58 +02:00
test_renames2.py (core) Store formula values in DB, and include them into .stored/.undo fields of actions. 2020-11-04 16:45:47 -05:00
test_renames.py (core) Suggest correct table when converting to RefList 2021-08-20 23:04:48 +02:00
test_replay.py (core) Add test_replay for easily replaying data sent to the sandbox purely within python 2021-06-30 16:56:09 +02:00
test_side_effects.py (core) Store formula values in DB, and include them into .stored/.undo fields of actions. 2020-11-04 16:45:47 -05:00
test_summary2.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_summary_choicelist.py (core) Add RenameChoices user action 2021-09-30 16:43:40 +02:00
test_summary.py (core) Nicer conversion from numeric to text 2021-09-30 14:16:24 +02:00
test_table_actions.py (core) move data engine code to core 2020-07-29 08:57:25 -04:00
test_table_data_set.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_temp_rowids.py (core) Allow using negative rowIds to add records and refer to them in Reference values. 2020-12-15 16:39:56 -05:00
test_textbuilder.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_treeview.py (core) move data engine code to core 2020-07-29 08:57:25 -04:00
test_trigger_formulas.py (core) Adding traceback to trigger formulas 2021-09-27 17:12:39 +02:00
test_twowaymap.py (core) move data engine code to core 2020-07-29 08:57:25 -04:00
test_types.py (core) Nicer conversion from numeric to text 2021-09-30 14:16:24 +02:00
test_undo.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_urllib_patch.py (core) Remaining Python 3 compatibility changes 2021-06-25 12:00:58 +02:00
test_user.py (core) Add 'user' variable to trigger formulas 2021-07-15 15:18:32 -07:00
test_useractions.py (core) Only update changed records with RenameChoices 2021-10-01 21:32:52 +02:00
testsamples.py (core) move data engine code to core 2020-07-29 08:57:25 -04:00
testscript.json (core) Remove REPL code 2021-07-20 15:17:03 +02:00
testutil.py (core) Implement trigger formulas (generalizing default formulas) 2021-06-25 22:53:07 -04:00
textbuilder.py (core) Remaining Python 3 compatibility changes 2021-06-25 12:00:58 +02:00
treeview.py (core) move data engine code to core 2020-07-29 08:57:25 -04:00
twowaymap.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
tzdata.data (core) move data engine code to core 2020-07-29 08:57:25 -04:00
urllib_patch.py (core) Remaining Python 3 compatibility changes 2021-06-25 12:00:58 +02:00
user.py (core) Add 'user' variable to trigger formulas 2021-07-15 15:18:32 -07:00
useractions.py (core) Migrate import code from data engine to Node 2021-10-04 10:27:00 -07:00
usercode.py (core) Raise syntax errors that Python can format nicely to show the location 2021-09-24 15:07:09 +02:00
usertypes.py (core) Nicer conversion from numeric to text 2021-09-30 14:16:24 +02:00
xmlrunner.py (core) Run python unit tests again in python 3 2021-06-30 21:46:18 +02:00