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

Added markdown-link-check to azure-pipelines.yml #1974

Merged
merged 9 commits into from
Nov 4, 2022

Conversation

Jimmys20
Copy link
Contributor

@Jimmys20 Jimmys20 commented Nov 3, 2022

This PR adds markdown-link-check to azure-pipelines.yml. It is already added to .vsts-ci.yml as part of #1970.

Seems to be working now. I wonder if the script should be modified to allow it to continue scanning after a problematic link is found and maybe show warning instead of throwing. Sometimes links might be temporary down like in this case, hackernoon.com is down and the script stopped execution but it would be nice if it continued scanning.

Also https://www.digikey.com/ got Status: 403 Forbidden which is interesting. Never had that happen while testing locally.

Microsoft Reviewers: Open in CodeFlow

@Jimmys20 Jimmys20 marked this pull request as draft November 3, 2022 15:11
@Jimmys20 Jimmys20 marked this pull request as ready for review November 3, 2022 15:12
@krwq krwq requested a review from joperezr November 3, 2022 15:46
@joperezr joperezr self-assigned this Nov 3, 2022
@joperezr
Copy link
Member

joperezr commented Nov 3, 2022

Hello @Jimmys20, thank you so much for the contribution. We discussed this PR during triage and decided that it was probably better if we had this step to run on its own job in order for it to be easier for us to diagnose the reason for a failing build. I hope you don't mind, but I took the liberty to push the appropriate changes into your PR in order to adjust for that.

@joperezr
Copy link
Member

joperezr commented Nov 3, 2022

@Jimmys20 would you mind also checking why we are now getting another failure? I'd rather add more patterns to skip but keep the check green before we merge.

@Jimmys20
Copy link
Contributor Author

Jimmys20 commented Nov 3, 2022

Looks like it's not very consistent with the external URLs. I committed a change (added verbose logging) which made the task rerun and now it stopped in a different URL. It is strange because all links are reported either as alive or ignored when I run the command on my computer. I don't get any broken links. Can you reproduce the azure pipelines behavior on your computer?

mdlc

mdlc2

mdlc3

@krwq
Copy link
Member

krwq commented Nov 4, 2022

@Jimmys20 for links which you are 100% sure they are not going down anytime soon (Ali Express or digi key) you can just add them to the ignore list permanently (pointless even to make web-request).

Also another option you can setup retryCount and some delay: https://github.com/tcort/markdown-link-check#config-file-format

@Jimmys20
Copy link
Contributor Author

Jimmys20 commented Nov 4, 2022

Execute markdown-link-check job completed successfully!

@pgrawehr
Copy link
Contributor

pgrawehr commented Nov 4, 2022

@krwq aliexpress isn't going down anytime soon, but the deep links within it (e.g. to a product) surely can.

@krwq
Copy link
Member

krwq commented Nov 4, 2022

@pgrawehr I know but the specific link shared was a root path :)

@krwq krwq merged commit a01de1b into dotnet:main Nov 4, 2022
@krwq
Copy link
Member

krwq commented Nov 4, 2022

Thanks @Jimmys20!

@Jimmys20 Jimmys20 deleted the markdown-link-check branch November 4, 2022 22:05
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants