potiuk commented on PR #71836:
URL: https://github.com/apache/airflow/pull/71836#issuecomment-5464163669
Thanks `ColtenOuO` — rebased on main and both addressed in d09afe6.
**The `continue`:** right, it's unreachable —
`_mark_latest_changes_as_documentation_only` always raises
`PrepareReleaseDocsChangesOnlyException`, and the other branch raises
`PrepareReleaseDocsNoChangesException`. Rather than leave that as an invariant
the reader has to reconstruct, I annotated both functions `-> NoReturn` and
dropped the `continue`, so mypy proves the unreachability instead of us
assuming it.
**First release:** good catch that no marker gets written, but writing one
turns out to be the wrong fix. `.latest-doc-only-change.txt` is only ever
*read* inside the branch where the current version's tag already exists
(`provider_documentation.py:450` and `:471`). A never-released provider never
reaches that branch, so a marker there would be inert — it wouldn't save the
redundant classification you were expecting — and read literally ("everything
after this commit is documentation") it would suppress the provider's first
release permanently.
What *was* wrong is the message: it said "No changes found", when in fact
there are changes and the real reason is that there is no earlier release to
diff against. That now says so, and the existing test is parametrized over both
paths.
---
Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]