[Django] #35222: Update tablespaces tests

24 views
Skip to first unread message

Django

unread,
Feb 16, 2024, 9:17:36 AM2/16/24
to django-...@googlegroups.com
#35222: Update tablespaces tests
-------------------------------------+-------------------------------------
Reporter: bcail | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database | Version: dev
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Tablespaces tests currently have a note saying that DEFAULT_TABLESPACE and
DEFAULT_INDEX_TABLESPACE can't be tested. The test models are marked as
unmanaged, then changed to managed, ...

Couldn't we re-write these tests using models defined in the test, so
these issues would go away? I'm thinking of something like in the schema
tests.

I came across this issue when working on ticket #20960.
--
Ticket URL: <https://code.djangoproject.com/ticket/35222>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 16, 2024, 9:20:08 AM2/16/24
to django-...@googlegroups.com
#35222: Update tablespaces tests
-------------------------------------+-------------------------------------
Reporter: bcail | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by bcail:

Old description:

> Tablespaces tests currently have a note saying that DEFAULT_TABLESPACE
> and DEFAULT_INDEX_TABLESPACE can't be tested. The test models are marked
> as unmanaged, then changed to managed, ...
>
> Couldn't we re-write these tests using models defined in the test, so
> these issues would go away? I'm thinking of something like in the schema
> tests.
>
> I came across this issue when working on ticket #20960.

New description:

Tablespaces tests currently have a note saying that DEFAULT_TABLESPACE and
DEFAULT_INDEX_TABLESPACE can't be tested. The test models are marked as
unmanaged, then changed to managed, ...

Couldn't we re-write these tests using models defined in the test, so
these issues would go away? I'm thinking of something like in the schema
tests.

I came across this issue when working on ticket #20960.

(Note: I had to take out the URLs because they're being rejected as
"potential spam.")

--
--
Ticket URL: <https://code.djangoproject.com/ticket/35222#comment:1>

Django

unread,
Feb 16, 2024, 9:21:03 AM2/16/24
to django-...@googlegroups.com
#35222: Update tablespaces tests
-------------------------------------+-------------------------------------
Reporter: bcail | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by bcail:

Old description:

> Tablespaces tests currently have a note saying that DEFAULT_TABLESPACE
> and DEFAULT_INDEX_TABLESPACE can't be tested. The test models are marked
> as unmanaged, then changed to managed, ...
>
> Couldn't we re-write these tests using models defined in the test, so
> these issues would go away? I'm thinking of something like in the schema
> tests.
>
> I came across this issue when working on ticket #20960.
>
> (Note: I had to take out the URLs because they're being rejected as
> "potential spam.")

New description:

Tablespaces tests currently have a note saying that DEFAULT_TABLESPACE and
DEFAULT_INDEX_TABLESPACE can't be tested. The test models are marked as
unmanaged, then changed to managed, ...

Couldn't we re-write these tests using models defined in the test, so
these issues would go away? I'm thinking of something like what's used in
the schema tests.

I came across this issue when working on ticket #20960.

(Note: I had to take out the URLs because they're being rejected as
"potential spam.")

--
--
Ticket URL: <https://code.djangoproject.com/ticket/35222#comment:2>

Django

unread,
Feb 16, 2024, 10:20:14 AM2/16/24
to django-...@googlegroups.com
#35222: Update tablespaces tests
-------------------------------------+-------------------------------------
Reporter: bcail | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Core (Other) | Version: dev
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* component: Database layer (models, ORM) => Core (Other)
* resolution: => needsinfo
* status: new => closed

Comment:

As far as I'm aware, you think that these tests should be improved but
without any concrete proposition. I don't think it's really worth spending
time on it, but I'm happy to review your patch.

We can reconsider this decision if you (someone) provide PoC.
--
Ticket URL: <https://code.djangoproject.com/ticket/35222#comment:3>

Django

unread,
Feb 19, 2024, 12:32:00 PM2/19/24
to django-...@googlegroups.com
#35222: Update tablespaces tests
-------------------------------------+-------------------------------------
Reporter: bcail | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by bcail):

* resolution: needsinfo =>
* status: closed => new

Comment:

I opened a [https://github.com/django/django/pull/17882 draft PR]. It
removes the need for having to change models from unmanaged to managed,
and tests with and without the DEFAULT_INDEX_TABLESPACE being set.

If we use these changes, we could also add tests for the
DEFAULT_TABLESPACE, and update tests in `tests/model_indexes/tests.py`.
--
Ticket URL: <https://code.djangoproject.com/ticket/35222#comment:4>

Django

unread,
Feb 19, 2024, 2:41:30 PM2/19/24
to django-...@googlegroups.com
#35222: Update tablespaces tests
-------------------------------------+-------------------------------------
Reporter: bcail | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Core (Other) | Version: dev
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by bcail):

* resolution: => invalid
* status: new => closed

--
Ticket URL: <https://code.djangoproject.com/ticket/35222#comment:5>
Reply all
Reply to author
Forward
0 new messages