adoroszlai opened a new pull request, #10886: URL: https://github.com/apache/ozone/pull/10886
## What changes were proposed in this pull request? Automated config doc update failed after #10826 due to missing remote-tracking branch. This is fixed by trying to clone `automated-config-doc-update` first instead of `master`. This ensures we have the remote-tracking branch for if it exists. We don't need tracking branch for `master`. Reset `automated-config-doc-update` to `master` if exists but PR does not. https://issues.apache.org/jira/browse/HDDS-15922 ## How was this patch tested? Tested steps from CLI manually: ```bash $ git clone --depth=1 --branch=automated-config-doc-update https://github.com/apache/ozone-site.git ozone-site Cloning into 'ozone-site'... remote: Enumerating objects: 1230, done. remote: Counting objects: 100% (1230/1230), done. remote: Compressing objects: 100% (772/772), done. remote: Total 1230 (delta 560), reused 870 (delta 454), pack-reused 0 (from 0) Receiving objects: 100% (1230/1230), 89.50 MiB | 23.43 MiB/s, done. Resolving deltas: 100% (560/560), done. $ cd ozone-site $ git fetch --depth 1 origin master:master remote: Enumerating objects: 215, done. remote: Counting objects: 100% (215/215), done. remote: Compressing objects: 100% (147/147), done. remote: Total 154 (delta 48), reused 76 (delta 6), pack-reused 0 (from 0) Receiving objects: 100% (154/154), 15.76 MiB | 19.75 MiB/s, done. Resolving deltas: 100% (48/48), completed with 39 local objects. From https://github.com/apache/ozone-site * [new branch] master -> master $ git reset --hard master HEAD is now at 68b4186 HDDS-15171. [Auto] Update configuration documentation (#493) $ git push --dry-run --force-with-lease origin automated-config-doc-update To https://github.com/apache/ozone-site.git + 27b3fe8...68b4186 automated-config-doc-update -> automated-config-doc-update (forced update) ``` If branch does not exists: ```bash $ git clone --depth=1 --branch=master https://github.com/apache/ozone-site.git ozone-site Cloning into 'ozone-site'... warning: Could not find remote branch no-such-branch to clone. fatal: Remote branch no-such-branch not found in upstream origin $ git clone --depth=1 --branch=master https://github.com/apache/ozone-site.git ozone-site Cloning into 'ozone-site'... remote: Enumerating objects: 1323, done. remote: Counting objects: 100% (1323/1323), done. remote: Compressing objects: 100% (863/863), done. remote: Total 1323 (delta 568), reused 934 (delta 456), pack-reused 0 (from 0) Receiving objects: 100% (1323/1323), 105.24 MiB | 24.76 MiB/s, done. Resolving deltas: 100% (568/568), done. $ cd ozone-site $ git checkout -b "no-such-branch" master Switched to a new branch 'no-such-branch' $ git push --dry-run --force-with-lease origin no-such-branch To https://github.com/apache/ozone-site.git * [new branch] no-such-branch -> no-such-branch ``` -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
