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

Update dependencies #101

Merged
merged 8 commits into from
Dec 1, 2022
Merged

Update dependencies #101

merged 8 commits into from
Dec 1, 2022

Conversation

clementbiron
Copy link
Collaborator

That PR update circleci/hugo from 0.3.1 to 1.3.0, gh-pages from ^1.0.0 to ^4.0.0 and specify the minimum node version needed.

I haven't found a way other than to disable html-proofer for this to work. I will need help to find how to fix the following error shown in CicleCI.

#!/bin/bash -eo pipefail
htmlproofer ./public \
   \
   --allow-hash-href  \
   \
  --alt-ignore  \
   \
  --checks-to-ignore '' \
   \
   \
   --check-html  \
   \
   \
   \
  --directory-index-file index.html \
   --disable-external  \
   --empty-alt-ignore  \
  --error-sort ''  \
   \
  --extension '.html' \
   \
  --file-ignore '' \
  --http-status-ignore '' \
  --internal-domains '' \
   \
   \
   \
   \
   \
   \
  --log-level info \
   \
  --storage-dir 'tmp/.htmlproofer' \
  --timeframe '1h' \
  --typhoeus-config '{}' \
  --url-ignore '' \
  --url-swap ''

htmlproofer 4.4.3 | Error:  Whoops, we can't understand your command.
htmlproofer 4.4.3 | Error:  invalid option: --checks-to-ignore
Did you mean?  check-internal-hash
htmlproofer 4.4.3 | Error:  Run your command again with the --help switch to see available options.
/var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:33:in `go': invalid option: --checks-to-ignore (OptionParser::InvalidOption)
Did you mean?  check-internal-hash
	from /var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	from /var/lib/gems/3.0.0/gems/html-proofer-4.4.3/bin/htmlproofer:11:in `<top (required)>'
	from /usr/local/bin/htmlproofer:25:in `load'
	from /usr/local/bin/htmlproofer:25:in `<main>'

Exited with code exit status 1
CircleCI received exit code 1

@clementbiron clementbiron requested a review from MattiSG November 24, 2022 14:26
@netlify
Copy link

netlify bot commented Nov 24, 2022

Deploy Preview for openfisca-org ready!

Name Link
🔨 Latest commit 126e6f9
🔍 Latest deploy log https://app.netlify.com/sites/openfisca-org/deploys/6388b5ac6343db000877a801
😎 Deploy Preview https://deploy-preview-101--openfisca-org.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@clementbiron clementbiron linked an issue Nov 24, 2022 that may be closed by this pull request
@MattiSG
Copy link
Member

MattiSG commented Nov 25, 2022

Thanks, looks promising!

htmlproofer is used to validate the HTML output. It is an important failsafe mechanism. It seems that the CircleCI orb has some issues (cf. CircleCI-Public/hugo-orb#51), and we currently rely on it to execute htmlproofer.

I see the following options:

  1. We stop relying on the orb and install and execute htmlproofer ourselves (example).
  2. We play with options to pass to the orb until we find something that works. I looked at the documentation and at the htmlproofer changelog and open issues and did not find anything related to invalid option: --checks-to-ignore, except that this option is not listed on the README, so it might have been removed at some point and the orb is not up to date.
  3. We open a PR to the orb removing this option, and potentially publish our fork of the orb and use it until this is fixed if merging takes too long.

In any case, I believe we should open an issue in the orb repository.

@clementbiron
Copy link
Collaborator Author

Issue opened CircleCI-Public/hugo-orb#57 👍

@clementbiron
Copy link
Collaborator Author

Thanks Matti for your review.

I chose the first option by installing and running htmlproofer on our own.

htmlproofer is reporting 59 failures which I suppose will have to be dealt with in another PR.

@MattiSG MattiSG changed the title Udpate dependencies Update dependencies Dec 1, 2022
This new htmlproofer check shows errors that are not worth handling now
Should have been done in https://github.com/openfisca/openfisca.org/pull/95/files
Should have been caught by failing proofer
@MattiSG
Copy link
Member

MattiSG commented Dec 1, 2022

I fixed the issue related to htmlproofer by pinning its version and updating the CLI syntax, as documented in CircleCI-Public/hugo-orb#57 (comment).

I corrected the issues detected by htmlproofer, including a very problematic one that was introduced in #95 where we had inadvertently broken the main CTA links on the homepage 😓 In some way, it was useful that the build broke then.

Copy link
Member

@MattiSG MattiSG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@MattiSG MattiSG merged commit 95d0337 into master Dec 1, 2022
@MattiSG MattiSG deleted the udpate_dependencies branch December 1, 2022 14:12
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

Successfully merging this pull request may close these issues.

Upgrade dependencies and CI/CD process
2 participants