Closed
Bug 1478639
Opened 7 years ago
Closed 7 years ago
Jump to definition sometimes lands in the wrong place because of long-lived cached 301 redirects
Categories
(Webtools :: Searchfox, defect)
Webtools
Searchfox
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: kats, Assigned: asuth)
Details
Go to the line at https://searchfox.org/mozilla-central/rev/943a6cf31a96eb439db8f241ab4df25c14003bb8/gfx/layers/wr/WebRenderBridgeParent.cpp#1280 but in the live copy of searchfox. Click on "ClearResources" and go to definition.
Right now it's taking me to https://searchfox.org/mozilla-central/rev/943a6cf31a96eb439db8f241ab4df25c14003bb8/gfx/layers/wr/WebRenderBridgeParent.cpp#1638 which is not at all the right place.
Comment 1•7 years ago
|
||
It is working for me. Does it work if you reload (the first page I guess)? I've had what feel like issues where caching results in stale values.
| Reporter | ||
Comment 2•7 years ago
|
||
Huh, weird. Even after shift-reloading in Firefox Beta it gives me the same behaviour. But if I load it in Safari it works. I guess it must be caching something else.
| Reporter | ||
Comment 3•7 years ago
|
||
Ah, it's caching the 301 response to https://searchfox.org/mozilla-central/define?q=_ZN7mozilla6layers21WebRenderBridgeParent14ClearResourcesEv&redirect=false
If I disable the cache using the devtools networking panel it works correctly.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
| Assignee | ||
Comment 4•7 years ago
|
||
Should we maybe put an explicit, shorter 'expires' directive on the 301's given that they're harder to refresh around?
It looks like we could convert the "expires 1d" nginx config[1] to something like:
```
# prolog up above
map $status $expires {
default 1d;
301 10m;
}
# replace "expires 1d" with:
expires $expires;
```
It also turns out that we can specify absolute times of day for expires using "@", but I think that would only work if we were sticking with once-a-day indexing and we reliably knew when the next index would be available and go live.
1: both:
https://github.com/mozsearch/mozsearch/blob/master/scripts/nginx-setup.py#L80
https://github.com/mozsearch/mozsearch/blob/master/scripts/nginx-setup.py#L59
| Reporter | ||
Comment 5•7 years ago
|
||
That sounds reasonable to me. Want to make a PR for that?
| Assignee | ||
Comment 6•7 years ago
|
||
Sure.
Assignee: nobody → bugmail
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Summary: Jump to definition sometimes lands in the wrong place → Jump to definition sometimes lands in the wrong place because of long-lived cached 301 redirects
| Assignee | ||
Comment 7•7 years ago
|
||
Pull request at https://github.com/mozsearch/mozsearch/pull/124 after getting vagrant working on my new beefy build box. Tested locally.
Note that I misunderstood what was going on in my initial descriptions. The 301 was not affected by any "expires" directive. The change I make causes the same expiration map rule to be applied to _everything_ served by nginx, which is actually altering the status quo for everything we proxy pass. This could mean that the default of 1 day is actually an increase in some cases.
Status: REOPENED → ASSIGNED
| Assignee | ||
Comment 8•7 years ago
|
||
PR merged, marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago → 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•