Dvc.org: link checker: fix issues

Created on 17 Mar 2020  路  8Comments  路  Source: iterative/dvc.org

  • [ ] does not work on mac (sed is using some -r which is GNU-specific)
  • [ ] does not print file names issue is found - https://circleci.com/gh/iterative/dvc.org/2592
  • [ ] requires to be run from the root, it easy to make it run from any directory
bug doc-engine priority-p1

All 8 comments

  1. Don't have a Mac so not sure how I can test
  2. Right now it's a little hard to link the issue to the file name; possible with a little bit of scripting but is it that important? As of now the broken link(s) on the PR diff are printed and it's easy for the PR creator to find the links.
  3. Easy to fix run from any dir
  1. I think we need to rely on POSIX sed - https://riptutorial.com/sed/topic/9436/bsd-macos-sed-vs--gnu-sed-vs--the-posix-sed-specification
  2. The problem that I was not able to find the link to fix from the CI output
  3. 馃憤
  1. ergh. What about sed -E instead of sed -r? echo '[md](/rel)' | sed -E 's/.*]\((\/[^)[:space:]]+).*/\1/' should print /rel...
  2. which links couldn't you find? https://patch-diff.githubusercontent.com/raw/iterative/dvc.org/pull/1025 diff has both https://dvc.org/img/
    and https://github.com/iterative/dvc.org/blob/master/褋ontent$
  1. Yep! -E prints /rel for me
  2. Ok. I see it now - https://dvc.org/img/<filename>.gif - was not obvious that that is the one.

Actually, still not sure:

-https://dvc.org/static/img/<filename>.gif
+https://dvc.org/img/<filename>.gif

we already have this - and it didn't help. Am I still missing the link?

Yes I saw that and was re-running a full test locally... actually

+https://dvc.org/img/<filename>.gif

isn't needed at all. Maybe there were some intermediate commits where it was needed? Right now I'm getting no errors locally even when removing that exclusion...

so, what was the issue with the https://dvc.org/img/ then? was it about that link or something else?

Probably a particular commit? Note sure and probably not worth debugging - better to wait for it to happen again.

Was this page helpful?
0 / 5 - 0 ratings