Skip to content

Add GCS credential renewal integration test (local) - #1209

Merged
tdas merged 22 commits into
unitycatalog:mainfrom
timothyw553:gcs-cred-renewal-rebase
Nov 21, 2025
Merged

tdas merged 22 commits into
unitycatalog:mainfrom
timothyw553:gcs-cred-renewal-rebase

Conversation

@timothyw553

@timothyw553 timothyw553 commented Nov 14, 2025 •

Copy link
Copy Markdown
Collaborator

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added or modified a feature, documentation in docs is updated

Description of changes
This branch is currently based on @openinx's PR #1193 which creates an abstraction for integration tests.

TODO: update this branch once his PR is merged to main. The delta for this PR can be found here: https://github.com/openinx/unitycatalog/pull/1/files

@timothyw553 timothyw553 reopened this Nov 14, 2025
@timothyw553
timothyw553 marked this pull request as ready for review November 14, 2025 18:31
@timothyw553

Copy link
Copy Markdown
Collaborator Author

Some maven download issues... its a bit flaky sometimes -- closing and reopening

@timothyw553 timothyw553 reopened this Nov 14, 2025
@timothyw553
timothyw553 marked this pull request as draft November 14, 2025 19:56
Signed-off-by: TimothyW553 <[email protected]>
@timothyw553
timothyw553 marked this pull request as ready for review November 14, 2025 21:51
}

private GcpCredentialsGenerator createGenerator(GcsStorageConfig storageConfig) {
if (storageConfig != null) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

When will the storageConfig to be null ? If the storageBase is existing in the gcsConfigurations map, then the storageConfig should always be non-null, right ? while if storageBase is not existing, then it should reports as an invalid storageBase, right ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ah yes, we should check before even trying to create generator.

String jsonKeyFilePath = storageConfig != null ? storageConfig.getJsonKeyFilePath() : null;
if (jsonKeyFilePath != null && jsonKeyFilePath.isEmpty()) {
jsonKeyFilePath = null;
} else if (jsonKeyFilePath != null && jsonKeyFilePath.startsWith(TESTING_TOKEN_PREFIX)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe we can remove this special case for testing, and just configure the generatorClass to be TestingCredentialsGenerator, then it will automatically load the TestingCredentialsGenerator in here https://github.com/unitycatalog/unitycatalog/pull/1209/files#diff-259f12dc6991de29d1a6d85eeac6a7faa919a2a713ec703e8fb75a5befb88de1R55-R56, for testing.

Right ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, we should decouple the test from the gcpcredentialvendor

@timothyw553
timothyw553 requested a review from openinx November 17, 2025 04:10
Signed-off-by: TimothyW553 <[email protected]>
URI uriWithSuffix = URI.create("https://localhost:8080/path/to/uc/api");
ApiClient apiClientWithSuffix = ApiClientFactory
.createApiClient(clientConf, uriWithSuffix, token);
ApiClient apiClientWithSuffix =

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

this file was caught when i ran javafmtAll

tdas pushed a commit that referenced this pull request Nov 20, 2025
**PR Checklist**

- [ ] A description of the changes is added to the description of this
PR.
- [ ] If there is a related issue, make sure it is linked to this PR.
- [ ] If you've fixed a bug or added code that should be tested, add
tests!
- [ ] If you've added or modified a feature, documentation in `docs` is
updated

**Description of changes**
This is a backport of
#1209 to branch-0.3
<!-- Please state what you've changed and how it might affect the users.
-->

Signed-off-by: TimothyW553 <[email protected]>

@openinx openinx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@tdas tdas left a comment

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.

LGTM

@tdas
tdas merged commit a4235e2 into unitycatalog:main Nov 21, 2025
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