Skip to content

fix: correct lychee exit code handling#1960

Open
Haleshot wants to merge 2 commits into
cocoindex-io:mainfrom
Haleshot:haleshot/link-config-validate
Open

fix: correct lychee exit code handling#1960
Haleshot wants to merge 2 commits into
cocoindex-io:mainfrom
Haleshot:haleshot/link-config-validate

Conversation

@Haleshot
Copy link
Copy Markdown
Contributor

@Haleshot Haleshot commented May 10, 2026

Fixes the link checker workflow that was silently passing despite broken links in the latest run.

Turned out there were a few compounding issues: lychee actually exits with 2 for broken links (not 1), so the old == 1 condition never fired. The issue creation step also needed to come before the fail step, otherwise it gets skipped.

And scheduled runs were restoring a stale cache, so URLs that were valid before the v1 branch was deleted kept passing on daily checks; fixed by skipping cache restore on scheduled runs entirely. Also cleaned up v1 from the branch triggers since that branch no longer exists :)

Haleshot added 2 commits May 10, 2026 23:39
…eduled runs

Signed-off-by: Srihari Thyagarajan <hari.leo03@gmail.com>
…ror on PRs

Signed-off-by: Srihari Thyagarajan <hari.leo03@gmail.com>
@Haleshot
Copy link
Copy Markdown
Contributor Author

The CI fail (expected) is now correctly catching the broken v1 links still in main. Will go green once the doc-fix PR merges: #1959

Copy link
Copy Markdown
Member

@georgeh0 georgeh0 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

on:
pull_request:
branches: [main, v1]
branches: [main]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we add v0 here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you still accept changes pushed to v0?

If so, I can add v0 to both the pull_request and push branch filters. If it is archived/frozen, keeping only main seems cleaner?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@georgeh0 may take a look?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure, let me know :)

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