| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This will need to be part of our release procedure going forward. Signed-off-by: Stephen Finucane <stephen@that.guru>
templates/submission: Fix alignment of commit message
Preformatted content must not be indented because any space is kept in the output, making the content wrongly indented. When aligning message headers to the left, the new HTML code has been indented including some preformatted content indented with two spaces. The fix is to remove the indent of the content. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Fixes: fe34ab2 ("patch-detail: left align message headers") Reviewed-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Stephen Finucane <stephen@that.guru> (cherry picked from commit 13bbc0d)
Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: b2374a0 ("Post-release version bump") Signed-off-by: Stephen Finucane <stephen@that.guru>
CI: Cancel builds upon a new push
Signed-off-by: Stephen Finucane <stephen@that.guru> (cherry picked from commit 09939ba)
tests: Dump more info if version test fails
Signed-off-by: Stephen Finucane <stephen@that.guru> (cherry picked from commit fa14cf8)
css: make diff colors more accessible
The colors used to display patch diffs are confusing. The context color is very similar to the added line color and the contrast between added and removed lines is very low. Originally, the choice of purple/blue (instead of the more common red/green palette) may have been made with colorblindness accessibility in mind. However, after inspecting the current colors with colorblindness "simulators", I found that the low contrast was consistent no matter what vision deficiency (if any) you might have. Update the colors to use a more common red/green palette. Add background colors to increase contrast for colorblind people. Use less confusing colors for context and diff hunks. Use normal line height to prevent background colors from overlapping. Use a different color for email quotes (blue) to avoid confusion with added lines. I have made a compilation of the current and updated color palette previews for normal vision and all common color deficiencies. I also included the same diff as seen from Github interface for reference. Link: http://files.diabeteman.com/patchwork-diff-colors/ Signed-off-by: Robin Jarry <robin@jarry.cc> (cherry picked from commit c443cd9)
This was deprecated in 4.1 and removed in 5.0. I missed it. [1] https://docs.djangoproject.com/en/5.0/releases/4.1/#features-deprecated-in-4-1 Signed-off-by: Stephen Finucane <stephen@that.guru> (cherry picked from commit 45f47e9)
[Stable-Only] Bump GitHub Actions versions
The versions we were using here are out of date and no longer supported. Bump them all. Signed-off-by: Stephen Finucane <stephen@that.guru>
[Stable-Only] docker: Pin postgres, mysql image versions
Signed-off-by: Stephen Finucane <stephen@that.guru>
Only run on pushes to main and stable branches. Signed-off-by: Stephen Finucane <stephen@that.guru> (cherry picked from commit 4c7d6d8)
CI: Reduce number of tests run for docker-compose workflow
We do not need to run the entire test suite again. Speed things up. NOTE(stephenfin): Modified to use the correct lower and upper bound for this branch. Signed-off-by: Stephen Finucane <stephen@that.guru> (cherry picked from commit cd6a64e)
models: optimize with_tag_counts using case-when
Leverage PatchTag index replacing the subquery counter with a JOIN. The current code is too slow on MySQL, as it doesn't use indexes. The new approach is more direct and allows proper index usage. Signed-off-by: Tales da Aparecida <tales.aparecida@redhat.com> (cherry picked from commit 52877f8)
notifications.py: don't crash if notifications recipient is invalid
On Django 3:3.2.19, if recipient is not filled or is invalid, cron
job fails with:
Traceback (most recent call last):
File "/usr/local/patchwork/./manage.py", line 17, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/patchwork/patchwork/management/commands/cron.py", line 19, in handle
errors = send_notifications()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/patchwork/patchwork/notifications.py", line 84, in send_notifications
message.send()
File "/usr/lib/python3/dist-packages/django/core/mail/message.py", line 284, in send
return self.get_connection(fail_silently).send_messages([self])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/core/mail/backends/smtp.py", line 109, in send_messages
sent = self._send(message)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/core/mail/backends/smtp.py", line 122, in _send
recipients = [sanitize_address(addr, encoding) for addr in email_message.recipients()]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/core/mail/backends/smtp.py", line 122, in <listcomp>
recipients = [sanitize_address(addr, encoding) for addr in email_message.recipients()]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/core/mail/message.py", line 99, in sanitize_address
address_parts = nm + localpart + domain
~~~^~~~~~~~~~~
TypeError: can only concatenate str (not "NoneType") to str
As there's no point trying to send a notification to an invalid
e-mail, just drops it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Co-authored-by: Stephen Finucane <stephen@that.guru>
[stephenfin: Updated to fix linter issues]
(cherry picked from commit 1139b9a)templatetags: Render links as XHTML links
Convert links in the commit message and comments, to be rendered as clickable XHTML links for easy navigation. Currently only http, https, ftp and git are recognized. And only links that are not broken across lines are recognized. Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com> Closes: #591 (cherry picked from commit 980b270)
Signed-off-by: Stephen Finucane <stephen@that.guru> (cherry picked from commit 338a976)
Signed-off-by: Stephen Finucane <stephen@that.guru> (cherry picked from commit f51e306)
parsemail: fix SeriesReference race with concurrent delivery
When multiple parsemail processes run in parallel (e.g. postfix delivering several messages from the same series at once), two processes can try to create a SeriesReference for the same msgid simultaneously. The second one fails with an IntegrityError: django.db.utils.IntegrityError: duplicate key value violates unique constraint "patchwork_seriesreference_project_id_msgid_..." DETAIL: Key (project_id, msgid)=(2, <...>) already exists. This can result in incomplete series that never reach the "received_all" state because the failed parsemail invocation prevents one of the patches from being recorded. The existing get/create pattern has a classic TOCTOU race: the get succeeds (no reference found), but by the time create runs, another process has already inserted the row. Replace both the try/get/ except/create block and the bare create call with get_or_create which handles the race atomically at the database level. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviwed-by: Stephen Finucane <stephen@that.guru> (cherry picked from commit 3558907)
parsemail: wrap parse_mail() in a single transaction
Wrap the entire parse_mail() call in transaction.atomic() so that all database writes from email parsing run inside a single transaction. The existing transaction.atomic() blocks inside parse_mail() become savepoints within this outer transaction. The series deduplication retry logic continues to work since savepoint rollbacks are scoped to their own savepoint. This also ensures that any on_commit() callbacks registered by signal handlers only fire after the full email has been parsed and all patch/series associations are committed. Signed-off-by: Robin Jarry <robin@jarry.cc> Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Stephen Finucane <stephen@that.guru> [stephenfin: Slight tweaks to the release notes] (cherry picked from commit 644cef7)
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...stable/3.2
| Back | FazBrowse Home | New Git URL |