New release: Review Board 4.0 Beta 1

96 views
Skip to first unread message

Christian Hammond

unread,
Dec 17, 2020, 1:28:20 PM12/17/20
to revie...@googlegroups.com, reviewb...@googlegroups.com
Hi everyone,

Well it's been a lot of work, but Review Board 4.0 is finally ready for beta. This has been a much longer release cycle than we wanted, but the move to Python 3 set off some pretty major dominos. We're in the home stretch now, though.

We're hoping to get some good beta feedback. The more testers, the better 4.0 will be.

This release features multi-commit review requests for Git/Mercurial, Python 3/Django 1.11 support, Discord and Jenkins integration, a new administration UI, read-only mode, new review request management capabilities, and much more.

See the news announcement for more details.

If you hit any issues, or have any feedback, just send an e-mail here.

If you're an extension author, pay special attention to the Extensions section in the release notes.

Christian

--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

akli...@gmail.com

unread,
Dec 18, 2020, 8:54:38 AM12/18/20
to Review Board Development
Hi Christian,

really nice! Of course.... I tested it today with a fresh installation. ;-)

Posting works like a charm. But it cannot display the diff.

Screenshot_20201218_145233.png


ERROR:root:ReviewsDiffViewerView.get: Error rendering diff for diffset ID=1, interdiffset ID=None: Invalid base64-encoded string: number of data characters (1) cannot be 1 more than a multiple of 4
Traceback (most recent call last):
  File "/home/andre/tmp/rb/rb4/env/lib/python3.9/site-packages/reviewboard/diffviewer/views.py", line 129, in get
    response = super(DiffViewerView, self).get(
  File "/home/andre/tmp/rb/rb4/env/lib/python3.9/site-packages/django/views/generic/base.py", line 155, in get
    context = self.get_context_data(**kwargs)
  File "/home/andre/tmp/rb/rb4/env/lib/python3.9/site-packages/reviewboard/reviews/views.py", line 1246, in get_context_data
    context = super(ReviewsDiffViewerView, self).get_context_data(**kwargs)
  File "/home/andre/tmp/rb/rb4/env/lib/python3.9/site-packages/reviewboard/diffviewer/views.py", line 228, in get_context_data
    files = get_diff_files(diffset=diffset,
  File "/home/andre/tmp/rb/rb4/env/lib/python3.9/site-packages/reviewboard/diffviewer/diffutils.py", line 1194, in get_diff_files
    not filediff.parent_diff
  File "/home/andre/tmp/rb/rb4/env/lib/python3.9/site-packages/reviewboard/diffviewer/models/filediff.py", line 199, in _get_parent_diff
    if self._needs_parent_diff_migration():
  File "/home/andre/tmp/rb/rb4/env/lib/python3.9/site-packages/reviewboard/diffviewer/models/filediff.py", line 722, in _needs_parent_diff_migration
    (self.parent_diff64 or self.legacy_parent_diff_hash_id))
  File "/home/andre/tmp/rb/rb4/env/lib/python3.9/site-packages/djblets/db/fields/base64_field.py", line 131, in __get__
    value = Base64DecodedValue(base64_decode(value))
  File "/usr/lib/python3.9/base64.py", line 538, in decodebytes
    return binascii.a2b_base64(s)
binascii.Error: Invalid base64-encoded string: number of data characters (1) cannot be 1 more than a multiple of 4

Best regards
   André




Christian Hammond

unread,
Dec 18, 2020, 5:55:25 PM12/18/20
to reviewb...@googlegroups.com
That is strange. I haven't encountered that. Is that a newly-posted diff? It looks like it's being triggered by diff migration.

Also, fresh database, or imported from a prior database?

The URL is pretty strange too...

Christian

--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

--

---
You received this message because you are subscribed to the Google Groups "Review Board Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard-dev/3cff43cf-db5e-4938-917d-84da2838dcb6n%40googlegroups.com.

akli...@gmail.com

unread,
Dec 21, 2020, 4:17:52 AM12/21/20
to Review Board Development
Yes, it is a fresh database (pgsql) and it is the new review request.

André

Christian Hammond

unread,
Dec 21, 2020, 3:39:11 PM12/21/20
to reviewb...@googlegroups.com
Okay, we'll follow up with you through our support channel on this to collect more information.

Christian

-- 
Christian Hammond
President/CEO of Beanbag
Makers of Review Board


On Mon, Dec 21, 2020 at 1:17 AM akli...@gmail.com <akli...@gmail.com> wrote:
Yes, it is a fresh database (pgsql) and it is the new review request.

André

--

---
You received this message because you are subscribed to the Google Groups "Review Board Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard-d...@googlegroups.com.

Дмитрий Лисичкин

unread,
Dec 23, 2020, 4:20:34 PM12/23/20
to Review Board Development
Hi
I have a problem with upgrade (from 3.0.19 mysql)

rb-site upgrade /var/www/reviewboard/
Traceback (most recent call last):
  File "/usr/local/bin/rb-site", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/reviewboard/cmdline/rbsite.py", line 2235, in main
    command.run()
  File "/usr/local/lib/python2.7/dist-packages/reviewboard/cmdline/rbsite.py", line 1994, in run
    site.setup_settings()
  File "/usr/local/lib/python2.7/dist-packages/reviewboard/cmdline/rbsite.py", line 324, in setup_settings
    django.setup()
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models()
  File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/corsheaders/models.py", line 4, in <module>
    class CorsModel(models.Model):
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 124, in __new__
    new_class.add_to_class('_meta', Options(meta, app_label))
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 325, in add_to_class
    value.contribute_to_class(cls, name)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/options.py", line 214, in contribute_to_class
    self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
  File "/usr/local/lib/python2.7/dist-packages/django/db/__init__.py", line 33, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 212, in __getitem__
    conn = backend.DatabaseWrapper(db, alias)
  File "/usr/local/lib/python2.7/dist-packages/djblets/db/backends/mysql/base.py", line 42, in __init__
    super(DatabaseWrapper, self).__init__(*args, **kwargs)
TypeError: Error when calling the metaclass bases
    object.__init__() takes no parameters

I change `super(DatabaseWrapper, self).__init__(*args, **kwargs)` to `super(DatabaseWrapper, self).__init__()`
but than I get error on next line
    ops_cls = self.ops.__class__
AttributeError: 'DatabaseWrapper' object has no attribute 'ops'
понедельник, 21 декабря 2020 г. в 23:39:11 UTC+3, Christian Hammond:

Дмитрий Лисичкин

unread,
Dec 23, 2020, 4:56:42 PM12/23/20
to Review Board Development

I think that class should be actualized since https://github.com/django/django/commit/7ca3b391b611eb710c4c1d613e2f672591097a00
But I don't know why it used anyway i have django backend in settings, not a djblets backend.
четверг, 24 декабря 2020 г. в 00:20:34 UTC+3, Дмитрий Лисичкин:

Дмитрий Лисичкин

unread,
Dec 23, 2020, 8:25:18 PM12/23/20
to Review Board Development
1. `rb-site manage /var/www/reviewboard resolve-check static-media` - show error
2. AD authentication broken

четверг, 24 декабря 2020 г. в 00:56:42 UTC+3, Дмитрий Лисичкин:

Дмитрий Лисичкин

unread,
Dec 24, 2020, 2:16:47 AM12/24/20
to Review Board Development

>  AD authentication broken
I was able to make it works by move to full ldap settings
четверг, 24 декабря 2020 г. в 04:25:18 UTC+3, Дмитрий Лисичкин:

Дмитрий Лисичкин

unread,
Dec 24, 2020, 3:52:19 AM12/24/20
to Review Board Development
> 1. `rb-site manage /var/www/reviewboard resolve-check static-media` - show error 
Additional info: error message: "You must specify a check to resolve".

четверг, 24 декабря 2020 г. в 04:25:18 UTC+3, Дмитрий Лисичкин:
1. `rb-site manage /var/www/reviewboard resolve-check static-media` - show error

Christian Hammond

unread,
Dec 25, 2020, 3:29:55 AM12/25/20
to reviewb...@googlegroups.com
This is actually masking the real error, which is likely a missing module for MySQL support. Try:

    pip install ReviewBoard[mysql]

We already have a fix in for beta 2.

Christian


--

Christian Hammond

unread,
Dec 25, 2020, 3:31:16 AM12/25/20
to reviewb...@googlegroups.com
What issues were you seeing here? Were there any errors in the logs, and did the same configuration work on 3.x?

Christian


--

Дмитрий Лисичкин

unread,
Dec 25, 2020, 5:24:33 PM12/25/20
to Review Board Development
>  What issues were you seeing here? Were there any errors in the logs, and did the same configuration work on 3.x? 
I don't remember how I configure active directory on 3.x but it works fine and I don't change anything after upgrade. I can see additional info in backup dump if you need it.
I have errors in log (relevant part):  
```
  File "/usr/local/lib/python3.8/dist-packages/django/contrib/auth/__init__.py", line 70, in authenticate
    user = _authenticate_with_backend(backend, backend_path, request, credentials)
  File "/usr/local/lib/python3.8/dist-packages/django/contrib/auth/__init__.py", line 116, in _authenticate_with_backend
    return backend.authenticate(*args, **credentials)
  File "/usr/local/lib/python3.8/dist-packages/reviewboard/accounts/backends/ad.py", line 392, in authenticate
    bind_username = b'%s@%s' % (username_bytes, userdomain)
TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'
```
I tried to fix it by replacing  `b'%s@%s'` to `'%s@%s'` but have connection proplem
Than I find this code: `ldap_uri = 'ldap://%s:%s' % (host, port)` but on most services we use ldaps so I fix this too. At this point I got ldap.INVALID_CREDENTIALS for correct login and password (maybe I just missconfigure something or made some mistakes while hacking ad.py without python language knowing=)). At final I decide to switch to ldap settings for more configuration options and it works.

пятница, 25 декабря 2020 г. в 11:31:16 UTC+3, Christian Hammond:

Дмитрий Лисичкин

unread,
Dec 25, 2020, 6:30:31 PM12/25/20
to Review Board Development
One another error:
```
2020-12-25 23:28:37,460 - ERROR -  - root - Failed to send test e-mail: send_mail() got an unexpected keyword argument 'mail_from'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/reviewboard/admin/forms/email_settings.py", line 128, in save
    send_mail(
TypeError: send_mail() got an unexpected keyword argument 'mail_from'
```
emails not sended
суббота, 26 декабря 2020 г. в 01:24:33 UTC+3, Дмитрий Лисичкин:

Christian Hammond

unread,
Dec 26, 2020, 6:54:22 PM12/26/20
to reviewb...@googlegroups.com
Thanks for the info! The backtraces help a lot.

We have the e-mail one fixed internally, and we're aiming for a beta 2 in the next two weeks.

We'll get AD fixed up for that shortly.

Christian

--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Дмитрий Лисичкин

unread,
Feb 1, 2021, 3:40:53 AM2/1/21
to Review Board Development
Hello again.
I tested beta2 and not all issues was fixed properly.

Broken user creation from ldap:
---
2021-01-29 12:28:25,723 - ERROR - None - AnonymousUser - /account/login/ - reviewboard.accounts.backends.ldap - Unexpected error authenticating user "grigorev": a bytes-like object is required, not 'str'

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/reviewboard/accounts/backends/ldap.py", line 158, in authenticate
    return self.get_or_create_user(username=username,
  File "/usr/local/lib/python3.8/dist-packages/reviewboard/accounts/backends/ldap.py", line 264, in get_or_create_user
    first_name, last_name = full_name.split(' ', 1)
TypeError: a bytes-like object is required, not 'str'

Mail send still not working (only test email send was fixed)
---
2021-01-29 10:43:04,834 - ERROR -  - root - Could not send e-mail message with subject "Review Request 10823: .....

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/reviewboard/notifications/email/utils.py", line 295, in send_email
    message.send()
  File "/usr/local/lib/python3.8/dist-packages/django/core/mail/message.py", line 348, in send
    return self.get_connection(fail_silently).send_messages([self])
  File "/usr/local/lib/python3.8/dist-packages/django/core/mail/backends/smtp.py", line 111, in send_messages
    sent = self._send(message)
  File "/usr/local/lib/python3.8/dist-packages/django/core/mail/backends/smtp.py", line 124, in _send
    recipients = [sanitize_address(addr, encoding) for addr in email_message.recipients()]
  File "/usr/local/lib/python3.8/dist-packages/django/core/mail/backends/smtp.py", line 124, in <listcomp>
    recipients = [sanitize_address(addr, encoding) for addr in email_message.recipients()]
  File "/usr/local/lib/python3.8/dist-packages/django/core/mail/message.py", line 138, in sanitize_address
    nm = Header(nm, encoding).encode()
  File "/usr/lib/python3.8/email/header.py", line 387, in encode
    value = formatter._str(linesep)
  File "/usr/lib/python3.8/email/header.py", line 423, in _str
    self.newline()
  File "/usr/lib/python3.8/email/header.py", line 434, in newline
    if self._current_line.is_onlyws() and self._lines:
  File "/usr/lib/python3.8/email/header.py", line 575, in is_onlyws
    return self._initial_size==0 and (not self or str(self).isspace())
  File "/usr/lib/python3.8/email/header.py", line 565, in __str__
    return EMPTYSTRING.join((EMPTYSTRING.join((fws, part))
  File "/usr/lib/python3.8/email/header.py", line 565, in <genexpr>
    return EMPTYSTRING.join((EMPTYSTRING.join((fws, part))
TypeError: sequence item 0: expected str instance, bytes found

Also bugs:
Comment Severity extension not working. Not sure why, It was working while i just install beta1, it become broken after some time (maybe I just reinstall it).
---
2021-01-29 10:46:36,280 - ERROR -  - djblets.extensions.templatetags.djblets_extensions - Unable to render CSS bundle "default" for extension "Comment Severity" (rbseverity.extension.SeverityExtension). The extension may not be installed correctly. Try disabling and re-installing the extension, and checking the log for related errors.
воскресенье, 27 декабря 2020 г. в 02:54:22 UTC+3, Christian Hammond:
Reply all
Reply to author
Forward
0 new messages