-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: fix verify_library_generation.yaml for forks #2716
Conversation
@@ -21,7 +21,9 @@ jobs: | |||
run: | | |||
set -ex | |||
git checkout "${base_ref}" | |||
git fetch --no-tags --prune origin +${base_ref}:refs/remotes/origin/${base_ref} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why git fetch
after git checkout
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't actually matter too much for L23-L24, but it's needed for L25/26 so that it can find the forked branches. I can revert this line if preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's not actually useful, I think we should revert it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think we do need it. Added some comments to explain.
git checkout "${head_ref}" | ||
git fetch --no-tags --prune origin +${head_ref}:refs/remotes/origin/${head_ref} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move this line before git checkout "${head_ref}"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments to explain
…into fixVerify_library_generation
…gleapis/sdk-platform-java into fixVerify_library_generation
Co-authored-by: Joe Wang <[email protected]>
Quality Gate passed for 'gapic-generator-java-root'Issues Measures |
Quality Gate passed for 'java_showcase_integration_tests'Issues Measures |
#2716 didn't quite fix what it should have. Follow up to fix the error: ``` Previous HEAD position was e54601f Merge 30c7c5b into 5d4567f Switched to a new branch 'main' branch 'main' set up to track 'origin/main'. + git fetch --no-tags --prune origin +main:refs/remotes/origin/main From https://github.com/googleapis/sdk-platform-java - [deleted] (none) -> origin/main + git checkout renovate/markupsafe-2.x error: pathspec 'renovate/markupsafe-2.x' did not match any file(s) known to git ``` --------- Co-authored-by: Joe Wang <[email protected]>
PRs opened by renovate-bot are failing `verify_library_generation` because renovate-bot opens PRs from a fork rather than main. For instance #2657 is failing: ``` env: base_ref: main head_ref: renovate/markupsafe-2.x + git checkout main Previous HEAD position was d84e607 Merge 645951c into 766646a[13](https://github.com/googleapis/sdk-platform-java/actions/runs/8914757209/job/24482995077?pr=2657#step:3:13)3d1465dca Switched to a new branch 'main' branch 'main' set up to track 'origin/main'. + git checkout renovate/markupsafe-2.x error: pathspec 'renovate/markupsafe-2.x' did not match any file(s) known to git ``` This updates the yaml file to explicitly fetch specific branches which should fix the issue. --------- Co-authored-by: Joe Wang <[email protected]>
#2716 didn't quite fix what it should have. Follow up to fix the error: ``` Previous HEAD position was e54601f Merge 30c7c5b into 5d4567f Switched to a new branch 'main' branch 'main' set up to track 'origin/main'. + git fetch --no-tags --prune origin +main:refs/remotes/origin/main From https://github.com/googleapis/sdk-platform-java - [deleted] (none) -> origin/main + git checkout renovate/markupsafe-2.x error: pathspec 'renovate/markupsafe-2.x' did not match any file(s) known to git ``` --------- Co-authored-by: Joe Wang <[email protected]>
PRs opened by renovate-bot are failing
verify_library_generation
because renovate-bot opens PRs from a fork rather than main.For instance #2657 is failing:
This updates the yaml file to explicitly fetch specific branches which should fix the issue.