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

paperless-ngx: 2.7.2 -> 2.8.5 #311451

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

leona-ya
Copy link
Member

@leona-ya leona-ya commented May 13, 2024

Description of changes

Release Notes:
https://github.com/paperless-ngx/paperless-ngx/releases/tag/v2.8.0
https://github.com/paperless-ngx/paperless-ngx/releases/tag/v2.8.1
https://github.com/paperless-ngx/paperless-ngx/releases/tag/v2.8.2
https://github.com/paperless-ngx/paperless-ngx/releases/tag/v2.8.3
https://github.com/paperless-ngx/paperless-ngx/releases/tag/v2.8.4
https://github.com/paperless-ngx/paperless-ngx/releases/tag/v2.8.5

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.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
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@leona-ya
Copy link
Member Author

Currently the package doesn't build because of this test failure

_________________ TestDocumentApi.test_document_history_action _________________
[gw5] linux -- Python 3.11.9 /nix/store/lpi16513bai8kg2bd841745vzk72475x-python3-3.11.9/bin/python3.11

self = <documents.tests.test_api_documents.TestDocumentApi testMethod=test_document_history_action>

    def test_document_history_action(self):
        """
        GIVEN:
            - Document
        WHEN:
            - Document is updated
        THEN:
            - Audit log contains changes
        """
        doc = Document.objects.create(
            title="First title",
            checksum="123",
            mime_type="application/pdf",
        )
        self.client.force_login(user=self.user)
        self.client.patch(
            f"/api/documents/{doc.pk}/",
            {"title": "New title"},
            format="json",
        )

        response = self.client.get(f"/api/documents/{doc.pk}/history/")
        self.assertEqual(response.status_code, status.HTTP_200_OK)
        self.assertEqual(len(response.data), 2)
        self.assertEqual(response.data[0]["actor"]["id"], self.user.id)
        self.assertEqual(response.data[0]["action"], "update")
>       self.assertEqual(
            response.data[0]["changes"],
            {"title": ["First title", "New title"]},
        )
E       AssertionError: '{"title": ["First title", "New title"]}' != {'title': ['First title', 'New title']}

src/documents/tests/test_api_documents.py:345: AssertionError

I really don't understand why this fails this way. This is a new test, but it seems to succeed in the upstream pipeline? I didn't discover any dependency differences, but I also didn't check all of them (only the ones that made sense to me). Anyone has an idea?

@ofborg ofborg bot requested review from erikarvstedt, lukegb and gador May 13, 2024 20:26
@leona-ya leona-ya force-pushed the paperless-ngx-2.8.3 branch from 5d1d56d to d929bf3 Compare May 14, 2024 21:37
@SuperSandro2000 SuperSandro2000 changed the title paperless-ngx: 2.7.2 -> 2.8.3 paperless-ngx: 2.7.2 -> 2.8.4 May 15, 2024
@SuperSandro2000
Copy link
Member

The PR that added the test also updated django-auditlog to 3.0.0

https://github.com/paperless-ngx/paperless-ngx/pull/6388/files#diff-a86c67a0a29ed0e95909b9b7c420140f302d17399ee6dcce4e1a51a14d27fd51

I am trying to bump that

@SuperSandro2000
Copy link
Member

That fixes our paperless test but the tests for django-auditlog fail for some reason. I think it tries to match color codes.

Didn't have the time to debug that further.

django-auditlog> Creating test database for alias 'default'...
django-auditlog> System check identified no issues (0 silenced).
django-auditlog> ........FF...F...................................................................................................................................................................................................................
django-auditlog> ======================================================================
django-auditlog> FAIL: test_nothing_to_migrate (auditlog_tests.test_two_step_json_migration.AuditlogMigrateJsonTest.test_nothing_to_migrate)
django-auditlog> ----------------------------------------------------------------------
django-auditlog> Traceback (most recent call last):
django-auditlog>   File "/build/source/auditlog_tests/test_two_step_json_migration.py", line 56, in test_nothing_to_migrate
django-auditlog>     self.assertEqual(outbuf, msg)
django-auditlog> AssertionError: '\x1b[32;1mAll records have been migrated.\x1b[0m' != 'All records have been migrated.'
django-auditlog> - All records have been migrated.
django-auditlog> ? -------                               ----
django-auditlog> + All records have been migrated.
django-auditlog>
django-auditlog>
django-auditlog> ======================================================================
django-auditlog> FAIL: test_nothing_to_migrate_with_conf_true (auditlog_tests.test_two_step_json_migration.AuditlogMigrateJsonTest.test_nothing_to_migrate_with_conf_true)
django-auditlog> ----------------------------------------------------------------------
django-auditlog> Traceback (most recent call last):
django-auditlog>   File "/nix/store/czybdd31jfw5sr3p2j2mfqzhh8grbjq2-python3.11-django-4.2.11/lib/python3.11/site-packages/django/test/utils.py", line 461, in inner
django-auditlog>     return func(*args, **kwargs)
django-auditlog>            ^^^^^^^^^^^^^^^^^^^^^
django-auditlog>   File "/build/source/auditlog_tests/test_two_step_json_migration.py", line 67, in test_nothing_to_migrate_with_conf_true
django-auditlog>     self.assertEqual(outbuf, msg)
django-auditlog> AssertionError: '\x1b[32;1mAll records have been migrated.[96 chars]lse.' != 'All records have been migrated.\nYou can [62 chars]lse.'
django-auditlog> - All records have been migrated.
django-auditlog> ? -------                               ----
django-auditlog> + All records have been migrated.
django-auditlog> - You can now set AUDITLOG_USE_TEXT_CHANGES_IF_JSON_IS_NOT_PRESENT to False.?                 -------                                                ----
django-auditlog> + You can now set AUDITLOG_USE_TEXT_CHANGES_IF_JSON_IS_NOT_PRESENT to False.
django-auditlog>
django-auditlog> ======================================================================
django-auditlog> FAIL: test_using_django_with_error (auditlog_tests.test_two_step_json_migration.AuditlogMigrateJsonTest.test_using_django_with_error)
django-auditlog> ----------------------------------------------------------------------
django-auditlog> Traceback (most recent call last):
django-auditlog>   File "/build/source/auditlog_tests/test_two_step_json_migration.py", line 172, in test_using_django_with_error
django-auditlog>     self.assertEqual(msg, errbuf)
django-auditlog> AssertionError: 'ValueError was raised while converting th[85 chars][14]' != '\x1b[31;1mValueError was raised while con[102 chars]b[0m'
django-auditlog> - ValueError was raised while converting the logs with these ids into json.They where not be included in this migration batch.
django-auditlog> + ValueError was raised while converting the logs with these ids into json.They where not be included in this migration batch.
django-auditlog> ? +++++++
django-auditlog> - [14]+ [14]
django-auditlog>
django-auditlog> ----------------------------------------------------------------------
django-auditlog> Ran 225 tests in 2.591s
django-auditlog>
django-auditlog> FAILED (failures=3)
django-auditlog> Destroying test database for alias 'default'...
django-auditlog> 2024-05-15 13:39:28.728 UTC [347] LOG:  checkpoint starting: immediate force wait
django-auditlog> 2024-05-15 13:39:28.780 UTC [347] LOG:  checkpoint complete: wrote 927 buffers (5.7%); 1 WAL file(s) added, 0 removed, 0 recycled; write=0.011 s, sync=0.033 s, total=0.052 s; sync files=308, longest=0.001 s, average=0.001 s; distance=9964 kB, estimate=9964 kB

@SuperSandro2000 SuperSandro2000 changed the title paperless-ngx: 2.7.2 -> 2.8.4 paperless-ngx: 2.7.2 -> 2.8.5 May 16, 2024
@SuperSandro2000 SuperSandro2000 marked this pull request as ready for review May 16, 2024 09:24
@SuperSandro2000
Copy link
Member

Fixed that by piping into cat and opened an upstream issue jazzband/django-auditlog#644

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label May 17, 2024
@leona-ya
Copy link
Member Author

LGTM, thanks! (cannot approve my own PR)

@SuperSandro2000 SuperSandro2000 merged commit 580a5c5 into NixOS:master May 17, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: python 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants