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

Introduce GitHub Action to test resolvability of external links [DOC-253] #1382

Merged
merged 17 commits into from
Dec 9, 2024

Conversation

JackPGreen
Copy link
Contributor

@JackPGreen JackPGreen commented Nov 18, 2024

This PR adds an action that will, when a PR is opened, check the resolvability of any external links.

External links are defined as those using the http scheme - internal links between documentation is already covered by our existing dead links check.

Action is deliberately modular to be be easily applied to other docs repos.

This runs whenever a PR is raised, which is sub-optimal because:

  • links can break at any time as they reference external content
  • there's no guarantees the breakage is anything to do with the new PR

But the other alternative - a scheduled check - would have difficulty in knowing who to target a failure communication at to resolve the issues (other projects notify Slack channels, with varying degrees of responses).

An example of the output produced by this action can be found here.

Note that the external link check fails because of dead links, and won't pass until the following are addressed:

We should consider whether adding a check that we know will fail is a good idea - comparing the annoyance of a failing (non-blocking) test against the coverage that at least we can ensure things don't get worse.

Fixes: DOC-253

Copy link

netlify bot commented Nov 18, 2024

Deploy Preview for hardcore-allen-f5257d ready!

Name Link
🔨 Latest commit 42482a6
🔍 Latest deploy log https://app.netlify.com/sites/hardcore-allen-f5257d/deploys/67571992c77b2b00081801c2
😎 Deploy Preview https://deploy-preview-1382--hardcore-allen-f5257d.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 configuration.

@JackPGreen JackPGreen force-pushed the check-external-links branch 2 times, most recently from 8e7bdb9 to d21876c Compare November 18, 2024 21:30
@JackPGreen JackPGreen self-assigned this Nov 18, 2024
@JackPGreen JackPGreen requested a review from fantkolja November 18, 2024 22:12
@JackPGreen JackPGreen marked this pull request as ready for review November 18, 2024 22:12
@JackPGreen JackPGreen changed the title Check external links [DOC-253] Introduce GitHub Action to test resolvability of external links [DOC-253] Nov 18, 2024
Copy link
Contributor

@fantkolja fantkolja left a comment

Choose a reason for hiding this comment

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

Very nice!
The only thing - probably some URLs aren't properly parsed, so there are a lot of bad/illegal format or missing URL logs

image

@JackPGreen
Copy link
Contributor Author

Very nice! The only thing - probably some URLs aren't properly parsed, so there are a lot of bad/illegal format or missing URL logs

Fixed with workaround - 7a78108

Updated output - https://github.com/hazelcast/hz-docs/actions/runs/11907767488

@fantkolja fantkolja self-requested a review November 19, 2024 07:01
@JackPGreen JackPGreen requested a review from a team as a code owner November 20, 2024 11:07
JackPGreen added a commit that referenced this pull request Nov 25, 2024
The test developed in #1382
flagged multiple dead links.

This PR fixes those _seperately_ to prove the status of the test.

Note the changes from `install-hazelcast.adoc` ~~copy from~~ overlap
with #1355.
@JackPGreen
Copy link
Contributor Author

JackPGreen commented Nov 25, 2024

Suggestion was to notify put on a cron schedule and have it notify a private docs slack channel.

@oliverhowell if you can send me a Slack webhook url for that channel I can do the rest.

@JackPGreen JackPGreen marked this pull request as draft December 9, 2024 15:32
@JackPGreen JackPGreen marked this pull request as ready for review December 9, 2024 16:23
@JackPGreen JackPGreen merged commit 8d27567 into hazelcast:main Dec 9, 2024
2 checks passed
@JackPGreen JackPGreen deleted the check-external-links branch December 9, 2024 16:24
JackPGreen added a commit to JackPGreen/hz-docs that referenced this pull request Dec 19, 2024
The test developed in hazelcast#1382
flagged multiple dead links.

This PR fixes those _seperately_ to prove the status of the test.

Note the changes from `install-hazelcast.adoc` ~~copy from~~ overlap
with hazelcast#1355.
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.

3 participants