Skip to content

chore: regenerate google-cloud-automl to resolve conflict#17132

Draft
chalmerlowe wants to merge 2 commits into
mainfrom
chore-update-automl-dependency
Draft

chore: regenerate google-cloud-automl to resolve conflict#17132
chalmerlowe wants to merge 2 commits into
mainfrom
chore-update-automl-dependency

Conversation

@chalmerlowe
Copy link
Copy Markdown
Contributor

Bump google-auth to >=2.26.1 to prevent dependency resolution issue and regenerate.

google-cloud-automl 2.19.0 depends on google-auth!=2.24.0, !=2.25.0, <3.0.0 and >=2.14.1
google-cloud-automl[pandas,storage] 2.19.0 depends on google-auth!=2.24.0, !=2.25.0, <3.0.0 and >=2.14.1
google-api-core 2.17.1 depends on google-auth<3.0.dev0 and >=2.14.1
google-api-core[grpc] 2.17.1 depends on google-auth<3.0.dev0 and >=2.14.1
google-cloud-storage 3.10.1 depends on google-auth<3.0.0 and >=2.26.1

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 introduces a post-processing configuration to update the google-auth dependency version in the AutoML client's setup.py to resolve a dependency conflict. The reviewer recommended using flexible regex patterns instead of hardcoded version strings in the search block to ensure the replacement logic remains robust against future version updates in the source code.

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.

medium

The before block uses hardcoded versions. According to the repository rules, search patterns for automated code replacements in librarian post-processing YAML files should 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. Also, ensure all special characters like [ are properly escaped.

    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",
          "grpcio >= [\s\S]*, < 2.0.0; python_version >= '[\s\S]*'",
          "proto-plus >= [\s\S]*, <2.0.0",
          "proto-plus >= [\s\S]*, <2.0.0; python_version >= '[\s\S]*'",
          "protobuf >= [\s\S]*, < 8.0.0",
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.

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

1 participant