Skip to content

Add create index to java sdk client - #14

Merged
rohanshah18 merged 4 commits into
mainfrom
rohan/addCreateIndex
Aug 21, 2023
Merged

rohanshah18 merged 4 commits into
mainfrom
rohan/addCreateIndex

Conversation

@rohanshah18

Copy link
Copy Markdown
Contributor

Problem

The java sdk client is currently missing index creation code.

Solution

This PR adds index creation code and the PR contains client wrapper to make a http call to create Index endpoint along with a unit test.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Unit test is added as a part of this PR and as a part of integration test, ran it manually by creating an index using the createIndex() against my account and checked that the index was created using console.

@rohanshah18
rohanshah18 requested review from jhamon and rajat08 August 18, 2023 17:39
@rohanshah18
rohanshah18 merged commit 63a511c into main Aug 21, 2023
@rohanshah18
rohanshah18 deleted the rohan/addCreateIndex branch August 21, 2023 13:20
jhamon added a commit that referenced this pull request Nov 12, 2026
23 tests in src/integration make no network call, because the client
validates the input first, so they ran only in the keyed live job.

- QueryErrorTest (6) and UpsertErrorTest (8) move to src/test as-is
  (git mv, package io.pinecone.clients).
- The 8 identical pod/serverless sparse-validation tests in the
  UpsertAndQuery*/UpdateFetchAndQuery* classes become 4 unit tests on mocked
  stubs (2 in UpsertErrorTest, 2 in a new UpdateErrorTest), since the check
  does not depend on index type.
- createServerlessIndexWithInvalidDimension moves to
  PineconeIndexOperationsTest and verifies that no request is sent.
- RandomStringBuilder and BuildUpsertRequest move to src/test/helpers.

Two "Future" tests (UpsertErrorTest ...FutureTest and
QueryErrorTest.queryWithVectorAndIdFutureTest) called the sync client.
They now call asyncIndex, so the async validation path is covered.

Verified: offline build green in 15 s; unit tests 101 -> 120; integration
@test methods 109 -> 86.
jhamon added a commit that referenced this pull request Nov 12, 2026
…ies (#44)

* fix(deps): clear open Dependabot alerts (jackson 2.21.7, netty 4.1.137, guava 33.7.2)

Clears the 11 open Dependabot alerts without a breaking change. Existing
POM dependencies change only in version; Guava, which every consumer
already gets through grpc, is now declared directly.

- jackson-databind and jackson-core 2.21.5 -> 2.21.7 (alerts #15-#21).
  Supersedes Dependabot PR #6.
- Netty 4.1.136.Final -> 4.1.137.Final through the existing nettyVersion
  pin (alerts #12-#14). Stays on 4.1.x for grpc-netty 1.60.2.
- Guava 32.0.1-android -> 33.7.2-android (alert #22). Guava comes from
  grpc, and no grpc release ships a patched Guava. A direct
  implementation dependency makes Maven consumers resolve 33.7.2 (nearest
  wins, widened to compile scope by grpc-api). A matching api constraint
  moves Gradle consumers' compile classpath too, which would otherwise
  still see 32.0.1 through grpc.

* no-mistakes(review): Declare Guava 33.7.2 as a single api dependency

* no-mistakes(document): Add CHANGELOG entry for security dependency bumps
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