feat: regenerate asset w/ dependencies using generator v1.32.0#17153
feat: regenerate asset w/ dependencies using generator v1.32.0#17153chalmerlowe wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request enables code generation for the google-cloud-asset package, drops support for Python 3.9, and updates several dependency constraints. Key changes include fixing asynchronous calls in generated samples, updating Python version warnings, and refining test assertions for REST parameter comparison. Review feedback identifies critical issues in the new post-processing YAML file, specifically the use of fragile hardcoded versions and pattern mismatches that will likely cause replacement failures. Additionally, the removal of the warnings-as-errors flag in the documentation build was flagged as a violation of standards regarding shared configuration changes.
| before: | | ||
| dependencies = \[ | ||
| "google-api-core\[grpc\] >= 2.17.1, <3.0.0", | ||
| # Exclude incompatible versions of `google-auth` | ||
| # See https://github.com/googleapis/google-cloud-python/issues/12364 | ||
| "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", | ||
| "grpcio >= 1.44.0, < 2.0.0", |
There was a problem hiding this comment.
The before block uses hardcoded versions which makes the replacement fragile. Per the repository rules, use flexible regex patterns like [\s\S]* to match version strings instead of hardcoding specific versions. This ensures the replacement logic remains functional even when dependency versions are updated in the source files, preventing match failures.
before: |
dependencies = [
"google-api-core[grpc] >= [\s\S]*, <3.0.0",
# Exclude incompatible versions of `google-auth`
# See https://github.com/googleapis/google-cloud-python/issues/12364
"google-auth >= [\s\S]*, <3.0.0,!=2.24.0,!=2.25.0",
"grpcio >= [\s\S]*, < 2.0.0",References
- When defining search patterns for automated code replacements in librarian post-processing YAML files, use flexible regex patterns (such as [\s\S]*) to match version strings instead of hardcoding specific versions.
| before: | | ||
| google-api-core==2.17.1 | ||
| google-auth==2.14.1 |
There was a problem hiding this comment.
The before block for constraints-3.10.txt expects pinned versions (google-api-core==2.17.1), but the source file (as seen in the diff's LEFT side) contains unpinned library names. This replacement will likely fail to match and apply if the generator still outputs unpinned names.
before: |
google-api-core
google-auth| session.run( | ||
| "sphinx-build", | ||
| "-W", # warnings as errors | ||
| "-T", # show full traceback on exception |
There was a problem hiding this comment.
The -W flag (warnings as errors) has been removed from the sphinx-build command. Changes to shared configurations should be applied consistently across all relevant packages in a dedicated, universal change rather than piecemeal in individual pull requests. If this flag needs to be changed, it should be done as a repository-wide update.
References
- Changes to shared configurations, like mypy flags, should be applied consistently across all relevant packages in a dedicated, universal change rather than piecemeal in individual pull requests.
d94f5ca to
8f6927d
Compare
|
So was everything other than the content of librarian.yaml and the post-processing scripts generated with Librarian? If so, |
Updates post processing to account for dropping support for Python 3.7, 3.8, 3.9 and impacts that has on using 3.10 for lower bounds testing. Bumps `google-auth` to `>=2.23.3` to prevent dependency resolution issue when used in sync with `google-cloud-storage` Corrects a deficiency in the constraints template that did not capture all the necessary bounds from `setup.py` Partially corrects #17153 🦕
yes, yes, it was!! |
Updates post processing to account for dropping support for Python 3.7, 3.8, 3.9 and impacts that has on using 3.10 for lower bounds testing.
Adds
google-cloud-org-policytopost-processingfor insertion intogoogle-cloud-assetfiles:setup.pyconstraints-3.10.txtgoogle-cloud-assetwas failing to regenerate successfully due to missing dependency on org-policy.Partially corrects #17152 🦕