Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

for cds^4.4 (to be released) #54

Closed
wants to merge 5 commits into from
Closed

Conversation

sjvans
Copy link
Contributor

@sjvans sjvans commented Dec 1, 2020

No description provided.

@gregorwolf
Copy link
Contributor

Hi @sjvans,

as CDS 4.4.4 is already available I've gave it a try. But it seems that your change doesn't work completely yet. Your original correction fails with:

TypeError: Cannot read property 'query' of undefined

as this.dbc isn't initialized. Changing it to0:

    this.on(['BEGIN', 'COMMIT', 'ROLLBACK'], async function (req) {
      if (!this.dbc && req.event === 'BEGIN') {
        this.dbc = await this.acquire(req)
      }
      return this.dbc.query(req.event)
    })

doesn't solve it as the connection seems not to be released. But with our original code we currently get "Release called on client which has already been released to the pool.".

Best regards
Gregor

@@ -63,7 +63,7 @@
"supertest": "^6.0.1",
"uuidv4": "^6.2.4"
},
"husky": {
"_husky": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not simply deactivate husky. Please check out CONTRIBUTING.md#other-thingies how to format commit messages to be OK for the check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CONTRIBUTING.md#other-thingies

hi @gregorwolf

the pr was only meant as pointer, not as contribution ;)

tests are running now (cf. require of deploy), but an expect is not fulfilled anymore...

@gregorwolf
Copy link
Contributor

OK, I've created #77 which includes this changes.

@gregorwolf gregorwolf closed this Dec 8, 2020
@Sandeep-Malhotra
Copy link

Hello
Kindly let me know as I am getting below mentioned error.
Release called on client which has already been released to the pool.
I have even tried both cds version 4.3.1 and 4.4.4 got the same issue
Thanks in advance.
Regards
Sandeep

@vobu
Copy link
Collaborator

vobu commented Dec 8, 2020

Release called on client which has already been released to the pool.
I have even tried both cds version 4.3.1 and 4.4.4 got the same issue

please try the latest release.

@Sandeep-Malhotra
Copy link

All fixed thanks for providing a quick fix.
Really appreciate your assistance

@sjvans
Copy link
Contributor Author

sjvans commented Dec 8, 2020

But with our original code we currently get "Release called on client which has already been released to the pool.".

hi @gregorwolf

this looks like a compatibility issue between cds and cds-runtime. i.e., if you do an npm install now with cds@4.3, you will get cds-runtime^2.7, which are not compatible. hence, it might be best to add cds-runtime in the list of dependencies, e.g. cds~4.4 and cds-runtime~2.7. additionally, every consuming project should have a package-lock.json to avoid this.

best,
sebastian

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.

None yet

4 participants