Skip to content

[vale/report] Skip gracefully when lint uploads no artifact - #312

Merged
theletterf merged 2 commits into
mainfrom
fix/vale-report-missing-artifact
Aug 31, 2026
Merged

theletterf merged 2 commits into
mainfrom
fix/vale-report-missing-artifact

Conversation

@theletterf

@theletterf theletterf commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The vale/report action fails when the vale-results artifact doesn't exist — which happens whenever the Vale Lint workflow runs but finds no files to lint (has_files=false), so the lint step is skipped and no artifact is uploaded.
  • Adds a pre-check step that queries the GitHub API to verify whether the vale-results artifact exists on the lint run. All downstream steps are gated on that check.
  • If the artifact doesn't exist (expected: no files were linted), all steps are skipped and the action exits green. If the artifact exists but the download fails, the error propagates normally.

Root cause

In elastic/integrations, vale-lint.yml has a paths: trigger that matches packages/**/docs/README.md, but the "Select files to lint" step skips that file when _dev/build/docs/README.md exists in the same package. A PR touching only such files triggers the lint workflow but exits with has_files=false — no artifact is uploaded — which then causes the report action to fail at the download step.

Test plan

  • Verify a PR that touches no Vale-monitored files causes the report workflow to complete successfully (all steps after the pre-check are skipped).
  • Verify a PR that does touch Vale-monitored files still gets a comment posted as expected.

🤖 Generated with Claude Code

Related to #404

When the Vale Lint workflow runs but finds no files to lint
(has_files=false), the lint action is skipped and no vale-results
artifact is uploaded. The report action then fails at the download
step with "Artifact not found".

Add continue-on-error to the download step and gate all downstream
steps on steps.download.outcome == 'success', so the action exits
cleanly when there is nothing to report.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@theletterf
theletterf requested a review from a team as a code owner August 31, 2026 07:10
@theletterf
theletterf requested a review from reakaleek August 31, 2026 07:10
@github-actions

Copy link
Copy Markdown

Elastic Docs Style Checker (Vale)

Summary: 21 warnings, 19 suggestions found

⚠️ Warnings (21): Fix when the suggestion improves clarity or correctness.
File Line Rule Message
vale/test-fixtures/sample-violations.md 2 Elastic.MappedPages Avoid editing mapped_pages unless you are preserving an existing URL mapping. Talk with your local technical writer before changing this key.
vale/test-fixtures/sample-violations.md 6 Elastic.Articles Use 'an FAQ' instead of 'a FAQ'. The article depends on pronunciation, not spelling.
vale/test-fixtures/sample-violations.md 6 Elastic.Articles Use 'an HTML' instead of 'a HTML'. The article depends on pronunciation, not spelling.
vale/test-fixtures/sample-violations.md 6 Elastic.Articles Use 'an SQL' instead of 'a SQL'. The article depends on pronunciation, not spelling.
vale/test-fixtures/sample-violations.md 6 Elastic.Articles Use 'an HTML' instead of 'a HTML'. The article depends on pronunciation, not spelling.
vale/test-fixtures/sample-violations.md 7 Elastic.BritishSpellings Use American English spelling 'optimize' instead of British English 'optimise'.
vale/test-fixtures/sample-violations.md 7 Elastic.BritishSpellings Use American English spelling 'customize' instead of British English 'customise'.
vale/test-fixtures/sample-violations.md 7 Elastic.BritishSpellings Use American English spelling 'behavior' instead of British English 'behaviour'.
vale/test-fixtures/sample-violations.md 11 Elastic.DontUse Don't use 'just'. Choose a more precise or reader-focused term.
vale/test-fixtures/sample-violations.md 11 Elastic.DontUse Don't use 'please'. Choose a more precise or reader-focused term.
vale/test-fixtures/sample-violations.md 11 Elastic.DontUse Don't use 'aka'. Choose a more precise or reader-focused term.
vale/test-fixtures/sample-violations.md 20 Elastic.Articles Use 'an FAQ' instead of 'a FAQ'. The article depends on pronunciation, not spelling.
vale/test-fixtures/sample-violations.md 20 Elastic.Articles Use 'an HTML' instead of 'a HTML'. The article depends on pronunciation, not spelling.
vale/test-fixtures/sample-violations.md 20 Elastic.Articles Use 'an SQL' instead of 'a SQL'. The article depends on pronunciation, not spelling.
vale/test-fixtures/sample-violations.md 24 Elastic.BritishSpellings Use American English spelling 'optimize' instead of British English 'optimise'.
vale/test-fixtures/sample-violations.md 24 Elastic.BritishSpellings Use American English spelling 'customize' instead of British English 'customise'.
vale/test-fixtures/sample-violations.md 24 Elastic.BritishSpellings Use American English spelling 'behavior' instead of British English 'behaviour'.
vale/test-fixtures/sample-violations.md 40 Elastic.DontUse Don't use 'just'. Choose a more precise or reader-focused term.
vale/test-fixtures/sample-violations.md 40 Elastic.DontUse Don't use 'please'. Choose a more precise or reader-focused term.
vale/test-fixtures/sample-violations.md 40 Elastic.DontUse Don't use 'aka'. Choose a more precise or reader-focused term.
vale/test-fixtures/sample-violations.md 48 Elastic.Articles Use 'an HTML' instead of 'a HTML'. The article depends on pronunciation, not spelling.
💡 Suggestions (19): Optional style improvements. Apply when helpful.
File Line Rule Message
vale/test-fixtures/sample-violations.md 8 Elastic.WordChoice Consider using 'efficiently' instead of 'Simply', unless the term is in the UI.
vale/test-fixtures/sample-violations.md 8 Elastic.WordChoice Consider using 'allowlist' instead of 'whitelist', unless the term is in the UI.
vale/test-fixtures/sample-violations.md 8 Elastic.WordChoice Consider using 'blocklist' instead of 'blacklist', unless the term is in the UI.
vale/test-fixtures/sample-violations.md 9 Elastic.OxfordComma Use the Oxford comma in 'reading, writing and executing.'.
vale/test-fixtures/sample-violations.md 10 Elastic.Wordiness Consider using 'to' instead of 'In order to'.
vale/test-fixtures/sample-violations.md 10 Elastic.Wordiness Consider using 'because' instead of 'due to the fact that'.
vale/test-fixtures/sample-violations.md 10 Elastic.Wordiness Consider using 'many' instead of 'a large number of'.
vale/test-fixtures/sample-violations.md 12 Elastic.Exclamation Use exclamation points sparingly. Remove the exclamation point unless it appears in UI text.
vale/test-fixtures/sample-violations.md 12 Elastic.Exclamation Use exclamation points sparingly. Remove the exclamation point unless it appears in UI text.
vale/test-fixtures/sample-violations.md 28 Elastic.WordChoice Consider using 'efficiently' instead of 'Simply', unless the term is in the UI.
vale/test-fixtures/sample-violations.md 28 Elastic.WordChoice Consider using 'allowlist' instead of 'whitelist', unless the term is in the UI.
vale/test-fixtures/sample-violations.md 28 Elastic.WordChoice Consider using 'blocklist' instead of 'blacklist', unless the term is in the UI.
vale/test-fixtures/sample-violations.md 28 Elastic.WordChoice Consider using 'efficient' instead of 'easy', unless the term is in the UI.
vale/test-fixtures/sample-violations.md 32 Elastic.OxfordComma Use the Oxford comma in 'reading, writing and executing.'.
vale/test-fixtures/sample-violations.md 36 Elastic.Wordiness Consider using 'to' instead of 'In order to'.
vale/test-fixtures/sample-violations.md 36 Elastic.Wordiness Consider using 'because' instead of 'due to the fact that'.
vale/test-fixtures/sample-violations.md 36 Elastic.Wordiness Consider using 'many' instead of 'a large number of'.
vale/test-fixtures/sample-violations.md 44 Elastic.Exclamation Use exclamation points sparingly. Remove the exclamation point unless it appears in UI text.
vale/test-fixtures/sample-violations.md 44 Elastic.Exclamation Use exclamation points sparingly. Remove the exclamation point unless it appears in UI text.

The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

@theletterf theletterf self-assigned this Aug 31, 2026
@theletterf theletterf added the fix label Aug 31, 2026
@theletterf
theletterf enabled auto-merge (squash) August 31, 2026 07:12
Replace continue-on-error on the download step with an explicit API
check that queries whether vale-results exists on the lint run. Steps
are skipped only when no artifact was uploaded (expected when no files
were linted). A download failure for an artifact that does exist still
propagates as an error.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@theletterf
theletterf merged commit 336c92d into main Aug 31, 2026
13 checks passed
@theletterf
theletterf deleted the fix/vale-report-missing-artifact branch August 31, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants