Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release candidate for 2024-10 #166

Merged
merged 8 commits into from
Oct 24, 2024
Merged

Conversation

rohanshah18
Copy link
Contributor

Problem

release-candidate/2024-10 branch contains the following features which needs to be merged into main before releasing the next major version v3.0.0.

  1. Generate code based on 2024-10 api spec
  2. Rerank
  3. Four import endpoints:
    • start import
    • list imports
    • describe import
    • cancel import

Solution

Merge release-candidate/2024-10 branch into main to release v3.0.0.

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

For each feature, either an integration or unit test was added, so the all of the unit & integration should run successfully.

## Problem

Generate code based on 2024-10 api spec.

## Solution
OpenAPI based code was regenerated using the 2024-10 api sec which
resulted in the following changes:
1. Updated `build-oas.sh` to include all control plane, data plane, and
inference modules.
2. Inference is now broken out of control plane so the underlying
`inference` code generated by openAPI spec is now updated. This also
resulted in instantiating a separate `ApiClient` which is a part of
inference module now instead of the shared `ApiClient` class of control
plane. Also as a part of this refactoring, the `customOkHttpClient` is
now a part of the `PineconeConfig` class, so once the
`customOkHttpClient` is set by the user at the time of instantiating
`Pinecone` using its builder class, it'll be stored in the
`PineconeConfig` instance which can further be leveraged by the
`Inference` api calls as well.
3. Control and data plane modules are now prepended with `db_` so this
resulted in updating import statements for a lot of existing classes.

## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] 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

Since no new functionality is added, the existing integration tests
should run fine.
## Problem

Add rerank.

## Solution

1. Added the following two methods for rerank:
a. Method that accepts required parameters only and the optional
parameters are set to default. More details on the api and its default
parameters can be found
[here](https://docs.pinecone.io/reference/api/2024-10/inference/rerank).
```java
      rerank(String model,
                       String query,
                       List<Map<String, String>> documents)
```
b. Method that accepts all parameters:
```java
      rerank(String model,
                       String query,
                       List<Map<String, String>> documents,
                       List<String> rankFields,
                       int topN,
                       boolean returnDocuments,
                       Map<String, Object> parameters)
```
2. Added integration tests for both rerank methods.
3. Added an example in the README file.


## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] 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

Added integration test.
…dexTags (#160)

## Problem

Made two changes to the open api specs.

## Solution

Regenerate code based on the latest changes in the open api specs.
Following commands were ran to generate the code:
```
git submodule init && git submodule update
./codegen/build-oas.sh 2024-10
```

## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] 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

Existing integration tests should run successfully.
## Problem

Add four endpoints of the `BulkOperationsApi`.

## Solution

Added the following four endpoints of the `BulkOperationsApi`:
1. `startImport(String uri, String integrationId,
ImportErrorMode.OnErrorEnum errorMode)`
2. `describeImport(Integer limit, String paginationToken)`
3. `listImport(String id)`
4. `cancelImport(String id)`

## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] 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

Added unit tests.
)

## Problem

A change was made to the control plane OAS.

## Solution

Regenerated code based on the latest OAS using the following commands:
```
git submodule init && git submodule update
./codegen/build-oas.sh 2024-10
```
Note: There are a lot of changes based on the updated timestamps only.

## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] 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

Existing integration tests should work.
## Problem

Update the datatype of `parameters` in `rerank()` from `Map<String,
Object>` to `Map<String, String>` to better match the OAS.

## Solution

Updated the datatype for the rerank() so the base overloaded method is
now:
```java
public RerankResult rerank(String model,
                               String query,
                               List<Map<String, String>> documents,
                               List<String> rankFields,
                               int topN,
                               boolean returnDocuments,
                               Map<String, String> parameters)
``` 
As a part of this change, I have also updated the integration test and
README.

## Type of Change

- [X] 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

Updated the integration test for rerank and the rest of them should run
as it is.
## Problem

Regenerating the code based on new OAS caused changes in imports, so the
examples in the README needs to be updated accordingly.

## Solution

Changes include: 
1. Updating import statements since inference is now broken out of
control, so the paths for the openAPI generated model classes like
`ApiException`, `IndexModel`, etc. were updated.
2. Import statement was missing for an example or two

## 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)
- [X] Non-code change (docs, etc)
- [ ] None of the above: (explain here)

## Test Plan

No code changes so integration tests should run successfully.
## Problem

Prepare for releasing Java SDK v3.0.0.

## Solution

Releasing a major version requires updating:
1. README
2. gradle.properties
3. CHANGELOG.md
4. Constants.java

## 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)
- [X] Non-code change (docs, etc)
- [ ] None of the above: (explain here)

## Test Plan

No code is updated as a part of this change, integration tests should
run as expected.
@rohanshah18 rohanshah18 marked this pull request as ready for review October 24, 2024 01:24
Copy link
Contributor

@austin-denoble austin-denoble left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@rohanshah18 rohanshah18 merged commit a6f34ab into main Oct 24, 2024
9 checks passed
@rohanshah18 rohanshah18 deleted the rshah/release-candidate/2024-10 branch October 24, 2024 03:02
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