Skip to content

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

Merged
shahar1 merged 5 commits into
apache:mainfrom
shahar1:fix/publish-docs-tag-error-message
May 12, 2026
Merged

Improve error message when publish-docs ref is a branch not a tag#66250
shahar1 merged 5 commits into
apache: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 with --ref pointing to a docs branch (for example providers/YYYY-MM-DD-docs) and without --skip-tag-validation, the previous error implied the ref did not exist.

Actual problem: ref existed as branch, but command only checked tags.

This PR changes validation flow:

  1. Check tag ref first.
  2. If tag is missing, check branch ref.
  3. If branch exists, show clear actionable error pointing to --skip-tag-validation.
  4. If neither exists, show generic "not found as tag or branch" message.

Tests added/updated for:

  1. Valid tag path.
  2. Branch-only path with actionable message.
  3. Missing tag and missing branch path.
  4. --skip-tag-validation bypass path.

Was generative AI tooling used to co-author this PR?
  • Yes — GitHub Copilot (GPT-5.3-Codex)

Generated-by: GitHub Copilot (GPT-5.3-Codex) following the guidelines


Drafted-by: GitHub Copilot (GPT-5.3-Codex) (no human review before posting)

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 Outdated
Comment thread dev/breeze/tests/test_workflow_commands.py Outdated
Comment thread dev/breeze/tests/test_workflow_commands.py Outdated
Comment thread dev/breeze/tests/test_workflow_commands.py Outdated
@shahar1 shahar1 force-pushed the fix/publish-docs-tag-error-message branch from ee7eeff to 6bb3a5d Compare May 2, 2026 15:51
Copy link
Copy Markdown
Contributor

@bugraoz93 bugraoz93 left a comment

Choose a reason for hiding this comment

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

Looks good! Static checks still failing

@shahar1 shahar1 force-pushed the fix/publish-docs-tag-error-message branch from 6bb3a5d to 971ed8d Compare May 5, 2026 18:41
@potiuk
Copy link
Copy Markdown
Member

potiuk commented May 10, 2026

Needs rebase @shahar1

@shahar1 shahar1 force-pushed the fix/publish-docs-tag-error-message branch from 971ed8d to bc46b60 Compare May 10, 2026 18:27
@shahar1 shahar1 merged commit 6425fb7 into apache:main May 12, 2026
142 checks passed
@shahar1 shahar1 deleted the fix/publish-docs-tag-error-message branch May 12, 2026 14:58
@github-actions
Copy link
Copy Markdown
Contributor

Backport successfully created: v3-2-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test PR Link

potiuk pushed a commit that referenced this pull request May 17, 2026
…ot a tag (#66250) (#66776)

(cherry picked from commit 6425fb7)

Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
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.

5 participants