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

v4.2.2 is going to be released #12214

Closed
wants to merge 113 commits into from

Conversation

sledgehammer999
Copy link
Member

This is a pseudo-PR. It will not be merged. Read below.

Currently I have cherry-picked everything from master into v4_2_x.

  1. Are there any problematic commits that I shouldn't include?
  2. Is there any pending issue/PR that I absolutely must wait for? (aka critical stuff)

If not, then v4.2.2 will be released until Monday.

I'll wait on #12213. Also the only other changes I plan to do is version bumps and translation syncs from Transifex.

As far as I can tell the WEBAPI version has been bumped already. It doesn't seem to need a major version bump. @Piccirello @FranciscoPombal can you confirm?

Also @Piccirello @FranciscoPombal @Kolcha when cherry-picking I noticed some "auto merging" messages from git concerning WebUI commits. Can you test this particular branch to see if things work correctly on the WebUI part? I want to minimize the chance that automerge screwed things up code wise.

an0n666 and others added 30 commits March 21, 2020 22:17
It should remain disabled by default. Anyone that needs to Queue torrents for seeding/downloading should go to settings and change it to their preference.
Closes qbittorrent#8772.
This will fix issue that "Free space on disk:" label in 
Add New Torrent dialog not updated on Category change
when Torrent Management Mode is on Auto mode.
Not all flags displayed strictly belong to countries.
- CheckingMemUsageSize (16 MiB -> 32 MiB): a 16 MiB increase in memory consumption seems worthwhile for a nice performance boost in most cases.
- DiskCacheSize (64 MiB -> Auto): auto yields the best performance without committing to a huge fixed value.
- UseRandomPort (false -> true): The initial port chosen by qBittorrent may clash with something else the user already has that is aways using that port (low probability, but still). Thus, qBittorrent will always fail listening on that port, causing unexpected problems for the user. Users who know they want a fixed port will go to the settings anyway.
Closes qbittorrent#11724.

Option is enabled by default for users using qBittorrent's built-in HTTPS capabilities. This flag will never be set if qBittorrent is using plain HTTP.

Users using HTTPS reverse proxies, like "qbt <-> (http) <-> proxy <-> (https) <-> user" should override the flag in the proxy in order to set it, if they wish to do so.
Fixup 8200ef6
Remove "Listen on IPv6 address" option.
Don't sync main data if a request to do so is already in progress.

This prevents piling up of requests and bogging down slow/busy machines, since the current implementation of `/api/v2/sync/maindata` is very computationally intensive, especially with lots of torrents.

Everything gets updated on the next scheduled request anyway (via the timeout mechanism).
Model returns string for DisplayRole.
Text alignment is set by Model (using TextAlignmentRole).
Delegate performs custom painting only where necessary
(i.e. for Progress bar).
@xavier2k6
Copy link
Member

#11735 still has UDP/Proxy issues it seems even with libtorrent 1.2.5

@FranciscoPombal
Copy link
Member

Not all connectivity issues have been fixed. There’s apparently one which breaks recovery from loss of connection. arvidn/libtorrent#4412

#11735 still has UDP/Proxy issues it seems even with libtorrent 1.2.5

Despite this I think we should still release 4.2.2 + libtorrent >=1.2.5 ASAP. Not all issues are fixed, but there are many others that are. It is better to just release and fix problems for most users, and then later release the fix for the remaining problems, than to keep everybody waiting.

@sledgehammer999 After the release of 4.2.2 the existing Proxy/UDP issues thread should probably be closed, and the discussion continued on a new one. Maybe post a message like "4.2.2 should fix most of these issues. If you still have problems with this version, post in the new thread ".

@sledgehammer999
Copy link
Member Author

Minor update: The release is delayed for a half a day to one day. I had some trouble updating the libtorrent package for ubuntu and updating the macosx toolchain. I took sometime to work things out.

@FranciscoPombal
Copy link
Member

@An0n666

The strict super seeding mode has been deprecated in latest libtorrent commits. Wouldn't that cause issues in 4.2.2 (depending on how it's built)?

In light of #12229 (comment), if I understand it correctly, we will really need to remove the usage of strict_superseeding until the next release.

@ghost
Copy link

ghost commented Mar 24, 2020

Yes if you build with deprecated functions off then the build would fail.

@Chocobo1
Copy link
Member

Chocobo1 commented Mar 24, 2020

Yes if you build with deprecated functions off then the build would fail.

@sledgehammer999
libtorrent deprecated-functions=off should only be used for developers doing development not for casual user compiling/building (nor for distro packaging).

@glassez
Copy link
Member

glassez commented Mar 24, 2020

Support for the deprecated functions only serves to facilitate the transition from the previous libtorrent branch. Now that qBittorrent is fully compatible with the libtorrent-1.2 native API, we should never build it with deprecated-functions=on, except when it is impossible to avoid it (for example, when we build qBittorrent with a third-party libtorrent build that uses deprecated-functions=on).
Some deprecated things may be just fakes that really does nothing.
@arvidn?

@Chocobo1
Copy link
Member

Chocobo1 commented Mar 24, 2020

@glassez
The marking of deprecated functions is for clients to transition/migration to newer library API, no?
This is a development-side thing, I don't think it should be a strict requirement for package/binary distributing which is on end-user side.

However if one build & link statically (like our windows binary) or restrict the PPA libtorrent package for qbt-only usage, then perhaps we can have deprecated-functions=off.

@ghost
Copy link

ghost commented Mar 24, 2020

yes it would prevent users from downgrading to older versions with non deprecated functions. Like after 4.2.2 gets released you won’t be able to use previously released libtorrent packages for downgrade.

@Chocobo1
Copy link
Member

Like after 4.2.2 gets released you won’t be able to use previously released libtorrent packages for downgrade.

Users will have to downgrade libtorrent package too.

@ghost
Copy link

ghost commented Mar 24, 2020

I mean you can’t have qbt 4.2.2 from ppa with libtorrent rasterbar9 for example. Qbt 4.2.2 would be dependent on latest libtorrent build provided by ppa/repo.

@glassez
Copy link
Member

glassez commented Mar 24, 2020

However if one build & link statically (like our windows binary) or restrict the PPA libtorrent package for qbt-only usage, then perhaps we can have deprecated-functions=off.

👍

This is a development-side thing, I don't think it should be a strict requirement for package/binary distributing which is on end-user side.

Well, maybe I'm just wrong... if qBittorrent still uses the native API, even if libtorrent is built with deprecated functions, then there is no problem.
But I strongly insist that our CI environments use libtorrent with deprecated-functions=off so that we don't inadvertently break native libtorrent-1.2 API support (as happened recently).

@FranciscoPombal
Copy link
Member

@An0n666

I mean you can’t have qbt 4.2.2 from ppa with libtorrent rasterbar9 for example. Qbt 4.2.2 would be dependent on latest libtorrent build provided by ppa/repo.

Why would this be desirable? IMO this just enables some user to accidentally do that and run into weird bugs. PPA is for basic end-user usage.

@FranciscoPombal
Copy link
Member

@Chocobo1

or restrict the PPA libtorrent package for qbt-only usage, then perhaps we can have deprecated-functions=off.

I don't think there was ever a guarantee that the PPA's libtorrent package was a generic package for all cases. If someone needed that, they should use a PPA that has the sole purpose of providing libtorrent packages for general usage.

The libtorrent version available in the PPA is almost never a stable version either, just the commit revision that's most convenient for usage in qBittorrent. In addition, historically it was even more specific to our use case (the patched-configure builds).

I really don't think anyone installs the qBIttorrent PPA with the expectation they are getting an as-vanilla-as-possible libtorrent distribution for general use in development or other purpose.

I agree with @glassez that we should turn it off, at least in the CI.

@sledgehammer999
Copy link
Member Author

A quick note before my eventual release: Yesterday I updated both PPAs with disabled deprecated functions.
The problem that potentially may happen is this: Libtorrent marks something as deprecated in the same series eg in 1.2.6, I update the PPA with it, and now qbittorrent will not build until we take the time to workaround the deprecation. And this workaround may take time to be implemented, and we will be stuck.

@Chocobo1
Copy link
Member

The problem that potentially may happen is this: Libtorrent marks something as deprecated in the same series eg in 1.2.6, I update the PPA with it, and now qbittorrent will not build until we take the time to workaround the deprecation. And this workaround may take time to be implemented, and we will be stuck.

AFAIK that is exactly what you would expect by setting deprecated-functions=off, i.e. making build failing rather than some compiler warnings... unless you're saying this is not a desirable situation?

@arvidn
Copy link
Contributor

arvidn commented Mar 24, 2020

Turning off deprecated functions when building libtorrent may break the stable ABI-intention within minor versions. So, in order to stay maximally compatible, it's best to distribute libtorrent builds with deprecated functions enabled.

(and I also think it makes sense to build qBT with deprecated functions disabled in CI, or at least periodically transition away from old APIs).

For example, session_handle::status() has been deprecated for a while, but I just recently discovered that its return type (session_status) had not been marked deprecated, nor was it excluded from builds with deprecated functions disabled. I fixed that. This means in libtorrent builds with deprecated functions disabled, there is now an ABI break, because this deprecated symbol has been removed, when it was still around in previous version with the same minor version.

Given that the only function returning this type has been excluded from builds without deprecated functions, in practice this is most likely not a problem though.

Most deprecation changes, preserve ABI (in practice). For example, strict super seeding mode will be deprecated in libtorrent-1.2.6. In a build where deprecated functions are still included, the settings_pack::strict_super_seeding setting name will still be there (but marked deprecated, to trigger a warning if used). However, when built without deprecated functions, the enum value will instead be called settings_pack::deprecated_strict_super_seeding. It will have the same numeric value, so for all practical purposes ABI will be preserved, but from a C++ standard point of view, that's and ODR violation (in case a client is built with deprecated functions disabled but linked against a libtorrent with them enabled).

@Chocobo1
Copy link
Member

I don't think there was ever a guarantee that the PPA's libtorrent package was a generic package for all cases. If someone needed that, they should use a PPA that has the sole purpose of providing libtorrent packages for general usage.

I'm not familiar with debian/ubuntu packages so I could be wrong. AFAIK the libtorrent package from PPA overwrites the ones from debian/ubuntu official repo. As a result, this gets in the way of the user from using other torrent clients (the ones based on libtorrent).

@sledgehammer999
Copy link
Member Author

sledgehammer999 commented Mar 24, 2020

AFAIK that is exactly what you would expect by setting deprecated-functions=off, i.e. making build failing rather than some compiler warnings... unless you're saying this is not a desirable situation?

It is only desirable in CI situation. It isn't a desirable situation when you want make a release and can't because of that.

I'm not familiar with debian/ubuntu packages so I could be wrong. AFAIK the libtorrent package from PPA overwrites the ones from debian/ubuntu official repo. As a result, this gets in the way of the user from using other torrent clients (the ones based on libtorrent).

Exactly! Maybe the true solution to our conundrum is to make a 3rd PPA that will be for the CI and have disabled deprecated funtions. And maybe have it auto-import libtorrent-git-RC_1_2.
Now, that I think about it I'll do exactly that.

** Ideally we could also introduce a package with a different name on the same PPA that will have disabled deprecated functions. But I am not very familiar with debian packaging to make it happen that way.

@FranciscoPombal
Copy link
Member

@Chocobo1

I'm not familiar with debian/ubuntu packages so I could be wrong. AFAIK the libtorrent package from PPA overwrites the ones from debian/ubuntu official repo. As a result, this gets in the way of the user from using other torrent clients (the ones based on libtorrent).

You're right...

@sledgehammer999

Exactly! Maybe the true solution to our conundrum is to make a 3rd PPA that will be for the CI and have disabled deprecated funtions. And maybe have it auto-import libtorrent-git-RC_1_2.
Now, that I think about it I'll do exactly that.

We don't need a PPA for that (PPAs in general are a bit of a mess, I think it's best to avoid having more if possible). CI's can directly import from git and can have arbitrary configurations for building libtorrent on a standard ubuntu system.

@sledgehammer999 sledgehammer999 deleted the stage_v4_2_x branch March 24, 2020 14:43
@sledgehammer999
Copy link
Member Author

CI's can directly import from git and can have arbitrary configurations for building libtorrent on a standard ubuntu system.

We don't want to build libtorrent everytime our CI wants to test a pr/commit.

@FranciscoPombal
Copy link
Member

@sledgehammer999

We don't want to build libtorrent everytime our CI wants to test a pr/commit.

Fair point, perhaps we could use github actions for that then?

@ghost
Copy link

ghost commented Mar 24, 2020

Why would this be desirable? IMO this just enables some user to accidentally do that and run into weird bugs. PPA is for basic end-user usage.

Idk. Maybe they would do that for testing purposes. Like sometimes things break in new versions and they might wanna test out an older package.

Btw @sledgehammer999 just to note, an0n666 and An0n is the same person. Idk why you use usernames in some place and nicks in another(in changelog). Makes it look like different persons.

@FranciscoPombal
Copy link
Member

Btw @sledgehammer999 just to note, an0n666 and An0n is the same person. Idk why you use usernames in some place and nicks in another(in changelog). Makes it look like different persons.

Don't know how sledge is the generating the changelogs, but probably some automated script that extracts git metadata such as commit message + user.name. Maybe you accidentally used the wrong git user.name one time? I did that once, and so there is one of my commits in the master branch that's under Francisco Pombal instead of FranciscoPombal :D

@ghost
Copy link

ghost commented Mar 24, 2020

Oh I get it now. Previously didn’t have a nick. So probably my username was taken from those commit metadata.

@sledgehammer999
Copy link
Member Author

FYI a first draft of the changelog is generated with this command:

git log --reverse --topo-order --pretty="tformat:    - BUGFIX: %s (%an)" HEAD...a25ed5f639e86ab30aac85379a4e11253a82e158 > log.txt

then I adjust it further by hand.
The %an placeholder is for the author name

@maboroshin
Copy link
Contributor

There is a problem with Transifix in Japanese. I abandoned the editorial war. 4.2.2 was released without fixing the problem. More info: #11921

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.