Skip to content

feat(storage): add IpFilter support to bucket metadata - #20

Open
thiyaguk09 wants to merge 65 commits into
mainfrom
feat/bucket-ip-filter
Open

feat(storage): add IpFilter support to bucket metadata#20
thiyaguk09 wants to merge 65 commits into
mainfrom
feat/bucket-ip-filter

Conversation

@thiyaguk09

Copy link
Copy Markdown
Owner

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! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

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

Copy link
Copy Markdown

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 configuration support for a bucket's IP Filter (IpFilter) within BucketMetadata, along with corresponding unit and system tests. The review feedback suggests improving type safety by using a union of string literals ('Enabled' | 'Disabled') for the mode property, and allowing null on the ipFilter property to properly support clearing or deleting the filter.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread handwritten/storage/src/bucket.ts Outdated
Comment thread handwritten/storage/src/bucket.ts Outdated
Comment thread handwritten/storage/system-test/storage.ts Outdated
Comment thread handwritten/storage/system-test/storage.ts Outdated
Comment thread handwritten/storage/test/bucket.ts
@thiyaguk09
thiyaguk09 force-pushed the feat/bucket-ip-filter branch from d249f48 to c59527f Compare June 12, 2026 15:13
@thiyaguk09
thiyaguk09 force-pushed the feat/bucket-ip-filter branch from c59527f to fcbcdf2 Compare June 12, 2026 15:14
thiyaguk09 and others added 30 commits July 21, 2026 04:50
🤖 I have created a release *beep* *boop*
---


<details><summary>pack-n-play: 5.0.1</summary>

##
[5.0.1](googleapis/google-cloud-node@pack-n-play-v5.0.0...pack-n-play-v5.0.1)
(2026-08-05)


### Bug Fixes

* **core:** Discovery url handling, error code review helper, and
pack-n-play test timeouts
([googleapis#9061](googleapis#9061))
([340364f](googleapis@340364f))
</details>

<details><summary>gcp-metadata: 9.0.1</summary>

##
[9.0.1](googleapis/google-cloud-node@gcp-metadata-v9.0.0...gcp-metadata-v9.0.1)
(2026-08-05)


### Bug Fixes

* **core:** Discovery url handling, error code review helper, and
pack-n-play test timeouts
([googleapis#9061](googleapis#9061))
([340364f](googleapis@340364f))
</details>

<details><summary>googleapis-common: 9.0.1</summary>

##
[9.0.1](googleapis/google-cloud-node@googleapis-common-v9.0.0...googleapis-common-v9.0.1)
(2026-08-05)


### Bug Fixes

* **core:** Discovery url handling, error code review helper, and
pack-n-play test timeouts
([googleapis#9061](googleapis#9061))
([340364f](googleapis@340364f))
</details>

<details><summary>bigquery: 9.0.1</summary>

##
[9.0.1](googleapis/google-cloud-node@bigquery-v9.0.0...bigquery-v9.0.1)
(2026-08-05)


### Bug Fixes

* **bigquery:** Remove owlbot configs
([googleapis#8936](googleapis#8936))
([7f8e23c](googleapis@7f8e23c))
</details>

<details><summary>bigtable: 7.1.0</summary>

##
[7.1.0](googleapis/google-cloud-node@bigtable-v7.0.0...bigtable-v7.1.0)
(2026-08-05)


### Features

* **bigtable:** Split gapic and proto usage from the handwritten library
into bigtable-api
([googleapis#8934](googleapis#8934))
([f63f914](googleapis@f63f914))
</details>

<details><summary>databasecenter: 0.4.1</summary>

##
[0.4.1](googleapis/google-cloud-node@databasecenter-v0.4.0...databasecenter-v0.4.1)
(2026-08-05)


### Bug Fixes

* Upgrade types sinon for databasecenter
([googleapis#9098](googleapis#9098))
([23aee11](googleapis@23aee11))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…apis#9099)

Add Node.js 22 and pnpm v7 runtime setup steps to
`.github/workflows/generation_check.yaml` prior to tool installation and
generation verification.

On default GitHub hosted CI runners (`ubuntu-latest`), `pnpm` is not
pre-installed on the system `$PATH`, so executing `librarian install`
immediately fails due to `exec: "pnpm": executable file not found in
$PATH`.
…googleapis#9106)

## Description

This PR delivers **Full Connection Pooling (`Pool`)** for
`@google-cloud/spanner-driver`, providing a high-performance, robust,
and `node-postgres` ([`pg.Pool`](https://node-postgres.com/apis/pool) )
compatible connection manager for Google Cloud Spanner.

---

## Key Changes & Capabilities

###  `PoolConfig` Interface & Options
Introduced the `PoolConfig` interface with full support for all 8
connection management options:
- `max`: Maximum active and idle connections managed by the pool
(default: `10`).
- `min`: Minimum idle connections protected from eviction (default:
`0`).
- `idleTimeoutMillis`: Idle connection reaping timeout (default: `10000`
ms).
- `connectionTimeoutMillis`: Dual-scope timeout enforcing limits on both
client handshake/connect and queue wait times (default: `0` /
indefinite).
- `allowExitOnIdle`: Unrefs background timers to allow Node.js event
loop / CLI processes to exit cleanly when idle (default: `false`).
- `maxUses`: Connection recycling limit after a specified number of
checkouts (default: `Infinity`).
- `maxLifetimeSeconds`: Connection retirement limit based on connection
age (default: `0` / disabled).
- `onConnect`: Async initialization hook executed once when a new
connection is established before checkout (default: `undefined`).

### Lifecycle Events & Process Crash Safety
- Emits `'connect'`, `'acquire'`, `'release'`, `'remove'`, and
`'error'`.
- Implements `listenerCount('error') > 0` safety check to prevent
unhandled exception crashes in production when background idle
connection drops occur without attached listeners.
- Implements closure-scoped `released` flag to prevent pool queue
corruption on duplicate `client.release()` calls.

### Graceful Shutdown (`pool.end()`)
- Drains and rejects blocked `waitQueue` acquirers immediately.
- Immediately closes all idle clients.
- Uses `endResolvers` to pause shutdown until all in-flight queries on
checked-out clients finish and are released.

---
…protos (googleapis#8927)

This is in the effort to remove OwlBot from the standard repo path. A
new package (spanner-api) takes care of what OwlBot used to do (shuffle
in new protos and generated gapic classes).

Internal: b/531788771

---------

Co-authored-by: alkatrivedi <58396306+alkatrivedi@users.noreply.github.com>
During rotation this week, I noticed that librarian did not have an
explicit protoc version, and it was just grabbing my local version. This
PR specifically was generated with 33.2 unknowingly:
googleapis#9091.

So, I decided to set it explicitly and run generate --all. No new diffs
were found.
…ort (googleapis#9105)

## Description
Adds explicit `./protos/protos` subpath export to
`@google-cloud/firestore-api` to support clean proto imports without
`build/` directory exposure:

```json
"./protos/protos": {
  "types": "./build/protos/protos.d.ts",
  "default": "./build/protos/protos.js"
}
```

- Strictly uses explicit subpath paths (no wildcards).
- Retains existing `./build/protos/protos` and `./protos` entries for
compatibility.
… clients (googleapis#8928)

Decouple the handwritten Firestore SDK wrapper from embedded GAPIC
client implementations by transitioning to the standalone
`@google-cloud/firestore-api` package. Standalone `-api` packages are
now generated and versioned independently.

### Summary of Changes
- **GAPIC Dependency**: Adds runtime dependency on standalone
`@google-cloud/firestore-api` (`^0.2.0`).
- **Runtime Proto Delegation**: Replaces static compiled protobuf
runtime files in `dev/protos/*.js` (`firestore_v1`,
`firestore_admin_v1`, `firestore_v1beta1`) with dynamic forwarding
exports directly to `@google-cloud/firestore-api/build/protos/protos`,
removing **76,572 lines of static JavaScript**.
- **Getter Variable Caching**: Applies local variable caching around
lazy getters in `dev/src/index.ts` to ensure referential equality
(`===`) and avoid redundant module require and `Object.assign` execution
on repeated accesses.
- **Deprecation Guidance**: Adds explicit JSDoc `@deprecated`
annotations directing consumers to import `@google-cloud/firestore-api`
directly instead of relying on re-exported client properties
(`Firestore.v1`).
- **Build Script Cleanup**: Removes legacy OwlBot configuration
(`owlbot.py`, `.OwlBot.yaml`) and proto compilation scripts
(`dev/protos/update.sh`).

### Why Local Types Remain in This Commit
Historically, `dev/protos/update.sh` compiled static protobuf TypeScript
interfaces (`firestore_v1_proto_api.d.ts`) using custom post-processing:
passing `--force-enum-string` to force protobuf enums into string
literal unions (`'ASCENDING' | 'DESCENDING'`), and executing a Perl
regex to replace 64-bit integer `Long` references with `string`. Modern
GAPIC packages generate standard numeric enums and `number | Long`.

In this initial pull request, we intentionally retain
`firestore_v1_proto_api.d.ts` while delegating `.js` runtime files to
`@google-cloud/firestore-api`. This is done specifically in PR #1 to
separate the mechanical work of separating the library dependency from
the deeper call-site refactoring required to transition from string
literals to native GAPIC enums. Once the entire stacked series merges,
the final state will be complete reliance on
`@google-cloud/firestore-api` as our single source of truth for all
types and runtime models.

Internal: b/531788771

---
### 📚 Stack Navigation Index
1. **Layer 1 (Base Disentanglement & Runtime Forwarding)**: googleapis#8928
2. **Layer 2 (Complete Decoupling & Dead Code Cleanup)**: googleapis#9074
3. **Layer 3 (Automated Presubmit Bundle Size Guard)**: googleapis#9075
4. **Layer 4 (Call-Site Modernization & Eliminate Local Protos)**: googleapis#9076
…eapis#9112)

So that Node can mark the breaking change in google-ads-datamanager as
breaking
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.

8 participants