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

[spruce] Remove v0 code paths and references #181

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

austin-denoble
Copy link
Contributor

Problem

When we launched the node v1.0.0 client, we left in code paths, exports, and the generated core for the original v0 client. This was to facilitate ease of migration alongside a migration guide: v1-migration.md.

As we move to release v2.0.0 we'd like to fully deprecate the v0 client.

Solution

  • Remove everything under /src/v0/ which includes the v0 client code and generated core.
  • Delete README.v0.md and v1-migration.md.
  • Remove references to v0 from README.md.
  • Remove v0 exports from src/index.ts.
  • Remove v0 environment requirements and code exports from replInit.ts.
  • Remove isLegacy from buildUserAgent.
  • Remove v0 paths and references from config files.

Type of Change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Test Plan

Verify CI and tests pass as expected. There should no longer be v0 exports present in the Pinecone package.

Run the repl and make sure you're not seeing the legacy export:

$ npm run repl

> @pinecone-database/[email protected] repl
> npm run build && node utils/replInit.ts


> @pinecone-database/[email protected] build
> rm -rf dist/ && tsc

INFO Found environment variable PINECONE_API_KEY in .env file
> SUCCESS Pinecone module exports (Pinecone, etc) automatically imported to this repl session.

Run "await init()" to setup client instance using environment variable configs.

v1-migration.md Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should keep this file, but update it a bit to reflect that the old code no longer works. Anyone still on the old code still needs guidance on how to migrate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added it back for now, added a disclaimer at the top that's it's specific to the v0 -> v1 path. Also stubbed out the v2-migration.md file as I plan to work on it over the next couple days.

README.md Outdated
@@ -5,7 +5,6 @@ This is the official Node.js client for [Pinecone](https://www.pinecone.io), wri
## Documentation

- [**Reference Documentation**](https://sdk.pinecone.io/typescript/classes/Pinecone.html)
- If you are upgrading from a `v0.x` beta client, check out the [**v1 Migration Guide**](https://github.com/pinecone-io/pinecone-ts-client/blob/main/v1-migration.md).
Copy link
Collaborator

Choose a reason for hiding this comment

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

As mentioned elsewhere, I would bring this back.

@austin-denoble austin-denoble force-pushed the adenoble/remove-v0-code-paths branch from 6a58199 to 5a4fb29 Compare January 9, 2024 21:46
@austin-denoble austin-denoble merged commit 1acb597 into spruce Jan 11, 2024
20 checks passed
@austin-denoble austin-denoble deleted the adenoble/remove-v0-code-paths branch January 11, 2024 04:41
austin-denoble added a commit that referenced this pull request Jan 13, 2024
## Problem
When we launched the node v1.0.0 client, we left in code paths, exports,
and the generated core for the original v0 client. This was to
facilitate ease of migration alongside a migration guide:
`v1-migration.md`.

As we move to release v2.0.0 we'd like to fully deprecate the v0 client.

## Solution

- Remove everything under `/src/v0/` which includes the v0 client code
and generated core.
- Delete `README.v0.md` and `v1-migration.md`.
- Remove references to v0 from `README.md`.
- Remove v0 exports from `src/index.ts`.
- Remove v0 environment requirements and code exports from
`replInit.ts`.
- Remove `isLegacy` from `buildUserAgent`.
- Remove v0 paths and references from config files.

## Type of Change
- [X] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [X] This change requires a documentation update

## Test Plan
Verify CI and tests pass as expected. There should no longer be v0
exports present in the `Pinecone` package.

Run the repl and make sure you're not seeing the legacy export:

```
$ npm run repl

> @pinecone-database/[email protected] repl
> npm run build && node utils/replInit.ts


> @pinecone-database/[email protected] build
> rm -rf dist/ && tsc

INFO Found environment variable PINECONE_API_KEY in .env file
> SUCCESS Pinecone module exports (Pinecone, etc) automatically imported to this repl session.

Run "await init()" to setup client instance using environment variable configs.
```
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