Skip to content

Conversation

@mw5h
Copy link
Contributor

@mw5h mw5h commented Dec 5, 2025

Previously, the URI field in the ExternalStorage proto was not populated by all storage provider implementations. This field is intended to store the original URI used to construct the storage, allowing for proper round-tripping of configuration.

This commit implements URI field population for all external storage types. ExternalStorageFromURI() now checks that this field is set in returned implementations when running in a test build.

The implementation ensures that ExternalStorage.Conf() returns the complete configuration including the original URI, which is validated by existing tests that use cloudtestutils.CheckExportStore() for most storage types. Nullsink, which cannot use the standard test helper due to its no-op nature, has an explicit URI round-trip test.

Informs: #156658
Release note: none

@mw5h mw5h requested a review from spilchen December 5, 2025 17:40
@mw5h mw5h requested a review from a team as a code owner December 5, 2025 17:40
@mw5h mw5h requested review from dt and removed request for a team December 5, 2025 17:40
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@spilchen spilchen left a comment

Choose a reason for hiding this comment

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

Looks like a good thing to have. I had one minor nit. I noticed the CI run found a few other cases. I can take a look again after those are resolved.

@spilchen reviewed 3 of 12 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt and @mw5h)


pkg/cloud/cloudpb/external_storage.proto line 181 at r1 (raw file):

  // URI is the string URI from which this encoded external storage config was
  // derived, if known. May be empty in most cases unless set explicitly by the

nit: May want to update the "May be empty in most cases..." part of the comment. It's the opposite now.

@mw5h mw5h force-pushed the cloud-external-uri branch 2 times, most recently from 3c861ee to a81120e Compare December 5, 2025 21:57
@mw5h
Copy link
Contributor Author

mw5h commented Dec 5, 2025

Okay, let's see what CI makes of this. Previous run failed because we were comparing a the non-escaped URI to the escaped one that we built the external storage configuration from.

Previously, the URI field in the ExternalStorage proto was not
populated by all storage provider implementations. This field is
intended to store the original URI used to construct the storage,
allowing for proper round-tripping of configuration.

This commit implements URI field population for all external
storage types. ExternalStorageFromURI() now checks that this field
is set in returned implementations when running in a test build.

The implementation ensures that `ExternalStorage.Conf()` returns the
complete configuration including the original URI, which is validated
by existing tests that use `cloudtestutils.CheckExportStore()` for
most storage types. Nullsink, which cannot use the standard test
helper due to its no-op nature, has an explicit URI round-trip test.

Informs: cockroachdb#156658
Release note: none
@mw5h mw5h force-pushed the cloud-external-uri branch from a81120e to 0143262 Compare December 6, 2025 00:06
@mw5h
Copy link
Contributor Author

mw5h commented Dec 6, 2025

Okay, this is RFAL.

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.

3 participants