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

[toml syntax] Looks like netlify doesnt like our toml config's syntax #3409

Closed
usta opened this issue Aug 16, 2023 · 3 comments · Fixed by #2859
Closed

[toml syntax] Looks like netlify doesnt like our toml config's syntax #3409

usta opened this issue Aug 16, 2023 · 3 comments · Fixed by #2859
Assignees
Labels
bug Something isn't working

Comments

@usta
Copy link
Member

usta commented Aug 16, 2023

In logs we got lots of
Incorrect TOML configuration format: Escape sequence \: is reserved
which is caused by

sed -i "/url\:/curl\: $DEPLOY_PRIME_URL" _config.yml

@usta usta added the bug Something isn't working label Aug 16, 2023
@usta
Copy link
Member Author

usta commented Aug 16, 2023

@captn3m0

marcwrobel added a commit that referenced this issue Aug 19, 2023
Compared to the use of the validate.py script / validate.yaml workflow, this has the advantage of ensuring the validation is always performed. It also gives access to enriched data, which is useful for validated generated content, such as links.

In addition to checks already implemented in the previous 'validate.py' script, this script:

- Check that release dates are not too far in the future to avoid mistakes such as #3281 (max 30 days allowed).
- Check all links are valid (even those in the products description). This check takes time and is not performed by default, but it can be triggered by setting the MUST_CHECK_URLS environment variable to true. To ensure links are regularly verified a new GitHub workflow, check-links.yml, has also been added. It runs every sunday at midnight.

Note that:

- Some links had to be excluded from the link validation because, despite being valid, they are sometime or systematically returning an error.
- A dependency to open-uri (https://github.com/ruby/open-uri) has been added to simplify the validation of HTTP links.
- The priority of the ProductDataEnricher plugin had to be set to normal, to allow hooks to be run before and after enrichment.
- The deploy.sh has been cleaned-up and enriched with the deploy URL replacement originaly done in netlify.toml.

Some alternate URLs has been changed or removed due to an enforcement of the rules regarding permalinks and alternate_urls (no more dots).

Closes #2709, #3409.
@marcwrobel
Copy link
Member

Will be fixed by #2859 (I moved the sed to deploy.sh).

@marcwrobel marcwrobel assigned marcwrobel and unassigned captn3m0 Aug 19, 2023
marcwrobel added a commit that referenced this issue Aug 19, 2023
Compared to the use of the validate.py script / validate.yaml workflow, this has the advantage of ensuring the validation is always performed. It also gives access to enriched data, which is useful for validated generated content, such as links.

In addition to checks already implemented in the previous 'validate.py' script, this script:

- Check that release dates are not too far in the future to avoid mistakes such as #3281 (max 30 days allowed).
- Check all links are valid (even those in the products description). This check takes time and is not performed by default, but it can be triggered by setting the MUST_CHECK_URLS environment variable to true. To ensure links are regularly verified a new GitHub workflow, check-links.yml, has also been added. It runs every sunday at midnight.

Note that:

- Some links had to be excluded from the link validation because, despite being valid, they are sometime or systematically returning an error.
- A dependency to open-uri (https://github.com/ruby/open-uri) has been added to simplify the validation of HTTP links.
- The priority of the ProductDataEnricher plugin had to be set to normal, to allow hooks to be run before and after enrichment.
- The deploy.sh has been cleaned-up and enriched with the deploy URL replacement originaly done in netlify.toml.

Some alternate URLs has been changed or removed due to an enforcement of the rules regarding permalinks and alternate_urls (no more dots).

Closes #1206, #2709, #3409.
marcwrobel added a commit that referenced this issue Aug 19, 2023
Compared to the use of the validate.py script / validate.yaml workflow, this has the advantage of ensuring the validation is always performed. It also gives access to enriched data, which is useful for validated generated content, such as links.

In addition to checks already implemented in the previous 'validate.py' script, this script:

- Check that release dates are not too far in the future to avoid mistakes such as #3281 (max 30 days allowed).
- Check all links are valid (even those in the products description). This check takes time and is not performed by default, but it can be triggered by setting the MUST_CHECK_URLS environment variable to true. To ensure links are regularly verified a new GitHub workflow, check-links.yml, has also been added. It runs every sunday at midnight.

Note that:

- Some links had to be excluded from the link validation because, despite being valid, they are sometime or systematically returning an error.
- A dependency to open-uri (https://github.com/ruby/open-uri) has been added to simplify the validation of HTTP links.
- The priority of the ProductDataEnricher plugin had to be set to normal, to allow hooks to be run before and after enrichment.
- The deploy.sh has been cleaned-up and enriched with the deploy URL replacement originaly done in netlify.toml.

Some alternate URLs has been changed or removed due to an enforcement of the rules regarding permalinks and alternate_urls (no more dots).

Closes #1206, #2709, #3409.
@marcwrobel
Copy link
Member

The errors were visible in Netlify Post-processing logs, such as https://app.netlify.com/sites/endoflife-date/deploys/64e0a47ca0fe2f0007129028:

1:18:50 PM: Starting post processing
1:18:50 PM: Incorrect TOML configuration format: Escape sequence \: is reserved
1:18:51 PM: Skipping HTML post processing
1:18:51 PM: Incorrect TOML configuration format: Escape sequence \: is reserved
1:18:51 PM: Incorrect TOML configuration format: Escape sequence \: is reserved
1:18:51 PM: Post processing - header rules
1:18:52 PM: Incorrect TOML configuration format: Escape sequence \: is reserved
1:18:52 PM: Post processing - redirect rules
1:18:52 PM: Incorrect TOML configuration format: Escape sequence \: is reserved
1:18:52 PM: Post processing done
1:18:53 PM: Section completed: postprocessing
1:18:54 PM: Site is live ✨

In recent version (post #2859 merge), such as https://app.netlify.com/sites/endoflife-date/deploys/64e0a4148c837b000894a329, those errors cannot be seen anymore:

1:17:42 PM: Starting post processing
1:17:42 PM: Skipping HTML post processing
1:17:43 PM: Post processing - header rules
1:17:43 PM: Post processing - redirect rules
1:17:43 PM: Post processing done
1:17:43 PM: Section completed: postprocessing
1:17:44 PM: Site is live ✨

@marcwrobel marcwrobel linked a pull request Aug 19, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants