Skip to content

Improve error message when publish-docs ref is a branch not a tag#66250

Open
shahar1 wants to merge 2 commits intoapache:mainfrom
shahar1:fix/publish-docs-tag-error-message
Open

Improve error message when publish-docs ref is a branch not a tag#66250
shahar1 wants to merge 2 commits intoapache:mainfrom
shahar1:fix/publish-docs-tag-error-message

Conversation

@shahar1
Copy link
Copy Markdown
Contributor

@shahar1 shahar1 commented May 2, 2026

When running breeze workflow-run publish-docs --ref providers/YYYY-MM-DD-docs ... without --skip-tag-validation, the error message was misleading:

Error: Ref providers/2026-04-26-docs does not exists in repo apache/airflow

This is confusing because the ref does exist — just as a branch, not a tag. The new behaviour:

  1. When the tag check fails, additionally checks if the ref exists as a branch via gh api repos/apache/airflow/git/refs/heads/{ref}.
  2. If it is a branch, emits a clear, actionable message pointing to --skip-tag-validation.
  3. If neither tag nor branch exists, falls back to an (also grammatically fixed) generic message.

This is particularly relevant for the "Fixing released documentation" workflow documented in dev/README_RELEASE_PROVIDERS.md, where a -docs branch is created and used as the ref.


Was generative AI tooling used to co-author this PR?
  • Yes — GitHub Copilot (Claude Sonnet 4.6)

Generated-by: GitHub Copilot (Claude Sonnet 4.6) following the guidelines

Copy link
Copy Markdown
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

A few small static-check fixes — prek run --files <both files> passes clean after these and all 4 tests still pass.


Drafted-by: Claude Code (Opus 4.7); reviewed by @potiuk before posting

Comment thread dev/breeze/tests/test_workflow_commands.py
Comment thread dev/breeze/tests/test_workflow_commands.py
Comment thread dev/breeze/tests/test_workflow_commands.py
Comment thread dev/breeze/tests/test_workflow_commands.py
@shahar1 shahar1 force-pushed the fix/publish-docs-tag-error-message branch from ee7eeff to 6bb3a5d Compare May 2, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants