HDDS-15922. Fix ozone-site config doc workflow reusing stale PR branch#10826
HDDS-15922. Fix ozone-site config doc workflow reusing stale PR branch#10826sravani-revuri wants to merge 1 commit into
Conversation
sarvekshayr
left a comment
There was a problem hiding this comment.
Thanks @sravani-revuri for working on this.
The current fix always recreates the branch from master and force-pushes, which solves the stale-branch problem after merge, but it introduces a regression for open PRs.
While a config-doc PR is still open, each new ozone config change should append a commit to automated-config-doc-update, so reviewers can see which change introduced which update. Resetting from master on every run collapses that into a single commit and loses branch history.
Suggested fix:
Open PR exists → fetch the PR branch, append a new commit, normal push (preserve multi-commit history).
No open PR → branch from master, one commit, force-push (avoids already-merged commits from a stale remote branch).
What changes were proposed in this pull request?
The update-ozone-site-config-doc workflow in the ozone repo checks out the automated-config-doc-update branch in ozone-site when it still exists after a PR is merged. New commits are added on top of that stale branch, so already-merged changes show up again in the next PR.
Workaround: Delete automated-config-doc-update in ozone-site after each merge.
Fix: Always use master as the baseline - compare doc changes against master, recreate the PR branch from master. Branch deletion after merge should no longer be required.
Example:
apache/ozone-site#487 merged commits 68268fa and a8e25a6 but branch not deleted.
apache/ozone-site#493 same commits have reappeared here.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15922
How was this patch tested?
(Please explain how this patch was tested. Ex: unit tests, manual tests, workflow run on the fork git repo.)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this.)