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

Refactor /codegen/build-clients.sh to support new apis structure, regenerate for 2024-10 #76

Conversation

austin-denoble
Copy link
Contributor

@austin-denoble austin-denoble commented Sep 14, 2024

Problem

The upstream /apis submodule has undergone some changes since we last regenerated the client core. Our /codegen/build-clients.sh script no longer handles the new module naming or structure properly.

Additionally, we want to regenerate off the upcoming API version so we can pull in changes for things like Rerank.

This PR is merging to a release candidate (RC) branch: release-candidate/2024-10. We will track upcoming major version changes in this branch and use it for releasing dev builds.

Solution

  • Refactor codegen/build-clients.sh script to support the newer structure for the upcoming API version, specifically inference is its own module, and db_control/db_data as separate modules.
  • Update imports and exports for control -> db_control, and control -> inference for the Embed() method on InferenceService.

We made the decision to have InferenceService as its own module inside Client because of the split in the API spec, so this was fairly easy to refactor around here.

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

The code changes under /internal/gen/* are all from running the new /codegen/build-clients.sh script. I changed files in the submodule for apis manually for generating, but it aligns with this PR: https://github.com/pinecone-io/apis/pull/138

Make sure CI build + tests pass for the new core stuff here.


…re for the upcoming API version, specifically inference is its own module, and db_control/db_data split control and data plane, rename and update exports and imports
pull_request:
branches:
- main
pull_request: {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ci workflow wasn't running because we only run against main and I'm working againrelease-candidate/2024-10 here.

@austin-denoble austin-denoble merged commit b7cf029 into release-candidate/2024-10 Sep 16, 2024
2 checks passed
@austin-denoble austin-denoble deleted the adenoble/refactor-code-generation-regenerate-2024-10 branch September 16, 2024 17:48
austin-denoble added a commit that referenced this pull request Sep 19, 2024
… regenerate for `2024-10` (#76)

## Problem
The upstream `/apis` submodule has undergone some changes since we last
regenerated the client core. Our `/codegen/build-clients.sh` script no
longer handles the new module naming or structure properly.

Additionally, we want to regenerate off the upcoming API version so we
can pull in changes for things like Rerank.

This PR is **merging to a release candidate (RC) branch:
`release-candidate/2024-10`**. We will track upcoming major version
changes in this branch and use it for releasing dev builds.

## Solution
- Refactor `codegen/build-clients.sh` script to support the newer
structure for the upcoming API version, specifically `inference` is its
own module, and `db_control`/`db_data` as separate modules.
- Update imports and exports for `control` -> `db_control`, and
`control` -> `inference` for the `Embed()` method on `InferenceService`.

We made the decision to have `InferenceService` as its own module inside
`Client` because of the split in the API spec, so this was fairly easy
to refactor around here.

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

## Test Plan
The code changes under `/internal/gen/*` are all from running the new
`/codegen/build-clients.sh` script. I changed files in the submodule for
`apis` manually for generating, but it aligns with this PR:
pinecone-io/apis#138

Make sure CI build + tests pass for the new core stuff here.
austin-denoble added a commit that referenced this pull request Sep 20, 2024
… regenerate for `2024-10` (#76)

## Problem
The upstream `/apis` submodule has undergone some changes since we last
regenerated the client core. Our `/codegen/build-clients.sh` script no
longer handles the new module naming or structure properly.

Additionally, we want to regenerate off the upcoming API version so we
can pull in changes for things like Rerank.

This PR is **merging to a release candidate (RC) branch:
`release-candidate/2024-10`**. We will track upcoming major version
changes in this branch and use it for releasing dev builds.

## Solution
- Refactor `codegen/build-clients.sh` script to support the newer
structure for the upcoming API version, specifically `inference` is its
own module, and `db_control`/`db_data` as separate modules.
- Update imports and exports for `control` -> `db_control`, and
`control` -> `inference` for the `Embed()` method on `InferenceService`.

We made the decision to have `InferenceService` as its own module inside
`Client` because of the split in the API spec, so this was fairly easy
to refactor around here.

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

## Test Plan
The code changes under `/internal/gen/*` are all from running the new
`/codegen/build-clients.sh` script. I changed files in the submodule for
`apis` manually for generating, but it aligns with this PR:
pinecone-io/apis#138

Make sure CI build + tests pass for the new core stuff here.
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