Mercurial > kallithea
annotate .hgignore @ 8925:ee1da602b590 stable
repo_groups: fix deletion of subgroups
Deletion of a repository group that has a parent group (i.e. is not at the
root of the repository group tree) failed as follows:
Traceback (most recent call last):
[...]
File ".../lib/python3.9/site-packages/tg/configurator/components/dispatch.py", line 114, in _call_controller
return controller(*remainder, **params)
File "<decorator-gen-5>", line 2, in delete
File "/home/tdescham/repo/contrib/kallithea/kallithea-release/kallithea/lib/auth.py", line 572, in __wrapper
return func(*fargs, **fkwargs)
File "/home/tdescham/repo/contrib/kallithea/kallithea-release/kallithea/controllers/admin/repo_groups.py", line 271, in delete
if gr.parent_group:
File ".../lib/python3.9/site-packages/sqlalchemy/orm/attributes.py", line 294, in __get__
return self.impl.get(instance_state(instance), dict_)
File ".../lib/python3.9/site-packages/sqlalchemy/orm/attributes.py", line 730, in get
value = self.callable_(state, passive)
File ".../lib/python3.9/site-packages/sqlalchemy/orm/strategies.py", line 717, in _load_for_state
raise orm_exc.DetachedInstanceError(
sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <RepoGroup at 0x7f1f2664f4c0> is not bound to a Session; lazy load operation of attribute 'parent_group' cannot proceed (Background on this error at: http://sqlalche.me/e/13/bhk3)
In the reference 'gr.parent_group', 'gr' is an SQLAlchemy object referring
to the group being deleted, and 'gr.parent_group' is a lazy reference to its
parent group. The 'lazy' means that the parent group object is not loaded
automatically when 'gr' is assigned, but instead will be loaded on-the-fly
when the parent group is actually accessed. See [1] and [2] for more
information.
The problem was that the lazy 'parent_group' attribute was accessed _after_
deleting the database object it was part of.
Fix this by obtaining a handle to the parent group _before_ deleting the
subgroup.
Reported-by: André Klitzing (via mailing list)
[1] https://docs.sqlalchemy.org/en/13/errors.html#error-bhk3
[2] https://docs.sqlalchemy.org/en/13/orm/loading_relationships.html
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Wed, 01 Sep 2021 22:08:45 +0200 |
parents | 278cc5936ed5 |
children |
rev | line source |
---|---|
848
a555d8345105
Small hgignore update
Lukasz Balcerzak <lukasz.balcerzak@python-center.org>
parents:
554
diff
changeset
|
1 syntax: glob |
a555d8345105
Small hgignore update
Lukasz Balcerzak <lukasz.balcerzak@python-center.org>
parents:
554
diff
changeset
|
2 *.pyc |
a555d8345105
Small hgignore update
Lukasz Balcerzak <lukasz.balcerzak@python-center.org>
parents:
554
diff
changeset
|
3 *.swp |
1971
3dd89d30cd28
ignore sqlite files
Marcin Kuzminski <marcin@python-works.com>
parents:
1893
diff
changeset
|
4 *.sqlite |
2555
b5c57e2176dc
ignore tox stuff
Marcin Kuzminski <marcin@python-works.com>
parents:
2379
diff
changeset
|
5 *.tox |
1236
a28bd9cb6549
added egg-info,and .egg in hgignore
Marcin Kuzminski <marcin@python-works.com>
parents:
848
diff
changeset
|
6 *.egg-info |
a28bd9cb6549
added egg-info,and .egg in hgignore
Marcin Kuzminski <marcin@python-works.com>
parents:
848
diff
changeset
|
7 *.egg |
4986
7d6c4bd58abd
i18n: don't include .mo files in the repo - build them on demand
Mads Kiilerich <madski@unity3d.com>
parents:
4902
diff
changeset
|
8 *.mo |
7884
17b86a2976ca
hgignore: *.orig and *.rej as created by hg when using revert, import, mq, etc
Mads Kiilerich <mads@kiilerich.com>
parents:
7845
diff
changeset
|
9 *.orig |
17b86a2976ca
hgignore: *.orig and *.rej as created by hg when using revert, import, mq, etc
Mads Kiilerich <mads@kiilerich.com>
parents:
7845
diff
changeset
|
10 *.rej |
7758
f0013f65982d
hgignore: ignore *.bak - such files are created by tools like 2to3
Mads Kiilerich <mads@kiilerich.com>
parents:
7467
diff
changeset
|
11 *.bak |
4997
9885bbacf99c
.hgignore: Add .eggs/ and tarballcache/
Marc Abramowitz <marc@marc-abramowitz.com>
parents:
4986
diff
changeset
|
12 .eggs/ |
0 | 13 |
14 syntax: regexp | |
8749 | 15 ^extensions\.py$ |
16 ^build$ | |
17 ^dist$ | |
18 ^docs/build$ | |
19 ^docs/_build$ | |
9 | 20 ^data$ |
8749 | 21 ^sql_dumps$ |
9 | 22 ^\.settings$ |
23 ^\.project$ | |
72 | 24 ^\.pydevproject$ |
1893
27c8836e6356
ignore coverage and my local dev.ini file
Marcin Kuzminski <marcin@python-works.com>
parents:
1833
diff
changeset
|
25 ^\.coverage$ |
7459
19a9f02443c8
front-end: Introduce 'front-end' directory with source files for building the front-end
Mads Kiilerich <mads@kiilerich.com>
parents:
7455
diff
changeset
|
26 ^kallithea/front-end/node_modules$ |
19a9f02443c8
front-end: Introduce 'front-end' directory with source files for building the front-end
Mads Kiilerich <mads@kiilerich.com>
parents:
7455
diff
changeset
|
27 ^kallithea/front-end/package-lock\.json$ |
7845
3b54bcf6d128
front-end: fix documentation regarding theme.less file
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7758
diff
changeset
|
28 ^kallithea/front-end/theme\.less$ |
7460
7ec976c8c198
front-end: Store temporary files in a tmp directory
Mads Kiilerich <mads@kiilerich.com>
parents:
7459
diff
changeset
|
29 ^kallithea/front-end/tmp$ |
7466
bf514091b27f
front-end: Use codemirror from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents:
7465
diff
changeset
|
30 ^kallithea/public/codemirror$ |
7464
12455b1a1a6f
front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents:
7463
diff
changeset
|
31 ^kallithea/public/css/select2-spinner\.gif$ |
12455b1a1a6f
front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents:
7463
diff
changeset
|
32 ^kallithea/public/css/select2\.png$ |
12455b1a1a6f
front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents:
7463
diff
changeset
|
33 ^kallithea/public/css/select2x2\.png$ |
12455b1a1a6f
front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents:
7463
diff
changeset
|
34 ^kallithea/public/css/style\.css$ |
12455b1a1a6f
front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents:
7463
diff
changeset
|
35 ^kallithea/public/css/style\.css\.map$ |
7462
585dee5eb4bb
front-end: Use the existing bootstrap.js from node_modules and stop bundling Bootstrap
Mads Kiilerich <mads@kiilerich.com>
parents:
7460
diff
changeset
|
36 ^kallithea/public/js/bootstrap\.js$ |
7465
cc2c473abc5f
front-end: Use DataTables from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents:
7464
diff
changeset
|
37 ^kallithea/public/js/dataTables\.bootstrap\.js$ |
7467
2e7ffb755d4f
front-end: use At.js for MentionsAutoComplete
domruf <dominikruf@gmail.com>
parents:
7466
diff
changeset
|
38 ^kallithea/public/js/jquery\.atwho\.min\.js$ |
2e7ffb755d4f
front-end: use At.js for MentionsAutoComplete
domruf <dominikruf@gmail.com>
parents:
7466
diff
changeset
|
39 ^kallithea/public/js/jquery\.caret\.min\.js$ |
7465
cc2c473abc5f
front-end: Use DataTables from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents:
7464
diff
changeset
|
40 ^kallithea/public/js/jquery\.dataTables\.js$ |
7463
2b8f69cb7d8c
front-end: Use jQuery and Flot from node_modules and stop bundling them
Mads Kiilerich <mads@kiilerich.com>
parents:
7462
diff
changeset
|
41 ^kallithea/public/js/jquery\.flot\.js$ |
2b8f69cb7d8c
front-end: Use jQuery and Flot from node_modules and stop bundling them
Mads Kiilerich <mads@kiilerich.com>
parents:
7462
diff
changeset
|
42 ^kallithea/public/js/jquery\.flot\.selection\.js$ |
2b8f69cb7d8c
front-end: Use jQuery and Flot from node_modules and stop bundling them
Mads Kiilerich <mads@kiilerich.com>
parents:
7462
diff
changeset
|
43 ^kallithea/public/js/jquery\.flot\.time\.js$ |
2b8f69cb7d8c
front-end: Use jQuery and Flot from node_modules and stop bundling them
Mads Kiilerich <mads@kiilerich.com>
parents:
7462
diff
changeset
|
44 ^kallithea/public/js/jquery\.min\.js$ |
7464
12455b1a1a6f
front-end: Use select2 from node_modules and stop bundling it
Mads Kiilerich <mads@kiilerich.com>
parents:
7463
diff
changeset
|
45 ^kallithea/public/js/select2\.js$ |
4210
277684f23146
Rename some strings in defaults found in config files
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4181
diff
changeset
|
46 ^kallithea\.db$ |
460 | 47 ^test\.db$ |
4212
24c0d584ba86
General renaming to Kallithea
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4210
diff
changeset
|
48 ^Kallithea\.egg-info$ |
4902 | 49 ^my\.ini$ |
8749 | 50 ^fabfile\.py$ |
3831
bd39c1f70e35
Updated hgignore to skip .idea config files
Marcin Kuzminski <marcin@python-works.com>
parents:
3051
diff
changeset
|
51 ^\.idea$ |
5516
bfa66e8887d7
hgignore: ignore `.cache/`, created by pytest 2.8 when writing `.cache/v/cache/lastfailed`
Mads Kiilerich <madski@unity3d.com>
parents:
5416
diff
changeset
|
52 ^\.cache$ |
7455
42163501d6b5
hgignore: .pytest_cache
Mads Kiilerich <mads@kiilerich.com>
parents:
7438
diff
changeset
|
53 ^\.pytest_cache$ |
8634
6bab917402b4
docs: when using venv with a clone, recommend using 'venv' as location
Mads Kiilerich <mads@kiilerich.com>
parents:
8614
diff
changeset
|
54 ^venv$ |
6038
9358211ee144
tests: move test data to top level 'data' folder - make grepping in kallithea/ easier
Mads Kiilerich <madski@unity3d.com>
parents:
5516
diff
changeset
|
55 /__pycache__$ |
8772
52816813cbec
docs: describe, visualize, and verify internal code structure and layering
Mads Kiilerich <mads@kiilerich.com>
parents:
8749
diff
changeset
|
56 ^deps\.dot$ |
52816813cbec
docs: describe, visualize, and verify internal code structure and layering
Mads Kiilerich <mads@kiilerich.com>
parents:
8749
diff
changeset
|
57 ^deps\.svg$ |
52816813cbec
docs: describe, visualize, and verify internal code structure and layering
Mads Kiilerich <mads@kiilerich.com>
parents:
8749
diff
changeset
|
58 ^deps\.txt$ |
8854
278cc5936ed5
pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents:
8772
diff
changeset
|
59 ^\.pytype/ |