Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pinecone-io/pinecone-ts-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.0.2
Choose a base ref
...
head repository: pinecone-io/pinecone-ts-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Aug 27, 2024

  1. Update README to no longer mention runtime checks (#256)

    ## Problem
    
    Since we removed runtime checks, we need to remove the part in our
    README about the `PINECONE_DISABLE_RUNTIME_VALIDATIONS` env var (missed
    1st time around):
    https://github.com/pinecone-io/pinecone-ts-client/pull/249/files#diff-a54261af011358e447a9f3ef717ee8e5d5bb4258f8d95e246b39cf3666244f1fL275
    
    <img width="1274" alt="Screenshot 2024-08-26 at 5 23 35 PM"
    src="https://github.com/user-attachments/assets/cad55314-47a6-4236-a16c-afeb436e2ed3">
    
    
    ## Solution
    
    Remove it :) 
    
    ## 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)
    aulorbe authored Aug 27, 2024
    Copy the full SHA
    ba64732 View commit details
  2. Update README.md

    Move Productionizing section to be higher
    aulorbe authored Aug 27, 2024
    Copy the full SHA
    ad9a551 View commit details
  3. Add new Github action that deploys sample Vercel app (#257)

    ## Problem
    
    As part of a larger effort to set up e2e testing for different runtimes,
    we'd like to implement a new Github action that would run on PRs that
    spins up [a sample Vercel
    app](https://github.com/pinecone-io/pinecone-rag-demo/tree/main) that
    runs in the Edge runtime.
    
    ## Solution
    
    Upload this action as a 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
    - [x] Infrastructure change (CI configs, etc)
    - [ ] Non-code change (docs, etc)
    - [ ] None of the above: (explain here)
    
    ## Test Plan
    
    CI passes
    aulorbe authored Aug 27, 2024
    Copy the full SHA
    08100f2 View commit details
  4. Add new workflow for testing

    aulorbe committed Aug 27, 2024
    Copy the full SHA
    4d55b8b View commit details
  5. Copy the full SHA
    d300a71 View commit details
  6. Allow to run

    aulorbe committed Aug 27, 2024
    Copy the full SHA
    df2bf2b View commit details
  7. Rename to action.yml

    aulorbe committed Aug 27, 2024
    Copy the full SHA
    b6b2847 View commit details
  8. Rename dir

    aulorbe committed Aug 27, 2024
    Copy the full SHA
    6f78b43 View commit details
  9. Make path just to dir

    aulorbe committed Aug 27, 2024
    Copy the full SHA
    efdb602 View commit details
  10. Copy the full SHA
    cdac360 View commit details
  11. Modify end-to-end testing action file to use secrets correctly (#258)

    ## Problem
    
    Current action.yml file for the end to end testing workflow is getting
    the following error:
    
    >
    /home/runner/work/pinecone-ts-client/pinecone-ts-client/./.github/actions/e2e-testing/edge/action.yml
    (Line: 20, Col: 25): Unrecognized named-value: 'secrets'. Located at
    position 1 within expression: secrets.VERCEL_TOKEN
    
    ## Solution
    
    Cleaned up some parts of the action.
    
    ## 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)
    aulorbe authored Aug 27, 2024
    Copy the full SHA
    e4700d6 View commit details
  12. Move secrets only to workflow and not action file (#259)

    ## Problem
    
    The end to end testing workflow was getting errors related to secrets,
    e.g.:
    
    >
    /home/runner/work/pinecone-ts-client/pinecone-ts-client/./.github/actions/e2e-testing/edge/action.yml
    (Line: 20, Col: 25): Unrecognized named-value: 'secrets'. Located at
    position 1 within expression: secrets.VERCEL_TOKEN
    
    After reading this thread
    https://github.com/orgs/community/discussions/27054#discussioncomment-3254450
    it seems that `secrets` might only be available in workflows and not
    actions. So, I've moved `secrets` to only be in the workflow file and
    the references to them to be in `inputs` in the `action.yml` file.
    
    
    ## 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)
    aulorbe authored Aug 27, 2024
    Copy the full SHA
    0909d3f View commit details
  13. Move secrets in workflow file to with block (#260)

    ## Problem
    
    The last end to end testing workflow run failed due to `inputs` being
    unrecognized:
    
    > [Run end-to-end
    tests](https://github.com/pinecone-io/pinecone-ts-client/actions/runs/10587412603/job/29338090995#step:4:1)
    
    /home/runner/work/pinecone-ts-client/pinecone-ts-client/./.github/actions/e2e-testing/edge/action.yml
    (Line: 34, Col: 25): Unrecognized named-value: 'inputs'. Located at
    position 1 within expression: inputs.VERCEL_TOKEN
    
    ## Solution
    
    ChatGPT let me know that I should actually put my `secrets` into a
    `with` block in my workflow file instead.
    
    ## 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)
    aulorbe authored Aug 27, 2024
    Copy the full SHA
    a8e46e8 View commit details
  14. Convert action to a composite action (#261)

    ## Problem
    
    Since I'm trying to build a custom action with multiple steps, it seems
    that I should've formatted my action.yml file to be a "composite"
    action. This PR does that.
    
    ## 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)
    aulorbe authored Aug 27, 2024
    Copy the full SHA
    554958d View commit details
  15. Add shell explicitly to run commands in action.yml (#262)

    ## Problem
    
    Apparently the `run` command needs `shell` to be explicitly below.
    
    ## 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)
    aulorbe authored Aug 27, 2024
    Copy the full SHA
    9182e27 View commit details

Commits on Aug 28, 2024

  1. Add env vars to deploy section (#263)

    ## Problem
    
    Forgot to explicitly put `shell: bash` for 1 npm command + needed to
    move env vars down to `run` command that actually needs them.
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    44a81a9 View commit details
  2. Setup-vercel repo having issues so change version to @master (#264)

    ## Problem
    
    The `amondnet/vercel-action@25` seems not to work, but [users are
    saying](amondnet/vercel-action#40 (comment))
    change it to `@master` works. So, trying that!
    
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    ad6c25a View commit details
  3. Change vercel action path in action.yml (#265)

    ## Problem
    
    Vercel action is having issues, so need to change path according to this
    thread
    amondnet/vercel-action#40 (comment)
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    a952088 View commit details
  4. Linting

    aulorbe committed Aug 28, 2024
    Copy the full SHA
    2a5eaca View commit details
  5. Update naming of Vercel token + add vercel.json (#267)

    ## Problem
    
    The latest test run of the new e2e Edge testing CI failed with the
    following error:
    
    > Error: Input required and not supplied: vercel-token
    at Object.getInput
    (/home/runner/work/_actions/amondnet/vercel-action/master/dist/index.js:212:15)
    at
    /home/runner/work/_actions/amondnet/vercel-action/master/dist/index.js:32582:26
    at
    /home/runner/work/_actions/amondnet/vercel-action/master/dist/index.js:32991:3
    at Object.<anonymous>
    (/home/runner/work/_actions/amondnet/vercel-action/master/dist/index.js:32994:12)
        at Module._compile (node:internal/modules/cjs/loader:1358:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load
    (node:internal/modules/cjs/loader:[120](https://github.com/pinecone-io/pinecone-ts-client/actions/runs/10588113496/job/29340074646#step:4:133)8:32)
        at Module._load (node:internal/modules/cjs/loader:1024:12)
    at Function.executeUserEntryPoint [as runMain]
    (node:internal/modules/run_main:174:12)
        at node:internal/main/run_main_module:28:49
    
    The first solve I think might resolve this error is to change the naming
    of the Vercel token from `VERCEL_TOKEN` to `vercel-token`, as it is in
    the example yamls in [the Vercel GH action's
    repo](https://github.com/amondnet/vercel-action?tab=readme-ov-file#method-2---via-verceljson).
    
    I also noticed while reading the Vercel GH action's repo that I didn't
    add a `vercel.json` file, which seemingly is needed to properly deploy a
    Vercel project via GH actions. So, this PR adds that as well. Info about
    `vercel.json` here:
    https://vercel.com/docs/projects/project-configuration#functions.
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    541c818 View commit details
  6. Change location of env vars from with to env in workflow file (#269)

    ## Problem
    
    The [last test of the e2e Edge GH workflow
    file](https://github.com/pinecone-io/pinecone-ts-client/actions/runs/10602204562/job/29383732233)
    at the `Run e2e tests for edge runtime` step in the workflow file
    because it still couldn't find the `vercel-token` environment variable.
    
    ## Solution
    
    I think me having the env vars in the `with` section instead of the
    `env` section is causing the error, so this PR moves them.
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    88ec5de View commit details
  7. Add necessary env vars in both with and env sections of workflow …

    …and action files (#270)
    
    ## Problem
    
    The previous e2e Edge GH workflow run failed due to not being able to
    find the `vercel-token` environment variable. From what I read,
    everything was set up correctly, but since it's still failing, I'm
    putting all environment in both the `with` and `env` sections of in both
    the action and workflow files.
    
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    df692ce View commit details
  8. Remove with section of Deploy to Vercel step in action.yml file (#…

    …271)
    
    ## Problem
    
    The last e2d Edge CI run
    [failed](https://github.com/pinecone-io/pinecone-ts-client/actions/runs/10602446618/job/29384504189#step:4:3)
    seemingly because my use of the `with` section made the pipeline think I
    was trying to use a prebuilt action, which I am not.
    
    ## Solution
    
    Remove `with` section and solely rely on `env` section for `Deploy to
    Vercel` step.
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    2a20691 View commit details
  9. Add installCommand to vercel.json to ensure package.json deps are ins…

    …talled (#272)
    
    ## Problem
    
    The latest e2e Edge CI run tried to deploy the intended app to Vercel,
    but failed to find a `NextJS` version installed. I believe we have to
    install this via adding a `installCommand` field to the `vercel.json` we
    create in the action.
    
    ## Solution
    
    Add `installCommand` field. This should install all deps within the
    project dir outlined in `package.json`.
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    52ac7e7 View commit details
  10. Add NextJS install step (#273)

    ## Problem
    
    The [most
    recent](https://github.com/pinecone-io/pinecone-ts-client/actions/runs/10602693291)
    e2e Edge workflow run failed because it still couldn't find `NextJS`.
    
    <img width="1280" alt="Screenshot 2024-08-28 at 11 58 38 AM"
    src="https://github.com/user-attachments/assets/d681c35b-6655-4599-8f07-2b20d9b673d2">
    
    
    ## Solution
    
    I removed the `includeFiles` section in order to avoid limiting Vercel's
    project scope in any unintended way + added an explicitly `npm install`
    step that installs `NextJS` globally.
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    c8a5a33 View commit details
  11. add specific edge-runtime versionm (#274)

    ## Problem
    
    The [latest e2e Edge workflow
    run](https://github.com/pinecone-io/pinecone-ts-client/actions/runs/10602830879)
    failed.
    <img width="1246" alt="Screenshot 2024-08-28 at 12 16 43 PM"
    src="https://github.com/user-attachments/assets/ff4e98c4-eec9-431d-89de-eec3fb2b0364">
    
    
    
    I tried deploying again with my same `vercel.json` file declared in the
    workflow, but locally, and I got the following error:
    <img width="733" alt="Screenshot 2024-08-28 at 12 15 08 PM"
    src="https://github.com/user-attachments/assets/b959b302-fa13-4849-8f87-1e87f394bcf1">
    
    Upon declaring a specific `edge-runtime` version in `vercel.json`, I was
    able to deploy locally.
    
    ## Solution
    
    Try the same approach but in CI. Hoping maybe being unable to find a
    `NextJS` version was a red herring error, since it was uncorroborated by
    me after running locally.
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    b6a7892 View commit details
  12. Add logging to e2e workflow file (#275)

    ## Problem
    
    It's unclear to me why the workflow [still cannot find an installed
    version of
    NextJS](https://github.com/pinecone-io/pinecone-ts-client/actions/runs/10602830879/job/29385769964).
    
    ## Solution
    
    Add logging to workflow and action files.
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    c3a4779 View commit details
  13. Remove instances of using run and uses in the same step (#276)

    ## Problem
    
    One cannot use `run` and `uses` in the same step when making GH actions.
    
    ## Solution
    
    Remove `run` when `uses` is present.
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    0396a2a View commit details
  14. Add npm install step to e2e action (#277)

    ## Problem
    
    The l[atest e2e Edge
    workflow](https://github.com/pinecone-io/pinecone-ts-client/actions/runs/10604556881)
    run failed at `npm run build` because it couldn't find some `types`
    declared in `tsconfig`, it seems.
    
    <img width="956" alt="Screenshot 2024-08-28 at 2 24 05 PM"
    src="https://github.com/user-attachments/assets/3c3aa14f-211a-4b2e-8d84-18b08d383dcf">
    
    
    It looks like the action doesn't actually run `npm install` when in the
    root dir, so that's likely the culprit.
    
    ## Solution
    
    Add `npm install` step.
    
    ## 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)
    aulorbe authored Aug 28, 2024
    Copy the full SHA
    00b826a View commit details
  15. Copy the full SHA
    515e9e3 View commit details

Commits on Aug 30, 2024

  1. Remove old jest-skipped-reporter module (#268)

    ## Problem
    
    When running `npm audit`, we had cascading vulnerabilities ranging in
    severity due to our use of the `jest-skipped-reporter`
    [module](https://github.com/rickhanlonii/jest-skipped-reporter). This
    module hasn't been updated in 5 years, so we really shouldn't be
    depending on it.
    
    ## Solution
    
    Remove this module. It only reported skipped tests, which I don't think
    is super necessary anyways.
    
    ## Npm Audit Results
    
    Before (recreated by checking out `main`): 
    <img width="1388" alt="Screenshot 2024-08-28 at 11 13 50 AM"
    src="https://github.com/user-attachments/assets/76abc278-ee7d-49a2-8723-dfd5215a7671">
    <img width="1387" alt="Screenshot 2024-08-28 at 11 13 55 AM"
    src="https://github.com/user-attachments/assets/a780d15a-dc39-4403-a7e5-7ee9c65bc867">
    
    
    After (ran on this PR's branch): 
    <img width="620" alt="Screenshot 2024-08-28 at 11 13 20 AM"
    src="https://github.com/user-attachments/assets/35a5500b-ede5-4a96-a8f9-d733381db40b">
    
    
    ## 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)
    - [x] Non-code change (docs, etc)
    - [ ] None of the above: (explain here)
    
    ## Test Plan
    
    CI passes.
    
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1208058866322097
    aulorbe authored Aug 30, 2024
    Copy the full SHA
    768cee0 View commit details
  2. Add final, working Vercel app e2e Edge GH workflow (#278)

    ## Problem
    
    Setting the necessary Pinecone-related environment variables in the
    Vercel UI enabled us to finalize the e2e Edge GH workflow pipeline.
    Everything now deploys and is workable in the `preview` environment (all
    we need for right now).
    
    Final working preview:
    https://vercel.com/pinecone-io/pinecone-rag-demo/G6hqB1w2fdNyLbHhdjqYvx7pgVzo
    
    ## Solution
    
    Pass Pinecone-related env vars needed by app through Vercel
    UI/dashboard.
    
    ## 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)
    
    
    
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1208153851794098
    aulorbe authored Aug 30, 2024
    Copy the full SHA
    2930bcf View commit details
  3. Update cleanupResources workflow to check for deletionProtection (#279)

    ## Problem
    
    Currently, the `cleanupResources` script
    [fails](https://github.com/pinecone-io/pinecone-ts-client/actions/runs/10623637432/job/29452705669?pr=278)
    to delete some indexes that spin up during our integration test suite
    because some of these indexes have `deletionProtection` `enabled`.
    
    ## Solution
    
    Check for `deletionProtection` being `enabled`; if it is, set it to
    `disabled`.
    
    ## 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
    
    CI passes
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1208192096733434
      - https://app.asana.com/0/0/1208186698556887
    aulorbe authored Aug 30, 2024
    Copy the full SHA
    eec04fb View commit details

Commits on Sep 11, 2024

  1. Remove extra logging from getFetch() (#280)

    ## Problem
    
    getFetch() contained an extra log statement which is executed every time
    the API is used.
    
    ## Solution
    
    Remove the log
    
    ## 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
    
    Ran code that accessed and interacted with Pinecone (fetched index,
    queried vectors)
    maxmetcalfe authored Sep 11, 2024
    Copy the full SHA
    399803e View commit details
  2. [skip ci] Publish release v3.0.3

    aulorbe committed Sep 11, 2024
    Copy the full SHA
    655979f View commit details

Commits on Sep 12, 2024

  1. Add example of proxying (#281)

    ## Problem
    
    The community has requested clearer direction regarding using proxy
    servers and other http-related customizations with our Typescript
    client.
    
    Asana ticket https://app.asana.com/0/1203260648987893/1205491455268495/f
    
    ## Solution
    
    Add proxying section to README + clarify some code comments.
    
    ## 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
    
    Describe specific steps for validating this change.
    
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1205491455268495
    aulorbe authored Sep 12, 2024
    Copy the full SHA
    8324f12 View commit details
  2. Update README.md

    aulorbe authored Sep 12, 2024
    Copy the full SHA
    73d98b8 View commit details

Commits on Sep 25, 2024

  1. Change language around records --> vectors where appropriate (#288)

    ## Problem
    
    We believe it's more accurate to refer to dense-vector objects as
    "vectors" (vs "records") when we are talking about vectors we'd like to
    upsert into an index, etc. This is because they are primarily (first and
    foremost) _vectors_, with IDs, metadata, etc.
    
    ## Solution
    
    Change instances of "record(s)" to "vector(s)" where appropriate.
    
    Note: I opted _not_ to change instances of "record(s)" in cases where we
    are talking about the entire object as a whole (as in, "Update a
    record", since you could be updating the metadata, the vector values,
    etc.).
    
    ## 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)
    
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1208381566824289
    aulorbe authored Sep 25, 2024
    Copy the full SHA
    9dcd99e View commit details

Commits on Sep 26, 2024

  1. Perform housekeeping on RC Github worfklow (#289)

    ## Problem
    
    On [a recent RC release
    run](https://github.com/pinecone-io/pinecone-ts-client/actions/runs/11018817395),
    we ran into warnings about the variable `nameRc`. We also noticed that
    the current RC Github workflow automatically labels the RC build as the
    `latest` version on `npm` by way of not specifying a `--tag`.
    
    ## Solution
    
    This PR changes `nameRc` to `rc_name` and adds a `--tag=RC` to the `npm
    publish` step, so that all RC builds have an `RC` tag, instead of
    latest.
    
    ## 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)
    
    
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1208381566824292
      - https://app.asana.com/0/0/1208381566824295
    aulorbe authored Sep 26, 2024
    Copy the full SHA
    c2b24c8 View commit details

Commits on Oct 7, 2024

  1. Quick update to README re: list endpoint (#293)

    ## Problem
    
    It's often unclear to users that the `list` endpoint (i.e. query by
    vector ID) does not necessarily return the vector that matches the
    passed ID.
    
    ## Solution
    
    Clarify that.
    
    ## 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)
    
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1208439494339495
    aulorbe authored Oct 7, 2024
    Copy the full SHA
    03de66c View commit details

Commits on Oct 14, 2024

  1. Centralize test indexes for integration tests (#291)

    ## TLDR
    This PR takes our integration test timing in CI down from ~37mins to ~10mins! 🎉 
    
    ## Problem
    
    Our integration tests are currently very flakey (meaning they fail in an
    non-deterministic manner depending largely on fluctuations in latency on
    backend operations).
    
    ## Solution
    
    Centralize the creation and deletion of indexes for integration tests;
    cleanup the tests where I can.
    
    **The tests that now use the centralized indexes:** 
    **- Control:**
        - `describeIndex.test.ts`
        - `listIndexes.test.ts`
    **- Data:**
        -  `fetch.test.ts`
        - `list.test.ts`
        - `query.test.ts`
    
    **The tests that still have to create/delete their own indexes because
    their operations are difficult to undo:**
    **- Control:**
        - `configureIndex.test.ts`
        - `createIndex.test.ts`
    **- Data:**
        - `delete.test.ts`
        -  `upsertAndUpdate.test.ts`
    
    ### New jobs & files
    - I added a job in `testing.yml` called `setup` that calls a file called
    `setup.ts` (`src/integration/setup.ts`)
    - I added a job in `testing.yml` called `teardown` that calls a file
    called `teardown.ts` (`src/integration/teardown.ts`)
    - `setup.ts` sets up (creates and seeds) a shared serverless index (only
    serverless for now b/c we don't have pod-based data plane tests). **The
    index name is randomized, so simultaneous jobs can occur using the same
    Pinecone API key** 😄 .
    - I have put a `todo` in this file to refactor it; right now, it's quite
    rudimentary in the way it loops and checks conditions; you'll notice
    other `todo`s in other files that point to where we need more tests,
    etc. I'd like to keep these in there for now, if that's okay.
    - `teardown.ts` deletes this index
    - I found some tests that were not actually testing what they intended
    to, so I have marked those as skipped for now (e.g. `createIndex.test.ts
    > `test('insufficient quota')`)
    - I added a file called `integrationRunner.js`, which is a file for
    running integration tests locally with a new command in `package.json`
    that you can execute by running `npm run test:integration-local:node`.
    This will do the setup, tests, and teardown all in 1 go for you locally.
    
    ### Bug fixes
    - Last week, @austin-denoble and I noticed a bug in `waitUntilReady`
    where the `status` sometimes evaluated to `Ready` without the index
    actually being ready. So, this PR includes a fix to that function that
    also checks for `state.ready` being `true` _and_ adds a value (that it
    also checks for) to the `IndexModelStatusStateEnum` that accounts for an
    index's state being `Upgrading`, which accounted for a lot of flakiness
    in the configureIndex tests.
    
    ## Notes
    - The goal of this PR is to _decrease_ flakiness
    - I removed one of our Bun versions to try to get the time down a bit;
    we might want to experiment with upping the `max-parallel` field too in
    `testing.yml` (although I tried removing it altogether and we had
    failures)
    - I _removed_ the job in `testing.yml` that calls
    `utils/cleanupResources.ts`, since I replaced it with my `Teardown` job.
    This file (`cleanupResources`) is still called via cron, though, by
    `testing-cleanup.yml`
    - I decided _not_ to use [jest's `globalSetup` and `globalTeardown`
    capabilities](https://jestjs.io/docs/configuration#globalsetup-string)
    because the "global" scope is per option in our test matrix. Creating a
    custom setup and teardown job instead allowed me to create a single test
    index we can use across all options in our matrix, which is more
    efficient.
    
    ## 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
    - [x] Infrastructure change (CI configs, etc)
    - [ ] Non-code change (docs, etc)
    - [ ] None of the above: (explain here)
    
    ## Test Plan
    
    CI passes consistently
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1208439494339500
      - https://app.asana.com/0/0/1207545518662985
    aulorbe authored Oct 14, 2024
    Copy the full SHA
    760a033 View commit details

Commits on Oct 23, 2024

  1. Add new generated code + new generation script for 2024-10 RC (#283)

    This PR cuts a branch that holds the new generated code for the upcoming
    `2024-10` release candidate. It also contains changes to the generation
    script that reflect the new organization in the private `apis` repo.
    
    ## 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)
    aulorbe committed Oct 23, 2024
    Copy the full SHA
    8c1a209 View commit details
  2. Add Bulk Import (#282)

    We currently do not have Bulk Import support in the 2024-10 RC branch.
    
    Add it in!
    
    Notes:
    - Bulk Import product team is still working on some final tweaks the API
    (e.g. `integration` --> `integration_id`), so it's likely there will be
    follow up PRs to this PR once those are finalized
    - "" will work on decreasing latency; once that is done, we can build
    more integration tests (right now, it takes upwards of 15 mins for
    vectors from a bulk import operation to show up in an index, so building
    integration tests in CI isn't sustainable)
    - I added a `featureFlag` similar to what @jhamon did in Python
    
    - [ ] 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)
    - [x] This change requires a documentation update
    - [ ] Infrastructure change (CI configs, etc)
    - [ ] Non-code change (docs, etc)
    - [ ] None of the above: (explain here)
    
    New unit tests & integration tests pass in CI.
    aulorbe committed Oct 23, 2024
    Copy the full SHA
    94f1a7b View commit details
  3. Add rerank endpoint (#284)

    This PR adds the new [rerank
    endpoint](https://docs.pinecone.io/guides/inference/rerank) into the TS
    client.
    
    Note, README reflects addition.
    
    - [ ] 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)
    - [x] This change requires a documentation update
    - [ ] Infrastructure change (CI configs, etc)
    - [ ] Non-code change (docs, etc)
    - [ ] None of the above: (explain here)
    
    CI passes. Added new unit & integration tests.
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1208242198563722
    aulorbe committed Oct 23, 2024
    Copy the full SHA
    02f4ef9 View commit details
  4. Allow users to pass customField to /rerank endpoint (#303)

    ## Problem
    
    The current implementation of `/rerank` in the TS client does not
    (correctly) allow users to pass a custom field upon which to rerank.
    
    ## Solution
    
    Allow custom fields!
    
    Please reference this PR to account for all expected functionality:
    https://github.com/pinecone-io/python-plugin-inference/pull/21/files
    
    ## Type of Change
    
    - [ ] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [x] 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
    
    CI passes + reviewer xreferences PR above w/functionality introduced in
    this PR.
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1208523729730914
    
    ---------
    
    Co-authored-by: Jesse Seldess <j_seldess@hotmail.com>
    aulorbe and jseldess committed Oct 23, 2024
    Copy the full SHA
    4e655d3 View commit details
  5. Copy the full SHA
    f27db40 View commit details
  6. [skip ci] Publish release v4.0.0

    aulorbe committed Oct 23, 2024
    Copy the full SHA
    156b8e5 View commit details

Commits on Oct 29, 2024

  1. Add integration testing w/external NextJS app (Edge runtime) (#304)

    ## Problem
    
    We do not currently have a good way to test how our client behaves end
    to end in different environments. One of the chief problems our users
    have brought to our attention in the past is that some functionalities
    do not work in certain runtimes, e.g. Edge or Bun, and/or with certain
    frameworks, e.g. [NextJS](https://nextjs.org/docs).
    
    ## Solution
    
    Build an external application in a runtime and framework known to have
    caused problems in the past and test our client from the end-user's
    perspective.
    
    This PR introduces and end-to-end test suite that interacts with an
    external application written using the NextJS framework and the
    [Edge](https://vercel.com/docs/functions/edge-middleware/edge-runtime#edge-runtime)
    runtime.
    
    Note: the app is automagically run in `Edge` by way of it using
    [middleware](https://nextjs.org/docs/app/building-your-application/routing/middleware)
    (`middleware.ts`), and the [`Headers()`
    API](https://developer.mozilla.org/en-US/docs/Web/API/Headers).
    
    ## Overview of changes
    - We now have [a public
    repo](https://github.com/pinecone-io/ts-client-e2e-tests) that contains
    a super simple application that builds a Pinecone serverless index,
    seeds it with data, and queries that data. We plan to add more
    operations in the near future; this is just a start.
    - This sample application creates an API endpoint that our client repo
    can send a POST request to and assert on the response. If the endpoint
    fails to deliver the expected response, we know that something is wrong
    with the most recent changes we are proposing to introduce in the
    client.
    - This PR enables 2 types of interaction with the sample application:
    - Local end-to-end tests: for local runs, there is a new bash script
    that devs can execute. This will spin up the application on their
    `localhost:3000`.
    - CI end-to-end tests: for CI runs, we will now run this test
    automatically by way of adding it the `testing.yml` file that is run for
    each push to an open PR. In CI, the Github workflow and action hit the
    application's Vercel endpoint and assert on its response.
    - There is a new CONTRIBUTING.md file with some info on this new test
    suite + the other existing ones, as well as a new README in the
    `external-app` dir itself with more in depth information.
    
    ## 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)
    - [x] This change requires a documentation update
    - [x] Infrastructure change (CI configs, etc)
    - [x] Non-code change (docs, etc)
    - [ ] None of the above: (explain here)
    
    ## Test Plan
    
    If reviewers can pull down the code in this branch and try to run the
    tests locally, that'd be great.
    
    ## To Dos
    I'll add a README and a CONTRIBUTING file to [the external
    app](https://github.com/pinecone-io/ts-client-e2e-tests)
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1208129226784956
    aulorbe authored Oct 29, 2024
    Copy the full SHA
    d31d6da View commit details

Commits on Oct 31, 2024

  1. Rename previously-named e2e workflow to external-app for consiste…

    …ncy (#311)
    
    ## Problem
    
    This is a fast-follow from [the PR that introduced the external app
    testing for Edge
    runtimes](#304).
    We just need to rename the GH workflow to match the rest of the
    files/code in the client, which we couldn't do previously w/o creating a
    new workflow and merging it to `main`.
    
    ## 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)
    aulorbe authored Oct 31, 2024
    Copy the full SHA
    621384f View commit details

Commits on Nov 1, 2024

  1. Remove extra call to delete an already-deleted index in bulkImport

    …integration test (#313)
    
    ## Problem
    
    We kept getting errors in CI that part of the `bulkImport` integration
    test was failing because it could not find the given index name.
    
    ## Solution
    
    Turns out, we accidentally left in an extra call to `delete` after we
    had already deleted the index! This PR just removes that call :)
    
    ## 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
    
    CI passes w/flying colors 🚀 
    
    ---
    - To see the specific tasks where the Asana app for GitHub is being
    used, see below:
      - https://app.asana.com/0/0/1208633891828391
    aulorbe authored Nov 1, 2024
    Copy the full SHA
    26d31d7 View commit details
Showing 350 changed files with 23,199 additions and 9,967 deletions.
6 changes: 5 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,11 @@
"es2021": true,
"node": true
},
"ignorePatterns": ["dist", "src/pinecone-generated-ts-fetch"],
"ignorePatterns": [
"dist",
"src/pinecone-generated-ts-fetch",
"pinecone-rag-demo"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
85 changes: 85 additions & 0 deletions .github/actions/external-app/edge/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Spin up Vercel App

inputs:
vercel-token:
required: true
description: 'Vercel token to deploy the app'
PINECONE_API_KEY:
required: true
description: 'Pinecone API key to send requests to the Vercel app'

runs:
using: 'composite'
steps:
- name: Check out current repository (pinecone-ts-client)
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18.20.3'

- name: Build pinecone-ts-client code
run: npm install && npm run build
shell: bash

- name: Package pinecone-ts-client code
run: npm pack && echo "Step 4, running npm pack"
shell: bash

- name: Clone Vercel app
uses: GuillaumeFalourd/clone-github-repo-action@main
with:
owner: 'pinecone-io'
repository: 'ts-client-test-external-app'
branch: 'main'

- name: Install Vercel app dependencies
run: cd ts-client-test-external-app && npm install
shell: bash

- name: Move packed ts-client code into the Vercel app dir
run: cd ts-client-test-external-app && mv ../pinecone-database-pinecone-*.tgz .
shell: bash

- name: Install ts-client code into the Vercel app's package.json file
run: |
cd ts-client-test-external-app
npm install pinecone-database-pinecone-*.tgz
shell: bash

- name: Install Vercel CLI and (re)deploy the app
run: |
cd ts-client-test-external-app
npm install --global vercel@latest
vercel --token ${{ inputs.vercel-token }} --yes
vercel pull --yes --token ${{ inputs.vercel-token }}
vercel build --token ${{ inputs.vercel-token }}
vercel --token ${{ inputs.vercel-token }} --prod
shell: bash

- name: Hit Vercel app endpoint(s) via assertResponse.ts file
run: |
npm install -g typescript
npm install -g ts-node
export PINECONE_API_KEY="${{ inputs.PINECONE_API_KEY }}"
ciUrl='https://ts-client-test-external-app.vercel.app/api/createSeedQuery'
indexName=$(ts-node ts-external-app-test/assertResponse.ts "$ciUrl" | grep "Index name:" | awk '{print $NF}' | tr -d '\r')
echo "indexName=$indexName" >> $GITHUB_ENV
shell: bash

- name: Clean up test index(es)
run: |
PINECONE_API_KEY="${{ inputs.PINECONE_API_KEY }}"
matching_index="$indexName"
delete_response=$(curl -s -o /dev/null -w "%{http_code}" -X DELETE "https://api.pinecone.io/indexes/$matching_index" \
-H "Api-Key: $PINECONE_API_KEY")
if [ "$delete_response" -eq 202 ]; then
echo "Successfully deleted index: $matching_index"
else
echo "Failed to delete index: $matching_index. HTTP status code: $delete_response"
exit 1
fi
shell: bash
4 changes: 2 additions & 2 deletions .github/actions/npm-rc-release/action.yml
Original file line number Diff line number Diff line change
@@ -23,9 +23,9 @@ runs:
git config --global user.name "${{ inputs.git_username }}"
- name: 'Bump version'
shell: bash
run: npm version prerelease --preid=rc."${{ inputs.nameRc }}" --no-git-tag-version
run: npm version prerelease --preid=rc."${{ inputs.rc_name }}" --no-git-tag-version
- name: 'Publish to npm'
run: npm publish
run: npm publish --tag=RC
shell: bash
env:
NODE_AUTH_TOKEN: ${{ inputs.npm_token }}
4 changes: 2 additions & 2 deletions .github/workflows/release-rc.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ name: 'Release RC build'
on:
workflow_dispatch:
inputs:
nameRc:
rc_name:
description: 'Input which RC your code changes are for'
required: true
type: string
@@ -32,4 +32,4 @@ jobs:
git_email: clients@pinecone.io
git_username: ${{ github.actor }}
npm_token: ${{ secrets.NPM_TOKEN }}
nameRc: ${{ inputs.nameRc }}
rc_name: ${{ inputs.rc_name }}
112 changes: 83 additions & 29 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -4,24 +4,44 @@ on:
workflow_call: {}

jobs:
unit-tests:
name: Run unit tests
setup:
name: Setup
runs-on: ubuntu-latest
if: always()
outputs:
serverlessIndexName: ${{ steps.step3.outputs.SERVERLESS_INDEX_NAME }}
assistantName: ${{ steps.step3.outputs.ASSISTANT_NAME }}
testFile: ${{ steps.step3.outputs.TEST_FILE }}
steps:
- name: Checkout
- name: Checkout code
id: step1
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup
- name: Install dependencies
id: step2
run: npm ci

- name: Run tests
- name: Run setup script
id: step3
env:
CI: true
run: npm run test:unit -- --coverage
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
run: |
SETUP_OUTPUT=$(npx ts-node ./src/integration/setup.ts)
SERVERLESS_INDEX_NAME=$(echo "$SETUP_OUTPUT" | grep "SERVERLESS_INDEX_NAME=" | cut -d'=' -f2)
ASSISTANT_NAME=$(echo "$SETUP_OUTPUT" | grep "ASSISTANT_NAME=" | cut -d'=' -f2)
TEST_FILE=$(echo "$SETUP_OUTPUT" | grep "TEST_FILE=" | cut -d'=' -f2)
echo "SERVERLESS_INDEX_NAME=$SERVERLESS_INDEX_NAME" >> $GITHUB_OUTPUT
echo "ASSISTANT_NAME=$ASSISTANT_NAME" >> $GITHUB_OUTPUT
echo "TEST_FILE=$TEST_FILE" >> $GITHUB_OUTPUT
integration-tests:
needs: [setup]
name: Run integration tests
runs-on: ubuntu-latest
outputs:
serverlessIndexName: ${{ steps.runTests1.outputs.SERVERLESS_INDEX_NAME }}
assistantName: ${{ steps.runTests1.outputs.ASSISTANT_NAME }}
testFile: ${{ steps.runTests1.outputs.TEST_FILE }}
strategy:
fail-fast: false
max-parallel: 2
@@ -55,11 +75,19 @@ jobs:
bun-version: ${{ matrix.config.bun_version }}

- name: Run integration tests (Prod)
id: runTests1
if: matrix.pinecone_env == 'prod'
env:
CI: true
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
run: ${{ matrix.config.runner }} run test:integration:${{ matrix.config.jest_env }}
SERVERLESS_INDEX_NAME: ${{ needs.setup.outputs.serverlessIndexName}}
ASSISTANT_NAME: ${{ needs.setup.outputs.assistantName}}
TEST_FILE: ${{ needs.setup.outputs.testFile}}
run: |
${{ matrix.config.runner }} run test:integration:${{ matrix.config.jest_env }}
echo "SERVERLESS_INDEX_NAME=${{ needs.setup.outputs.serverlessIndexName}}" >> $GITHUB_OUTPUT
echo "ASSISTANT_NAME=${{ needs.setup.outputs.assistantName}}" >> $GITHUB_OUTPUT
echo "TEST_FILE=${{ needs.setup.outputs.testFile}}" >> $GITHUB_OUTPUT
- name: Run integration tests (Staging)
if: matrix.pinecone_env == 'staging'
@@ -69,28 +97,41 @@ jobs:
PINECONE_CONTROLLER_HOST: 'https://api-staging.pinecone.io'
run: ${{ matrix.config.runner }} run test:integration:${{ matrix.config.jest_env }}

integration-test-cleanup:
name: Clean up integration tests
if: always()
needs: [integration-tests]
teardown:
name: Teardown
needs: [integration-tests] # Ensure teardown only runs after test jobs
if: success()
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: 'https://registry.npmjs.org'
- name: Install npm packages

- name: Install dependencies
run: npm ci

- name: Run teardown script
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
SERVERLESS_INDEX_NAME: ${{ needs.integration-tests.outputs.serverlessIndexName}}
ASSISTANT_NAME: ${{ needs.integration-tests.outputs.assistantName}}
TEST_FILE: ${{ needs.integration-tests.outputs.testFile}}
run: |
npm install --ignore-scripts
shell: bash
- name: Run integration cleanup command
npx ts-node ./src/integration/teardown.ts
unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Run tests
env:
CI: true
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
run: npm run test:integration:cleanup
run: npm run test:unit -- --coverage

typescript-compilation-tests:
name: TS compile
@@ -100,10 +141,6 @@ jobs:
matrix:
tsVersion:
[
'~4.1.0',
'~4.2.0',
'~4.3.0',
'~4.4.0',
'~4.5.0',
'~4.6.0',
'~4.7.0',
@@ -112,6 +149,10 @@ jobs:
'~5.0.0',
'~5.1.0',
'~5.2.0',
'~5.3.0',
'~5.4.0',
'~5.5.0',
'~5.6.0',
'latest',
]
steps:
@@ -184,3 +225,16 @@ jobs:
run: |
cd semantic-search-example
npm run test
external-app:
name: external-app
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run external app tests
uses: ./.github/actions/external-app/edge
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -15,3 +15,11 @@ ts-compilation-test/lib/
.vscode
.DS_Store
scratch

# Jetbrains
.idea
*.iml

# External app testing dir
ts-client-test-external-app/
.next/
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Contributing

We welcome contributions to this project.

## Repl

For quick troubleshooting, there is a repl available by running `npm run repl`. This will start a Node.js repl with the
`@pinecone-io/client` package preloaded. The `npm` command runs the file `utils/replInit.ts`.

## Local testing

To run all tests locally, excluding the unit tests, you will need to set your Pinecone API key to an environment
variable (or hard-code it in a .env file in this repo).

You can retrieve your API key from [app.pinecone.io](https://app.pinecone.io).

```bash
export PINECONE_API_KEY=your_api_key
```

To see the exact commands run by the aliases mentioned in this doc, see the `scripts` section in the `package.json`
file.

### Unit tests

Simply run `npm run test:unit` to run all unit tests.

### Integration tests

Simply run `npm run test:integration-local:<runtime>` to run all integration tests, substituting `<runtime>` with
either `node` or `edge` as you see fit.

### External app tests

Simply run `npm run test:external-app-local` to run all tests that integrate with the `ts-client-test-external-app` repo:

The `npm` command runs the bash file located in the `src/external-app` directory.
Loading