Skip to content

Add control plane integration tests - #223

Closed
austin-denoble wants to merge 1 commit into
mainfrom
adenoble/control-plane-integration-tests
Closed

austin-denoble wants to merge 1 commit into
mainfrom
adenoble/control-plane-integration-tests

Conversation

@austin-denoble

Copy link
Copy Markdown
Member

Problem

Our Python client doesn't have true integration tests. Currently, we have tests under /integ/test_index.py which mock all the requests and responses and primarily stress the connections between various elements of the client codebase. Fleshing out integration tests would help us have more confidence when making changes to the Python client, especially when involving the network layer.

Solution

The plan is to split between control plane and data plane tests. For PRs I thought it'd be reasonable to split things out, and then finish off with CI changes to bring everything together.

  • Add a new section for integration tests under /tests/integration/control/
  • Implement control plane integration tests:
    • test_create_index.py
    • test_configure_index.py
    • test_describe_index.py
    • test_list_indexes.py

Currently, the entire control plane suite completes in about ~35 seconds or so. sdk-python-testing currently has a Pod Limit of 7, and these seem to complete fine, but I'd like to get quote bumped to reduce possibility of flaking.

Screenshot 2023-10-19 at 1 45 55 PM

**Question: ** Should I look at rolling some collection tests here as well?

Type of Change

  • Infrastructure change (CI configs, etc)

Test Plan

Currently, these tests aren't being run in CI. That will come in a following PR. The environment variables that are used will be setup in GitHub secrets for the repo/workflows.

To test locally, you'll need to set environment variables and then call pytest:

$ export PINECONE_API_KEY="my-api-key"
$ export PINECONE_ENVIRONMENT="my-environment"

$ poetry run pytest tests/integration/control/
...

@jackpertschuk

Copy link
Copy Markdown
Contributor

is this for new version of the SDKs or old?

@austin-denoble

austin-denoble commented Oct 19, 2023 •

Copy link
Copy Markdown
Member Author

is this for new version of the SDKs or old?

@jackpertschuk Old technically, but we'll be updating them around the changes for the new SDK.

@jhamon
jhamon deleted the adenoble/control-plane-integration-tests branch June 20, 2024 23:14
NishchayMahor pushed a commit to NishchayMahor/python-sdk-1 that referenced this pull request Sep 22, 2026
pinecone-io#108) (pinecone-io#223)

Adds the admin Invites namespace: `admin.invites.list/create/describe/
delete/resend`, an `AdminAdapter.to_invite`/`to_invite_list` pair, a lazy
`Admin.invites` property, and a docs section. Follows the Users resource
(pinecone-io#107) exactly, including its ratified conventions: `limit` is the
per-page query parameter (1-100), not a total-items cap, and email format
is the server's business, not the SDK's.

`create()` accepts `RoleBindingInput` models and plain dicts
interchangeably and normalizes both to one wire shape, omitting
`resource_id` for organization scope rather than sending null. Every
client-side rejection names the offending entry's index, because the
server's 400 cannot say which one it tripped over.

`list()` omits processed invites and `resend()` can 429; both are
documented as warnings, since an agent that misses either will read
absence as deletion or retry a rate limit in a tight loop.
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