Skip to content

TIKA-5009: Make projectId optional in the GCS plugin - #3445

Open
bartek wants to merge 2 commits into
apache:mainfrom
bartek:gcs-optional-project-id
Open

bartek wants to merge 2 commits into
apache:mainfrom
bartek:gcs-optional-project-id

Conversation

@bartek

@bartek bartek commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

The GCS fetcher, emitter and pipes iterator all fail to build without a projectId, but none of their calls need one. They read, write and list objects in a specified bucket.

The java client also does not require projectId, and a comment within it states "Project ID is only required for creating buckets, so we don't requite it for creating the service.":

https://github.com/googleapis/google-cloud-java/blob/123f97c3f843dc7a3ff7b4ef0596c1425502a275/java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java#L326

The docs also state projectId picks the project billed for API calls, but storage access is billed to the project that owns the bucket; this has been corrected.

The GCS fetcher, emitter and pipes iterator all fail to build without a
projectId, but none of their calls need one. They read, write and list
objects in a specified bucket.

The java client also does not require projectId, and a comment within it
states "Project ID is only required for creating buckets, so we don't
requite it for creating the service.":

https://github.com/googleapis/google-cloud-java/blob/123f97c3f843dc7a3ff7b4ef0596c1425502a275/java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java#L326

The docs also state projectId picks the project billed for API calls,
but storage access is billed to the project that owns the bucket; this
has been corrected.
@tballison

Copy link
Copy Markdown
Contributor

nits from 🤖

 - No CHANGES.txt row. This relaxes a user-facing config requirement, so it probably deserves one under 4.2.1.
  - Test coverage is uneven. The fetcher gets with-project, without-project and requires-bucket tests. The emitter and iterator only get without-project.
  - Examples still set "projectId": "my-gcp-project" in all four docs/modules/ROOT/examples/pipes-gcs-*.json files. Dropping it from at least one would show
    it's optional.

Only thing that matters to me is the CHANGES.txt. Examples are nice to have, but not necessary. Test coverage... whatever.

@bartek

bartek commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

@tballison Thanks! I've pushed a fixup. I'll get more familiar with requirements regarding CHANGES.txt so I don't miss that again.

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.

2 participants