addons-code-manager icon indicating copy to clipboard operation
addons-code-manager copied to clipboard

The file in the old version should load when going from compare to the browse page

Open ioanarusiczki opened this issue 5 years ago • 6 comments

Followup for https://github.com/mozilla/addons-code-manager/issues/1421

STR:

  1. Go to https://code.addons-dev.allizom.org/en-US/compare/7560/versions/1252898...1688247/?path=install.rdf
  2. 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.

404again

┆Issue is synchronized with this Jira Task

ioanarusiczki avatar Feb 14 '20 15:02 ioanarusiczki

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 avatar Feb 14 '20 17:02 mirefly

@mirefly Yes, further looking into versions, same for https://code.addons-dev.allizom.org/en-US/compare/7560/versions/1509666...1510628/

ioanarusiczki avatar Feb 17 '20 11:02 ioanarusiczki

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...

mirefly avatar Feb 18 '20 19:02 mirefly

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.

bobsilverberg avatar Apr 17 '20 13:04 bobsilverberg

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.

ioanarusiczki avatar May 06 '20 11:05 ioanarusiczki

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.

stale[bot] avatar Nov 03 '20 14:11 stale[bot]