-
Notifications
You must be signed in to change notification settings - Fork 86
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
Owlbot should keep track of custom modifications to templates #1798
Comments
If you add integration.cfg to the list of excludes here |
|
I see. That logic can be coded into owlbot.py and synthtool. In other words, it's a feature request for your post processor (https://github.com/googleapis/synthtool). |
Transferring to appropriate repo and reopening. |
The problem is that the granularity of owlbot.py exclusion logic (implemented by Rough idea 1: Somehow we use Git's merging capability. Rough idea 2: INTEGRATION_TEST_ARGS to be in independent file that the build.sh reads if one exists. I'll think more. |
@suztomo just building off of your second idea a bit - something similar to https://github.com/googleapis/java-bigtable/blob/main/.readme-partials.yml which inserts custom things into our READMEs could work here as well. Would also work nicely if new environment variables need to be introduced in the future. |
Found that https://github.com/googleapis/synthtool/blob/master/synthtool/gcp/partials.py Thank you for information. Is INTEGRATION_TEST_ARGS the only thing we should worry about?This is the list of files excluded from templating.
|
In addition to INTEGRATION_TEST_ARGS, there are other environment variables that differ from the template: gcloud-devel BIGTABLE_TESTING_INSTANCE. Now I'm feeing a solution similar to .readme-partials.yml is better to accommodate different needs |
@suztomo once googleapis/java-datastore#1102 is merged, we will also have |
@kolea2 Got it. Idea of partial files for env_vars
When OwlBot post processor generates the templated file with ".cfg", it looks for
What about other fields than env_vars?For now I focus on env_vars only. This design allows us to extend other fields than env_vars. |
@suztomo I found that I can add an additional parameter to Then in owlbot.py, to load partials:
WDYT? |
@JoeWang1127 Good start. Before implementing it, would you write down what ".kokoro/nightly/integration.cfg-partials.yaml" would look like? |
This is a sample of
In the template, we need to add the following section:
|
@JoeWang1127 What about the difference between gcloud-devel proejct and java-docs-samples-testing project?
|
The contents of partials can only be inserted into templates, so two env_vars can't be merged even if they have the same |
Good. Then the current load_partials does not work well for the cfg files. Would you design something better? Start with an ideal |
I think
If the key is not presented in the template, then the key-value pair is inserted to the template; otherwise the value will be overwritten. Something like you mentioned. The template needs redesign and a new file |
It reads as if it only takes care of envvars implicitly. |
In the template, it says the format of integration.cfg is defined in If we need other keys besides
|
I feel the 1st line "kokoro_nightly_integration:" is redundant, assuming |
I use I think I can parse the file name so that all key-value pairs in Then
|
@JoeWang1127 thanks for digging into this! One question - I noticed you're specifying the |
Hi @kolea2, you can specify customized For example, if you want to define I mainly focus on Does this sound good to you? |
Since I haven't heard more feedback, I'll start to implement as #1798 (comment) |
We have some examples of libraries that make modifications to otherwise standard templates. For example, https://github.com/googleapis/java-bigtable/blob/main/.kokoro/presubmit/integration.cfg#L9-L12 adds custom IT args to this standard template: https://github.com/googleapis/synthtool/blob/master/synthtool/gcp/templates/java_library/.kokoro/presubmit/integration.cfg. As such, we need to exclude it from owlbot and any new iterations of these templates need to be handled manually (see googleapis/java-bigtable#1255 and fix googleapis/java-bigtable#1258).
It would be great if owlbot could preserve known additions to templates so we can still receive updates without having to do manual work on them in a repeated way.
The text was updated successfully, but these errors were encountered: