blob: d662f73855e1ddebe9d76aae56f7442870967cac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Add to Collection Error
## Tags
* assigned: fredm, zachs
* priority: urgent
* type: bug
* status: closed, completed
* keywords: collections
## Description
Go to the following correlation results:
=> https://genenetwork.org/corr_compute?job_id=9922450b-3d68-40e3-bfa2-33e0056e8cca
* Click the "More Options" button
* Filter the 500 entries by r>0, r<1, mean>3 and mean<100.
* Click the "Select Traits" button to activate your filter. This leaves only 73 entries.
* Select all of traits except the two in chromosome 16 which means 71 entries were selected.
* Click "+ Add" button to create new collection
* A new window opens and the error message "414 Request-URI Too Large" shows up
This issue is also reproducible on https://cd.genenetwork.org
### Generating Somewhat Similar Correlation Results
There is a chance the link above might eventually expire. If that happens, you can regenerate the same correlation results with the following results:
* Go to https://genenetwork.org/show_trait?trait_id=ENSG00000169344&dataset=GTEXv8_Kidn_tpm_0220
* Open the "Calculate Correlations" accordion
* Set Method = "sample r"
* Set Database = "GTEXv8 Human Kidney-Cortex RNA-Seq (Feb20) TPM log2"
* Set "Limit to" = 500
* Set Samples = GTEx_v8
* Set Type = Pearson
* Set "Location Type" = "Gene"
* Click "Compute"
* Continue with the steps in the section above
## Troubleshooting Notes
The request uses the "GET" method: see
=> https://github.com/genenetwork/genenetwork2/blob/3ebf796f82797139b68f29e1e6a2323d60886539/wqflask/wqflask/collect.py#L118-L119
Some files that are concerned with the issue:
=> https://github.com/genenetwork/genenetwork2/blob/3ebf796f82797139b68f29e1e6a2323d60886539/wqflask/wqflask/collect.py#L101-L108
=> https://github.com/genenetwork/genenetwork2/blob/3ebf796f82797139b68f29e1e6a2323d60886539/wqflask/wqflask/templates/collections/add.html#L8
=> https://github.com/genenetwork/genenetwork2/blob/3ebf796f82797139b68f29e1e6a2323d60886539/wqflask/wqflask/static/new/javascript/search_results.js#L192-L198
Probable solution: add `method="POST"` to the "<form ...>" line in the "add.html" file, but there is a chance that might break other features that depend on the same form. This will need to be done carefully.
In retrospect, this feature should not use "GET" at all, since it is not indempotent. Every run has the potential to change the state of the underlying collection(s). All features depending on the "add.html" template should use the "POST" method, never "GET".
## Fixes
=> https://github.com/genenetwork/genenetwork2/commit/1915fcdf7f67cd76348b06070e86aedfb4076f01
This converts the requests to use the POST method which does not have any data size limits according to the HTTP protocol (in practice, there is probably a limit, but that is a configuration value, and we are unlikely to hit it).
|