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

pythonPackages.django-debug-toolbar: 3.2.4 -> 3.4 #171764

Closed
wants to merge 1 commit into from

Conversation

yuuyins
Copy link
Contributor

@yuuyins yuuyins commented May 6, 2022

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@yuuyins
Copy link
Contributor Author

yuuyins commented May 6, 2022

can someone test the nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"?

@yuuyins yuuyins marked this pull request as ready for review May 6, 2022 16:16
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/1016/12

@fabaff
Copy link
Member

fabaff commented May 6, 2022

error: builder for '/nix/store/rkziazqqjc9hs6jg14w903c2f91g9fj9-python3.9-django-debug-toolbar-3.4.drv' failed with exit code 1;
       last 10 log lines:
       >     await asyncio.create_task(task())
       >   File "/build/source/tests/panels/test_sql.py", line 109, in task
       >     await sync_to_async(sql_call)()
       > AssertionError: SQLQueryTriggered not raised
       >
       > ----------------------------------------------------------------------
       > Ran 138 tests in 2.778s
       >
       > FAILED (failures=1, skipped=13)
       > Destroying test database for alias 'default'...
       For full logs, run 'nix log /nix/store/rkziazqqjc9hs6jg14w903c2f91g9fj9-python3.9-django-debug-toolbar-3.4.drv'.

@yuuyins yuuyins marked this pull request as draft May 6, 2022 16:41
@yuuyins
Copy link
Contributor Author

yuuyins commented May 6, 2022

@fabaff ah i'm sorry i thought i had built it successfully.

@yuuyins
Copy link
Contributor Author

yuuyins commented May 9, 2022

check phase fails with

python3.9-django-debug-toolbar> shrinking RPATHs of ELF executables and libraries in /nix/store/s3j82nksp55mlwpixriscybsvfz99ws2-python3.9-django-debug-toolbar-3.4
python3.9-django-debug-toolbar> strip is /nix/store/k0np19xv7wjc1grhrb2y6r85qiv1cikd-gcc-wrapper-11.2.0/bin/strip
python3.9-django-debug-toolbar> stripping (with command strip and flags -S) in /nix/store/s3j82nksp55mlwpixriscybsvfz99ws2-python3.9-django-debug-toolbar-3.4/lib
python3.9-django-debug-toolbar> patching script interpreter paths in /nix/store/s3j82nksp55mlwpixriscybsvfz99ws2-python3.9-django-debug-toolbar-3.4
python3.9-django-debug-toolbar> checking for references to /build/ in /nix/store/s3j82nksp55mlwpixriscybsvfz99ws2-python3.9-django-debug-toolbar-3.4...
python3.9-django-debug-toolbar> Executing pythonRemoveTestsDir
python3.9-django-debug-toolbar> Finished executing pythonRemoveTestsDir
python3.9-django-debug-toolbar> running install tests
python3.9-django-debug-toolbar> Creating test database for alias 'default'...
python3.9-django-debug-toolbar> System check identified no issues (0 silenced).
python3.9-django-debug-toolbar> ................................................F...ss....s.....s.s...............................s............................sssssss....
python3.9-django-debug-toolbar> ======================================================================
python3.9-django-debug-toolbar> FAIL: test_cursor_wrapper_asyncio_ctx (tests.panels.test_sql.SQLPanelTestCase)
python3.9-django-debug-toolbar> ----------------------------------------------------------------------
python3.9-django-debug-toolbar> Traceback (most recent call last):
python3.9-django-debug-toolbar>   File "/nix/store/54cz3yrllb9b2bgwkrf3kxrcr0z8yj79-python3.9-asgiref-3.5.0/lib/python3.9/site-packages/asgiref/sync.py", line 204, in __call__
python3.9-django-debug-toolbar>     return call_result.result()
python3.9-django-debug-toolbar>   File "/nix/store/33hlmb4afkk7l2fapfik80m6yknjxq10-python3-3.9.12/lib/python3.9/concurrent/futures/_base.py", line 439, in result
python3.9-django-debug-toolbar>     return self.__get_result()
python3.9-django-debug-toolbar>   File "/nix/store/33hlmb4afkk7l2fapfik80m6yknjxq10-python3-3.9.12/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
python3.9-django-debug-toolbar>     raise self._exception
python3.9-django-debug-toolbar>   File "/nix/store/54cz3yrllb9b2bgwkrf3kxrcr0z8yj79-python3.9-asgiref-3.5.0/lib/python3.9/site-packages/asgiref/sync.py", line 270, in main_wrap
python3.9-django-debug-toolbar>     result = await self.awaitable(*args, **kwargs)
python3.9-django-debug-toolbar>   File "/nix/store/33hlmb4afkk7l2fapfik80m6yknjxq10-python3-3.9.12/lib/python3.9/unittest/mock.py", line 1353, in patched
python3.9-django-debug-toolbar>     return await func(*newargs, **newkeywargs)
python3.9-django-debug-toolbar>   File "/build/source/tests/panels/test_sql.py", line 112, in test_cursor_wrapper_asyncio_ctx
python3.9-django-debug-toolbar>     await asyncio.create_task(task())
python3.9-django-debug-toolbar>   File "/build/source/tests/panels/test_sql.py", line 109, in task
python3.9-django-debug-toolbar>     await sync_to_async(sql_call)()
python3.9-django-debug-toolbar> AssertionError: SQLQueryTriggered not raised
python3.9-django-debug-toolbar> ----------------------------------------------------------------------
python3.9-django-debug-toolbar> Ran 138 tests in 3.773s
python3.9-django-debug-toolbar> FAILED (failures=1, skipped=13)
python3.9-django-debug-toolbar> Destroying test database for alias 'default'...

https://github.com/jazzband/django-debug-toolbar/blob/1d6c953b5554058ac563a56dfded6a9124063606/tests/panels/test_sql.py#L108, added on https://github.com/jazzband/django-debug-toolbar/pull/1615/files

https://github.com/jazzband/django-debug-toolbar/blob/1d6c953b5554058ac563a56dfded6a9124063606/tests/panels/test_sql.py#L99-L115

    async def test_cursor_wrapper_asyncio_ctx(self, mock_wrapper):
        self.assertTrue(sql_tracking.allow_sql.get())
        await sync_to_async(sql_call)()

        async def task():
            sql_tracking.allow_sql.set(False)
            # By disabling sql_tracking.allow_sql, we are indicating that any
            # future SQL queries should be stopped. If SQL query occurs,
            # it raises an exception.
            with self.assertRaises(sql_tracking.SQLQueryTriggered):
                await sync_to_async(sql_call)()

        # Ensure this is called in another context
        await asyncio.create_task(task())
        # Because it was called in another context, it should not have affected ours
        self.assertTrue(sql_tracking.allow_sql.get())
        self.assertEqual(mock_wrapper.call_count, 1)

so it seems a query is going on here but it shouldn't so the test fails? Upstream didn't provide an explanation, so i'm supposing this is an issue on the nix derivation side.

@yuuyins
Copy link
Contributor Author

yuuyins commented Jun 22, 2022

#178240

@yuuyins yuuyins closed this Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants