Skip to content

fix(feature_store): safely parse bq:// URIs using removeprefix#6771

Open
mrishi wants to merge 1 commit into
googleapis:mainfrom
mrishi:fix-bq-uri-parsing
Open

fix(feature_store): safely parse bq:// URIs using removeprefix#6771
mrishi wants to merge 1 commit into
googleapis:mainfrom
mrishi:fix-bq-uri-parsing

Conversation

@mrishi
Copy link
Copy Markdown

@mrishi mrishi commented May 12, 2026

Description:
Fixed a bug in fetch_historical_feature_values where bq_uri.lstrip("bq://") was greedily stripping valid characters (such as 'b' or 'q') from the beginning of Google Cloud Project IDs.

Replaced lstrip with removeprefix to safely and explicitly remove only the protocol string without inadvertently mutating the project ID.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! (Note: Submitting this straightforward bug fix directly, but happy to open an issue retroactively if required!)
  • Ensure the tests and linter pass (Relying on CI checks for this 1-line change)
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary) (N/A - bug fix)
  • Get the necessary approvals
  • Once the last commit on the PR has been approved, add the "ready to pull" label to the Pull Request

Note: do not merge your PR from GitHub. Adding the "ready to pull" label is the final step in the review process.
After approvals, the changes in your PR will be committed to the main branch and this PR will be closed.

The previous implementation used `.lstrip("bq://")`, which greedily
dropped valid characters (like 'b' or 'q') from the beginning of
Google Cloud Project IDs.

Replaced `lstrip` with `removeprefix` to explicitly remove only
the protocol string without mutating the project ID.
@mrishi mrishi requested a review from a team as a code owner May 12, 2026 07:03
@product-auto-label product-auto-label Bot added size: xs Pull request size is extra small. api: vertex-ai Issues related to the googleapis/python-aiplatform API. labels May 12, 2026
@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 12, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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

Labels

api: vertex-ai Issues related to the googleapis/python-aiplatform API. size: xs Pull request size is extra small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant