Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 30044555: Issue 7461 - Include source page into warning text for unresolved links (Closed)

Created:
April 12, 2019, 2:05 p.m. by Vasily Kuznetsov
Modified:
April 16, 2019, 1:30 p.m.
Reviewers:
rhowell, rosie
CC:
juliandoucette
Base URL:
https://hg.adblockplus.org/cms
Visibility:
Public.

Description

Issue 7461 - Include source page into warning text for unresolved links Repository: https://hg.adblockplus.org/cms/ Base revision: 66c6722b1ca2

Patch Set 1 #

Patch Set 2 : Add tests #

Total comments: 5

Patch Set 3 : Improve readability of the error message #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -8 lines) Patch
M cms/converters.py View 4 chunks +8 lines, -6 lines 0 comments Download
M cms/sources.py View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M tests/expected_output/common/en/sitemap View 1 1 chunk +3 lines, -0 lines 0 comments Download
M tests/test_page_outputs.py View 1 2 2 chunks +15 lines, -0 lines 0 comments Download
A tests/test_site/pages/brokenlink.md View 1 1 chunk +1 line, -0 lines 0 comments Download
A tests/test_site/pages/brokenlink-html.html View 1 1 chunk +1 line, -0 lines 0 comments Download
A tests/test_site/pages/brokenlink-tmpl.tmpl View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4
Vasily Kuznetsov
Hi Rosie, This patch fixes the unhelpful warnings that the CMS produces when there's a ...
April 12, 2019, 2:38 p.m. (2019-04-12 14:38:34 UTC) #1
rhowell
Hey Vasily! Mostly LGTM. Just a couple small nits that I don't feel too strongly ...
April 12, 2019, 8:17 p.m. (2019-04-12 20:17:12 UTC) #2
Vasily Kuznetsov
Hi Rosie! Thank you for the review. I have improved the error message. Let me ...
April 15, 2019, 4:48 p.m. (2019-04-15 16:48:45 UTC) #3
rhowell
April 16, 2019, 1:46 a.m. (2019-04-16 01:46:59 UTC) #4
LGTM. :)

https://codereview.adblockplus.org/30044555/diff/30044559/tests/test_page_out...
File tests/test_page_outputs.py (right):

https://codereview.adblockplus.org/30044555/diff/30044559/tests/test_page_out...
tests/test_page_outputs.py:79: assert message in messages
On 2019/04/15 16:48:45, Vasily Kuznetsov wrote:
> On 2019/04/12 20:17:12, rhowell wrote:
> > NIT: This test might be a bit stricter if we used something like
> > `set(expected_messages) == messages`, but it seems there's two extra broken
> > links in there (that might've been my fault). Would it make sense to clean
up
> > those broken links? It's these two:
> > 
> > Link to "rel_path.html" (from "rel_path") cannot be resolved
> > Link to "myscripts.js" (from "rel_path") cannot be resolved
> 
> Yes, I thought about it too. In the end I decided to not do anything about it:
> - For the purposes of this test we're just checking that broken links get
> reported properly, so if there are some other messages that we don't expect,
> that's fine.
> - I haven't  looked too deep into it but I assume `rel_path` needs those links
> for testing path rewriting -- I thought I'd rather not meddle there without a
> good reason.

Makes sense.

Powered by Google App Engine
This is Rietveld