Skip to content

Revert union of Pools PR - #459

Merged
Tobi Ogunbi (tobiogunbi) merged 1 commit into
masterfrom
tobi/revert-client-changes
Feb 26, 2026
Merged

Tobi Ogunbi (tobiogunbi) merged 1 commit into
masterfrom
tobi/revert-client-changes

Conversation

@tobiogunbi

Copy link
Copy Markdown
Member

Please prefix all TypeScript pull-requests with [Typescript]

What

Checklist

  • Contains customer facing changes? Including API/behavior changes
  • Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required

References

JIRA:

Test & Review

Open questions / Follow-ups

@tobiogunbi
Tobi Ogunbi (tobiogunbi) requested a review from a team as a code owner February 26, 2026 21:22
Copilot AI review requested due to automatic review settings February 26, 2026 21:22
@tobiogunbi
Tobi Ogunbi (tobiogunbi) requested a review from a team as a code owner February 26, 2026 21:22

Copilot AI 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.

Pull request overview

This PR reverts a previous "union of Pools" feature that allowed the identityPoolId field in BearerAuthCredentials to accept either a single string or an array of strings. The revert restores the original behavior where identityPoolId is a single string value.

Changes:

  • Reverts identityPoolId type from string | string[] back to string in BearerAuthCredentials interface
  • Changes validation logic to require both logicalCluster and identityPoolId fields
  • Removes all test cases for union-of-pools functionality including array handling and optional identityPoolId tests
  • Updates example documentation comment to reflect single pool ID usage

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
schemaregistry/rest-service.ts Reverts BearerAuthCredentials.identityPoolId type to string and updates validation logic to require it
schemaregistry/test/rest-service.spec.ts Removes BearerAuthCredentials import and all bearer auth test cases added for union-of-pools feature
schemaregistry-examples/src/constants.ts Updates comment to remove mention of comma-separated union-of-pools usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import { RestService, BearerAuthCredentials } from '../rest-service';
import { RestService } from '../rest-service';

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

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

The removed import of BearerAuthCredentials is correct since it's no longer used in the test file after removing the bearer auth tests. However, consider verifying that the removed tests are not needed for the current functionality. If identityPoolId is still meant to be optional (as the interface suggests), these tests should be updated rather than removed.

Copilot uses AI. Check for mistakes.
scope?: string,
logicalCluster?: string,
identityPoolId?: string | string[],
identityPoolId?: string,

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

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

The revert correctly changes the type from string | string[] back to string, but fails to update whether identityPoolId should be required or optional. This inconsistency is also present in the implementation at lines 122-127 where identityPoolId is required at runtime despite being marked as optional here.

Suggested change
identityPoolId?: string,
identityPoolId: string,

Copilot uses AI. Check for mistakes.
Comment on lines +122 to 127
const headers = ['logicalCluster', 'identityPoolId'];
const missingHeader = headers.find(header => !(header in bearerAuthCredentials));

if (poolId) {
headers['Confluent-Identity-Pool-Id'] = poolId;
if (missingHeader) {
throw new Error(`Bearer auth header '${missingHeader}' not provided`);
}

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

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

Incomplete revert: The identityPoolId field is still marked as optional in the BearerAuthCredentials interface (line 36 has identityPoolId?: string), but the implementation now requires it to be present (lines 122-127). This creates a discrepancy between the TypeScript type definition and runtime behavior.

If identityPoolId should be required after the revert, update line 36 to remove the optional marker: identityPoolId: string. If it should remain optional, the validation logic needs to be updated to only check for logicalCluster and conditionally set the header only when identityPoolId is provided.

Copilot uses AI. Check for mistakes.
@tobiogunbi
Tobi Ogunbi (tobiogunbi) merged commit 86645ec into master Feb 26, 2026
5 checks passed
@tobiogunbi
Tobi Ogunbi (tobiogunbi) deleted the tobi/revert-client-changes branch February 26, 2026 21:34
Tobi Ogunbi (tobiogunbi) added a commit that referenced this pull request Jun 25, 2026
* Reapply "Revert union of Pools PR (#459)"

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* copilot fixes

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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