Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make travis not fail deploys on external link checker #156

Open
azaroth42 opened this issue Nov 27, 2017 · 4 comments
Open

Make travis not fail deploys on external link checker #156

azaroth42 opened this issue Nov 27, 2017 · 4 comments
Assignees

Comments

@azaroth42
Copy link
Member

e.g. from https://travis-ci.org/IIIF/api/builds/308051148

- ./_site/api/image/2.0/index.html
  *  External link https://profiles.stanford.edu/stuart-snydman failed: 500 No error
rake aborted!
HTML-Proofer found 1 failure!

Shouldn't prevent us from deploying.

Or a master PR: https://travis-ci.org/IIIF/api/builds/308053764

@glenrobson
Copy link
Member

The link above was a transient error as the URL does still exist at that location. To fix I clicked 'restart build' in travis and the second time through it finished correctly.

On the wider question on whether you should validate external links I would think it a benefit to ensure all external links work before publishing to the live website. I appreciate this could be relaxed on branches but would think it should be left in place on master.

@glenrobson
Copy link
Member

Regarding the errors on master:

- ./_site/api/annex/notes/jsonld/index.html

  *  External link http://json-ld.org/spec/latest/json-ld-framing failed: 404 No error

- ./_site/api/image/1.1/change-log/index.html

  *  External link http://json-ld.org failed: 404 No error

- ./_site/api/image/2.1/index.html

  *  External link http://www.json-ld.org failed: 404 No error

- ./_site/test/api/annex/notes/design_patterns/index.html

  *  External link http://json-ld.org/spec/latest/json-ld-api-best-practices failed: 404 No error

It looks like the json-ld.org site has moved over to https so I would suggest a build warning notifying you of the change might be useful. There does seem to be a bug in the HTMLProofer code that it doesn't see a 301 but complains of a 404. 301s are already ignored so won't stop the build process.

@glenrobson
Copy link
Member

Just rebuilt the master branch and it looks to have passed now so unless you've fixed the source the 404s could have been transient errors too.

@jpstroop
Copy link
Member

We used to only have the site check the links every week or two, and htmlproofer was supposed to be caching the results in this file: https://github.com/IIIF/api/blob/master/tmp/.htmlproofer/cache.log

The frequency is set here: https://github.com/IIIF/api/blob/master/Rakefile#L29

Now realizing (or maybe remembering) that that doesn't work since Travis can't write to the repo. If we do want to have the links checked periodically but not have it block progress on other PRs, maybe we need a cron to run the check somewhere else? Or we just need top remember to do it once and a while.

@jpstroop jpstroop transferred this issue from IIIF/api Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants