-
Notifications
You must be signed in to change notification settings - Fork 52
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: Add renovate bot config validation workflow #2404
Conversation
Commit (948d393) resulted in check error, as expected. Hence confirmed it is workin on this repository. |
Confirming behaviour for one of downstream repos: check run on java-logging-logback outputs this config, which matches with the actual config. So it should be working for others as well (hopefully). If needed, I can confirm the behaviour in the failure case as well (modify google-cloud-java renovate incorrectly, run the check again, verify, revert the changes). |
.github/workflows/ci.yaml
Outdated
@@ -321,3 +321,20 @@ jobs: | |||
uses: ./java-shared-dependencies/unmanaged-dependency-check | |||
with: | |||
bom-path: gapic-generator-java-bom/pom.xml | |||
|
|||
renovate_config_check: |
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.
Can you make this as independent workflow?
Then I think of 2 options:
- workflow dispatch to periodically validate the config files in ~13 repositories. It's installed in sdk-platform-java.
- workflow for pull requests that touches renovate.json. It's installed in every ~13 repositories via synthtool template.
What is the trade off?
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.
synthool is better, periodically validating makes no sense if we can run it upon every touch to renovate.json
Raised googleapis/synthtool#1920
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.
Trade off:
- Using manual workflow dispatch for periodic validation is not a good idea because
(a) Manual invocation required everytime
(b) If there is an error in the config, we would get to know about it only when we run this check manually. - Using synthtool, this check will be installed as an independent workflow in each repository, running on every commit to config file, hence catching errors as and when they are about to be committed. This way we can catch the error faster and better. Cons about this is the maintenance toil via the synthool template.
Hence going with synthool.
.kokoro/presubmit/common.sh
Outdated
@@ -87,3 +87,9 @@ function find_last_release_version { | |||
parts=($(echo "$primary_artifact" | tr ":" "\n")) | |||
echo "${parts[1]}" | |||
} | |||
|
|||
function validate_renovate_config { |
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.
I see the command is in the workflow YAML file. This seems unnecessary.
Quality Gate passed for 'gapic-generator-java-root'Kudos, no new issues were introduced! 0 New issues |
Quality Gate passed for 'java_showcase_integration_tests'Kudos, no new issues were introduced! 0 New issues |
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.
Update the pull request description.
Changes in this PR introduce renovate bot config validation workflow for this repository. Upon every commit to "renovate.json" file, this check will run.