Skip to content

fix: PouchStorageTable using incorrect $ne operator#2011

Merged
AkshatJawne merged 6 commits intodeephaven:mainfrom
AkshatJawne:1505-pouch-storage-table-ne-fix
May 15, 2024
Merged

fix: PouchStorageTable using incorrect $ne operator#2011
AkshatJawne merged 6 commits intodeephaven:mainfrom
AkshatJawne:1505-pouch-storage-table-ne-fix

Conversation

@AkshatJawne
Copy link
Copy Markdown
Contributor

@AkshatJawne AkshatJawne commented May 14, 2024

Resolves #1505

Changes:

  • Modified PouchFilter type to use $ne instead of $neq
  • Modified $regex prop to be able to accept RegExp and string, rather than just string by default

Steps Moving Forward:

  • Code change is implemented, having difficulty with imports when trying to run Unit Tests (did not commit the file yet)

Update: Apparently, there are some issues with PouchDB and jest tests, since it has not been updated to an ES6 module. (https://stackoverflow.com/questions/64905287/import-error-when-running-jest-tests-that-use-the-pouchdb-asyncstorage-adapter). Could create a babel.config.js, but not sure if we want to do that just for a function that is never used beyond an internal scope. Thus, going to omit unit tests for now.

@AkshatJawne AkshatJawne self-assigned this May 14, 2024
@AkshatJawne AkshatJawne marked this pull request as draft May 14, 2024 13:44
@AkshatJawne AkshatJawne marked this pull request as ready for review May 14, 2024 13:51
@AkshatJawne AkshatJawne requested review from bmingles and mofojed May 14, 2024 14:12
@dsmmcken
Copy link
Copy Markdown
Contributor

Re-ran your failed e2e and it passed. I think it was just webkit timeouts, we are working to fix that.

Comment thread packages/pouch-storage/src/PouchStorageTable.ts
Comment thread packages/pouch-storage/src/PouchStorageTable.ts Outdated
@AkshatJawne AkshatJawne requested a review from bmingles May 14, 2024 17:15
Comment thread packages/pouch-storage/src/PouchStorageTable.ts Outdated
@AkshatJawne AkshatJawne requested a review from mofojed May 14, 2024 19:41
Comment thread packages/pouch-storage/src/PouchStorageTable.test.ts
@AkshatJawne AkshatJawne requested a review from bmingles May 15, 2024 13:31
@AkshatJawne
Copy link
Copy Markdown
Contributor Author

@bmingles Have added the test cases for the regex types, however,a fter adding them I kept getting this error:
image

Figured that there was an issue with our old regex (but may have never been picked up given the any type), so I modified it. Let me know what you think about this

Comment thread packages/pouch-storage/src/PouchStorageTable.ts
@AkshatJawne AkshatJawne requested a review from bmingles May 15, 2024 14:55
Copy link
Copy Markdown
Contributor

@bmingles bmingles left a comment

Choose a reason for hiding this comment

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

LGTM

@AkshatJawne AkshatJawne merged commit 6cf1240 into deephaven:main May 15, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PouchStorageTable using incorrect $ne operator

4 participants