Repository navigation
feat: add beforePoolAcquire and afterPoolAcquire hooks. - #15859
Conversation
|
I'm so sorry to change my mind at the last minute on the API name but I think 'after/beforePoolAcquire' would be a better name? |
You're right, the name will be more descriptive this way. Changing the naming is the least. 😄 |
|
@ephys Hooks are renamed. 😄 Some pipeline steps failed, but I don't think this is caused by my changes. I've run those test locally without an error. Please let me know if it's just me who don't see a problem. |
|
Those are flaky, but I'll rerun them to be sure |
|
Hi @ephys, I would like to ask you if it would be possible that these changes I made would also be added to the v6, so we can start using it. Of course, if these changes are okay. |
|
@ephys I've made PR changes. Some step failed because of connection refused. Is this caused by my changes? I've run tests locally for som dialects and they run without errors. I don't want to spam pipeline with some guessed changes. Can you tell? |
|
Unit tests can't use the database, you'll need to add your test to the integration test folder :) |
|
@ephys PR is updated 😊 thanks for your help, I didn't notice that im writing it into unit tests. |
ephys
left a comment
There was a problem hiding this comment.
Assuming tests pass, this looks good to me :)
|
@ephys are there any steps that I should take or is that all? As you mentioned in the readme in contribution steps, I also opened some minor changes to the documentation. Will this hook be available in v6 version of sequelize or not for now? 😊 Sorry for many questions but I am curious. |
|
@ephys Hi, I'm trying to fix failed test for sqlite dialect. When I debug it `this.sequelize.authenticate()' is not calling hooks I want (spy is called 0 times). But for example in Postgres it's okay. Can you tell me some possible solutions? I did not work with sqlite in past, so it's harder for me tell why can be this error caused. |
|
Oh I thought I answered this yesterday but I'm not seeing my message 😅
We can publish in it v6 too. This PR targets the branch used for the v7 release, but if you open the same PR against the
I saw :) We'll review it once this & the v6 version are merged |
|
@ephys PR is updated. You can check. 😊 I'm going to open the same PR against v6. 🙏🏽 |
WikiRik
left a comment
There was a problem hiding this comment.
1 small remark, but looks good. Thanks for the PR!
|
@WikiRik No problem, done. 😊 |
Pull Request Checklist
Description Of Change
Link to issue: #15724