fix: updates automl dependency and missing pandas install#17133
Draft
chalmerlowe wants to merge 10 commits into
Draft
fix: updates automl dependency and missing pandas install#17133chalmerlowe wants to merge 10 commits into
chalmerlowe wants to merge 10 commits into
Conversation
This reverts commit 0d16d46.
Contributor
There was a problem hiding this comment.
Code Review
This pull request enables generation for the automl library and introduces a post-processing configuration to update google-auth dependencies, add extra requirements, and export new clients. Feedback suggests improving the robustness of the post-processing regex patterns by using flexible version matching instead of hardcoded strings and correcting syntax errors in the search patterns, such as unescaped brackets and unnecessary backslashes in indentation.
Comment on lines
+20
to
+30
| 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", | ||
| "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", | ||
| "proto-plus >= 1.22.3, <2.0.0", | ||
| "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", | ||
| "protobuf >= 4.25.8, < 8.0.0", |
Contributor
There was a problem hiding this comment.
The search pattern for dependencies has two issues that should be addressed:
- Hardcoded Versions: It hardcodes specific version strings for multiple dependencies (e.g.,
grpcio,proto-plus). According to the general rules, you should use flexible regex patterns (like.*or[\s\S]*) to match version strings. This ensures the replacement continues to work even if the generated versions change in the future. - Regex Error: On line 22, the opening bracket in
[grpc\]is not escaped. It should be\[grpc\]to correctly match the literal string[grpc]. Without the escape, it will be treated as a regex character class, which will cause the match to fail.
Consider using a more flexible pattern for the versions to improve robustness.
before: |
dependencies = \[
"google-api-core\[grpc\] .*",
# Exclude incompatible versions of `google-auth`
# See https://github.com/googleapis/google-cloud-python/issues/12364
"google-auth .*",
"grpcio .*",
"grpcio .*",
"proto-plus .*",
"proto-plus .*",
"protobuf .*",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. This ensures the replacement logic remains functional even when dependency versions are updated in the source files, preventing match failures.
| ] | ||
| before: | | ||
| "types-protobuf", | ||
| \ \) |
Contributor
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves several issues that cause CI/CD to fail.
CHANGES:
automl-integration.yamlfile.Fixes #17131 🦕