addons-code-manager
addons-code-manager copied to clipboard
The file in the old version should load when going from compare to the browse page
Followup for https://github.com/mozilla/addons-code-manager/issues/1421
STR:
- Go to https://code.addons-dev.allizom.org/en-US/compare/7560/versions/1252898...1688247/?path=install.rdf
- Click the Compare Versions button and then click the Browse page for the old version
Expected result: the page should load
Actual result: Loading linter information...
Notes: I receive a 404 in the Network for https://addons-dev.allizom.org/en-US/developers/addon/webmail-ad-blocker/file/124749/validation.json It is reproducible on dev with FF73(Win10) for other files of these type (which were deleted in the new version). I could not load another file for the old version by clicking on another one from the file tree.
┆Issue is synchronized with this Jira Task
Thanks for filing this. When investigating #1327, I noticed the same problem in compare mode ( https://code.addons-dev.allizom.org/en-US/compare/7560/versions/1252898...1510628/). I believe 404 error is because the version is too old and has no linter info, but code-manager should load the file when failed to fetch linter messages (validtion.json
file).
@mirefly Yes, further looking into versions, same for https://code.addons-dev.allizom.org/en-US/compare/7560/versions/1509666...1510628/
I could not reproduce this in dev now (d120186). I had no idea how it got fixed... :)
updated: I tested on production build on 45982e4 locally. It works as expected for http://localhost:3000/en-US/compare/7560/versions/1509666...1510628/ (loading the file, and also pop up an error message), but https://code.addons-dev.allizom.org/en-US/compare/7560/versions/1509666...1510628/ could not load the file. It is a bit strange...
This issue is about the fact that linter information could be missing for a version, and when that happens we don't display the code.
To fix this we should detect when there's a 404 from validation.json
and still show the code, and also display a banner explaining that we were unable to retrieve validation information.
Here's another example - I see for this addon a 404 on validation.json in the Network:
https://reviewers.addons-dev.allizom.org/en-US/reviewers/review/noscript?page=1#history
I couldn't load any of the most recent versions uploaded.
This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.