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

chore(indexer): add v2 api route, don't include schemas table by default #3475

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JamesLefrere
Copy link
Contributor

@JamesLefrere JamesLefrere commented Jan 21, 2025

Fixes #3386

  • Add an /api/2/logs route and deprecate the previous version (which remains in operation under the current route /api/logs for backwards compatibility)
  • Intentionally repeat the code verbatim (but without the unwanted filters) so that future modifications do not break third party uses of the v1 route.
  • Use the v2 api for logs in the indexer client
  • Always add the schemas table to the filters in createStoreSync, as this is no longer included by default in the indexer v2 api
  • Remove redundant filter for schemas table in getRecords
  • The only other instance of getting indexer logs that requires the schemas table—the public SQL API's getSnapshot—calls createStoreSync internally, so this can remain unchanged.

TODO

  • Build and tests pass locally
  • Add e2e test
  • Test with example apps, ensure tables are created in different storage types

- Add an `/api/2/logs` route and deprecate the previous version (which remains in operation under the current route `/api/logs` for backwards compatibility)
- Intentionally repeat the code verbatim (but without the unwanted filters) so that future modifications do not break third party uses of the v1 route.
- Use the v2 api for logs in the indexer client
- Always add the schemas table to the filters in `createStoreSync`, as this is no longer included by default in the indexer v2 api
- Remove redundant filter for schemas table in `getRecords`
- The only other instance of getting indexer logs that requires the schemas table—the public SQL API's `getSnapshot`—calls `createStoreSync` internally, so this can remain unchanged.
Copy link

changeset-bot bot commented Jan 21, 2025

⚠️ No Changeset found

Latest commit: ec4c0c0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ludns
Copy link
Member

ludns commented Jan 21, 2025

Could you use v2 instead of 2 in the url? ie: /api/v2/logs

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.

Don't default to including store.Tables logs in /api/logs response
2 participants