Opened 17 months ago

Closed 4 months ago

#33817 closed New feature (fixed)

Use python-oracledb instead of cx-oracle

Reported by: Alexander Shishenko Owned by: Jingbei Li
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: oracle
Cc: Florian Apolloner, Christopher Jones, Colin Murtaugh, Marti Raudsepp Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

There is a new library for Oracle databases: https://oracle.github.io/python-oracledb/.
It is intended to replace cx-oracle eventually, and it is fully compatible with it. It supports so-called “thin” mode, which can be used without installing Oracle binary client libraries.
That could be beneficial in some scenarios.

Change History (30)

comment:1 Changed 17 months ago by Mariusz Felisiak

Cc: Florian Apolloner Christopher Jones added
Component: UncategorizedDatabase layer (models, ORM)
Keywords: oracle added
Triage Stage: UnreviewedAccepted
Type: UncategorizedNew feature

Thanks for the report, see the django-developers thread for a discussion of potential ways to move this forward:

I'd prefer adding support for python-oracledb in Django 4.2 and immediately deprecate using cx_Oracle (will be removed in Django 5.1).

comment:2 Changed 16 months ago by Mariusz Felisiak

Has patch: set
Needs documentation: set
Needs tests: set
Owner: changed from nobody to Jingbei Li
Patch needs improvement: set
Status: newassigned

comment:3 Changed 16 months ago by Colin Murtaugh

Cc: Colin Murtaugh added

comment:4 Changed 14 months ago by Jingbei Li

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

I've fixed the patch, tests and documentation. And this ticket is now ready for review.

comment:5 Changed 14 months ago by Suraj Shaw

Triage Stage: AcceptedReady for checkin

comment:6 Changed 13 months ago by Marti Raudsepp

Cc: Marti Raudsepp added

comment:7 Changed 11 months ago by Mariusz Felisiak

Needs documentation: set
Needs tests: set
Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

comment:8 Changed 9 months ago by Jingbei Li

Needs documentation: unset
Patch needs improvement: unset

comment:9 Changed 8 months ago by Suraj Shaw

Needs tests: unset

comment:10 Changed 8 months ago by Suraj Shaw

Triage Stage: AcceptedReady for checkin

comment:11 Changed 8 months ago by Mariusz Felisiak

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

comment:12 Changed 8 months ago by Suraj Shaw

Triage Stage: AcceptedReady for checkin

comment:13 Changed 8 months ago by Mariusz Felisiak

Triage Stage: Ready for checkinAccepted

Suraj, why did you changed the status? Oracle tests still crash with this patch, it's not ready for checkin.

comment:14 Changed 6 months ago by Suraj Shaw

@Mariusz Felisiak I tested this patch for oracle tests and i am not seeing any error with 19c db as well as 21c. Shall we change the status from accepted to ready for checkin?

comment:15 in reply to:  14 ; Changed 6 months ago by Mariusz Felisiak

Replying to Suraj Shaw:

@Mariusz Felisiak I tested this patch for oracle tests and i am not seeing any error with 19c db as well as 21c. Shall we change the status from accepted to ready for checkin?

It crashes on our setup, so it's not ready. We cannot permanently break our CI.

comment:16 in reply to:  15 Changed 6 months ago by Suraj Shaw

Replying to Mariusz Felisiak:

Replying to Suraj Shaw:

@Mariusz Felisiak I tested this patch for oracle tests and i am not seeing any error with 19c db as well as 21c. Shall we change the status from accepted to ready for checkin?

It crashes on our setup, so it's not ready. We cannot permanently break our CI.

In the setup integration it seems to be using 19c db. Shall we look out to upgrade it to 23c. It may or may not resolve the crash issue but it may be needed at some stage anyway.

comment:17 Changed 6 months ago by Mariusz Felisiak

In the setup integration it seems to be using 19c db. Shall we look out to upgrade it to 23c. It may or may not resolve the crash issue but it may be needed at some stage anyway.

Oracle 19c will be supported 4 more years, so I see no reason to bump it now. First of all it's really time-consuming (at least few days of my work). Secondly Oracle 23c is not officially supported by python-oracledb or cx_Oracle.

comment:18 in reply to:  17 ; Changed 6 months ago by Suraj Shaw

Replying to Mariusz Felisiak:

In the setup integration it seems to be using 19c db. Shall we look out to upgrade it to 23c. It may or may not resolve the crash issue but it may be needed at some stage anyway.

Oracle 19c will be supported 4 more years, so I see no reason to bump it now. First of all it's really time-consuming (at least few days of my work). Secondly Oracle 23c is not officially supported by python-oracledb or cx_Oracle.

Oracle 23c is officially supported and i guess it may help us to get past the crash impasse.

comment:19 in reply to:  18 Changed 6 months ago by Mariusz Felisiak

Oracle 23c is officially supported and i guess it may help us to get past the crash impasse.

Again, Oracle 19c will be supported 4 more years, so I see no reason to bump it now. We cannot drop support for it just because we don't know why it crashes with this patch.

comment:20 Changed 6 months ago by Suraj Shaw

@Mariusz Felisiak Any leads how shall we proceed further to this PR to land it as soon as possible since its quite long we have been waiting for this feature to be present in django.

comment:21 in reply to:  20 Changed 6 months ago by Florian Apolloner

Replying to Suraj Shaw:

@Mariusz Felisiak Any leads how shall we proceed further to this PR to land it as soon as possible since its quite long we have been waiting for this feature to be present in django.

As Mariusz already pointed out more than once: Oracle 19c is and still will be supported for a while. So you will need to fix the PR for Oracle 19, once that is done it can get reviewed.

comment:22 Changed 6 months ago by Christopher Jones

It's not easy to fix something that doesn't reproduce, and where log files are not available !

comment:23 Changed 6 months ago by Florian Apolloner

Which logs would be needed? The CI job logs are public. If you think it is in the Oracle logs, please tell us which logs would be relevant or which config changes would be required to obtain the necessary logs, then it would be easier for the people having access to help you.

Maybe we can schedule a live session with someone who has access to the server and someone with knowledge of the oracle changes, so it could be debugged live?

Last edited 6 months ago by Florian Apolloner (previous) (diff)

comment:24 Changed 6 months ago by Christopher Jones

We (Oracle) can assist on a live session if we can get someone who can handle the Django infrastructure questions. We span a few timezones. What's convenient? Send me email addresses (mine is in my profile https://github.com/cjbj) to invite.

comment:25 Changed 5 months ago by Florian Apolloner

@MarkusH: Can you or someone else from ops help out here (another option would be to temporarily give me access to the CI boxes again)?

comment:26 Changed 5 months ago by Mariusz Felisiak

I can take a look but not in June, maybe in July or August. It's not high on my priority list. I've already spent too much time in June keeping the Oracle backend as functional as the others. As far as I'm aware, it's an issue in python-oracledb or one of the libraries it uses. Of course, we will help you (Oracle) with debugging, even considering the fact that you've never helped us maintain the Oracle backend by providing infrastructure, knowledge, or money. You have to wait patiently like everyone else. It's an open-source.

comment:27 Changed 5 months ago by Suraj Shaw

After following the logs that has been uploaded , it looks like it is crashing inside the code that is displaying all of the variables in the stack. In the debugging code if it can be disabled it may help us to find out what the real issue is.

comment:28 Changed 4 months ago by Mariusz Felisiak

Patch needs improvement: unset

comment:29 Changed 4 months ago by Mariusz Felisiak

Triage Stage: AcceptedReady for checkin

comment:30 Changed 4 months ago by Mariusz Felisiak <felisiak.mariusz@…>

Resolution: fixed
Status: assignedclosed

In 9946f0b:

Fixed #33817 -- Added support for python-oracledb and deprecated cx_Oracle.

Note: See TracTickets for help on using tickets.
Back to Top