Skip to content

fix: updates automl dependency and missing pandas install#17133

Draft
chalmerlowe wants to merge 10 commits into
mainfrom
fix-automl-dependency-and-pandas
Draft

fix: updates automl dependency and missing pandas install#17133
chalmerlowe wants to merge 10 commits into
mainfrom
fix-automl-dependency-and-pandas

Conversation

@chalmerlowe
Copy link
Copy Markdown
Contributor

@chalmerlowe chalmerlowe commented May 14, 2026

Resolves several issues that cause CI/CD to fail.

CHANGES:

  • Update post-processing to bump google-auth to >=2.26.1 to prevent dependency resolution issue.
  • Update post-processing to ensure pandas is installed as an extra.
  • Move post-processing yaml elements to a standalone automl-integration.yaml file.

Fixes #17131 🦕

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The search pattern for dependencies has two issues that should be addressed:

  1. 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.
  2. 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
  1. 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",
\ \)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is an unnecessary backslash before the indentation spaces. This will likely cause the regex to fail to match the intended line in noxfile.py. Indentation in YAML block scalars is preserved, so you should just use spaces to match the indentation of the target code.

          \)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: google-cloud-automl install fails due to conflict around google-auth version

2 participants