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

fix: consider leafs with filter in ref #440

Merged
merged 1 commit into from
Feb 5, 2024
Merged

fix: consider leafs with filter in ref #440

merged 1 commit into from
Feb 5, 2024

Conversation

danjoa
Copy link
Contributor

@danjoa danjoa commented Feb 4, 2024

→ looks like some our pipelines are blocked by that

@danjoa danjoa added the bug Something isn't working label Feb 4, 2024
@danjoa danjoa changed the title URGENT: fix bug with missing ref.id || ref fix: URGENT: fix bug with missing ref.id || ref Feb 4, 2024
@danjoa danjoa enabled auto-merge (squash) February 4, 2024 18:59
@patricebender patricebender changed the title fix: URGENT: fix bug with missing ref.id || ref fix: consider leafs with filter in ref Feb 5, 2024
Copy link
Member

@patricebender patricebender left a comment

Choose a reason for hiding this comment

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

Could you please send me a log which shows what goes wrong? Want to investigate :) The fix seems obvious though, thanks!

@danjoa danjoa merged commit 3e2ef24 into main Feb 5, 2024
7 of 8 checks passed
@danjoa danjoa deleted the fix-ref.id-bug branch February 5, 2024 08:05
@cap-bots cap-bots mentioned this pull request Feb 5, 2024
patricebender added a commit that referenced this pull request Feb 5, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>db-service: 1.6.1</summary>

##
[1.6.1](db-service-v1.6.0...db-service-v1.6.1)
(2024-02-05)


### Fixed

* URGENT: fix bug with missing ref.id || ref
([#440](#440))
([3e2ef24](3e2ef24))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Patrice Bender <[email protected]>
@danjoa
Copy link
Contributor Author

danjoa commented Feb 5, 2024

Could you please send me a log which shows what goes wrong? Want to investigate :) The fix seems obvious though, thanks!

👍 → that was this failing test here:

Summary of all failing tests
 FAIL  tests/_runtime/cds-services/__tests__/integration/with-ql/api/ql.test.js (72.14 s)
   UPDATE  sub select with path

    TypeError: str.lastIndexOf is not a function

      2107 |  */
      2108 | function getLastStringSegment(str) {
    > 2109 |   const index = str.lastIndexOf('.')
           |                     ^
      2110 |   return index != -1 ? str.substring(index + 1) : str
      2111 | }
      2112 |

      at lastIndexOf (../cds-dbs/db-service/lib/cqn4sql.js:2109:21)
      at getLastStringSegment (../cds-dbs/db-service/lib/cqn4sql.js:920:9)
      at assignUniqueSubqueryAlias (../cds-dbs/db-service/lib/cqn4sql.js:914:49)
      at transformSubquery (../cds-dbs/db-service/lib/cqn4sql.js:1368:22)
      at getTransformedTokenStream (../cds-dbs/db-service/lib/cqn4sql.js:64:31)
      at SQLiteService.cqn4sql (../cds-dbs/db-service/lib/SQLService.js:349:12)
      at SQLiteService.cqn4sql (../cds-dbs/db-service/lib/SQLService.js:325:18)
      at SQLiteService.cqn2sql [as onSELECT] (../cds-dbs/db-service/lib/SQLService.js:118:39)
      at call (lib/srv/srv-dispatch.js:79:36)
      at SQLiteService.handle (lib/srv/srv-dispatch.js:83:6)
      at SQLiteService.handle [as dispatch] (lib/srv/srv-dispatch.js:45:15)
      at SQLiteService.dispatch (lib/srv/srv-tx.js:207:15)
      at ApplicationService.<anonymous> (tests/_runtime/cds-services/__tests__/integration/with-ql/api/ql.test.js:118:7)
      at next (lib/srv/srv-dispatch.js:79:17)
      at ApplicationService.handle (lib/srv/srv-dispatch.js:77:10)
      at libx/_runtime/cds-services/adapter/odata-v4/handlers/action.js:53:16

   UPDATE  sub select with path

    thrown: "Exceeded timeout of 66666 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      355 |   })
      356 |
    > 357 |   test('sub select with path', async () => {
          |   ^
      358 |     const res = await request(app).post(`/bookshop-ql/subSelectWithPath`).send({}).expect(200)
      359 |     expect(res.body.value).toBe(1)
      360 |   })

      at test (tests/_runtime/cds-services/__tests__/integration/with-ql/api/ql.test.js:357:3)
      at Object.describe (tests/_runtime/cds-services/__tests__/integration/with-ql/api/ql.test.js:11:1)


Test Suites: 1 failed, 7 skipped, 299 passed, 300 of 307 total
Tests:       1 failed, 270 skipped, 4 todo, 5311 passed, 5586 total
Snapshots:   0 total
Time:        181.721 s
npm ERR! Lifecycle script `test` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: @sap/cds@7.7.0 
npm ERR!   at location: /__w/cds/cds/dev/cds 
Error: Process completed with exit code 1.

@cap-bots cap-bots mentioned this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants