Skip to content

transmission: sent a warning and alias it to transmission_3#258058

Merged
doronbehar merged 1 commit into
NixOS:masterfrom
doronbehar:pkg/transmission_4
Jun 22, 2024
Merged

transmission: sent a warning and alias it to transmission_3#258058
doronbehar merged 1 commit into
NixOS:masterfrom
doronbehar:pkg/transmission_4

Conversation

@doronbehar

Copy link
Copy Markdown
Contributor
Motivation for this change
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.

@jtojnar

jtojnar commented Sep 29, 2023

Copy link
Copy Markdown
Member

This looks like transmission: rename from transmission_4. And Transmission 4 contains at least one regression causing data loss, see the original PR: #215316 (comment)

@doronbehar doronbehar force-pushed the pkg/transmission_4 branch 2 times, most recently from ad088df to dfb3166 Compare September 30, 2023 08:08
@doronbehar doronbehar changed the title transmission: rename to transmission_4 transmission: rename from transmission_4 Sep 30, 2023
@doronbehar

Copy link
Copy Markdown
Contributor Author

Transmission 4 contains at least one regression causing data loss

Why do you consider it as "data loss"? It's not files that were already downloaded are deleted from your storage, but rather it is the "torrent configuration" loss. I personally don't think it is such a bad bug to live with.

@jtojnar

jtojnar commented Sep 30, 2023

Copy link
Copy Markdown
Member

Yes, it loses torrent configuration in a way that downgrading does not restore. This is quite painful if you have large amount of affected torrents that you have configured. Thankfully, I had backups or I would be very annoyed.

@doronbehar

Copy link
Copy Markdown
Contributor Author

Hmm I understand... Your usage of transmission is unique IMO. Perhaps we can add some release notes, with links to upstream bug reports? My personal opinion is that unless upstream released a completely broken package, a distribution shouldn't hold such significant updates from all users just because some users experience a bug that can barely be reproduced... I wasn't aware of this upstream release if I hadn't noticed it by chance by browsing Nixpkgs' pull requests.

BTW I don't understand what is the ofborg-eval-darwin error :/.

@github-actions github-actions Bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog This PR adds or changes release notes labels Oct 4, 2023
@doronbehar

Copy link
Copy Markdown
Contributor Author

I'm attempting to fix the darwin build of transmission 4. I pushed several other improvements to both expressions, along with a release-notes line for the possible upstream bug experience.

@doronbehar

Copy link
Copy Markdown
Contributor Author

@ofborg build transmission

@doronbehar doronbehar marked this pull request as draft October 4, 2023 10:51
@ofborg ofborg Bot added 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package labels Oct 4, 2023
@ofborg ofborg Bot requested a review from astsmtl October 4, 2023 11:09
@ofborg ofborg Bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Oct 4, 2023
@doronbehar doronbehar mentioned this pull request Oct 4, 2023
13 tasks
@doronbehar

Copy link
Copy Markdown
Contributor Author

The darwin build seems fixed.

@ThinkChaos

Copy link
Copy Markdown
Contributor

I've been using 4.0.3 for a while, and lately ran into an issue where data was being downloaded, but not saved to disk. The torrents showed multiple GBs downloaded but still 0% progress. This was happening with all downloading torrents, even newly added ones, and was fixed by restarting Transmission.
I haven't reported it upstream since 4.0.4 is out now and I'm not using it yet.

So even though I'm using v4 I'm against making it the default as in my experience it's not yet as stable as v3.

Your goal seems to be to raise awareness about v4. I can think of a couple ways to do that without risking people's data:

  • add a release note mentioning v4 is packaged
  • deprecate transmission and push users towards transmission_3 or transsmission_4, similar to Python 2/3.

In both cases, we should explain why v4 isn't the default and link the PRs/upstream bug so users can make an informed decision.

@doronbehar

Copy link
Copy Markdown
Contributor Author

Thanks @ThinkChaos for the ideas. I like them overall. As for:

  • deprecate transmission and push users towards transmission_3 or transsmission_4, similar to Python 2/3.

Were you thinking of something like this in aliases.nix:

transmission = throw "Please instead of attribute `transmission`, use `transmission_3` or `transmission_4`";

vs:

transmission = lib.warn "The transmission attribute without version suffix is deprecated, please switch over to either transmission_4 or transmission_3. Note the release-notes mentioning upstream bugs." transmission_3;

Or simply (which would not make a difference for most users, unless aliases are disabled in their nixpkgs.config):

transmission = transmission_3;

I'd appreciate your vote on either of these options. Moreover, if you'd report that with 4.0.4, you don't experience the buggy behavior you observed with 4.0.3, that should affect this decision.

@kirillrdy

Copy link
Copy Markdown
Member

Thanks @ThinkChaos for the ideas. I like them overall. As for:

  • deprecate transmission and push users towards transmission_3 or transsmission_4, similar to Python 2/3.

Were you thinking of something like this in aliases.nix:

transmission = throw "Please instead of attribute `transmission`, use `transmission_3` or `transmission_4`";

vs:

transmission = lib.warn "The transmission attribute without version suffix is deprecated, please switch over to either transmission_4 or transmission_3. Note the release-notes mentioning upstream bugs." transmission_3;

Or simply (which would not make a difference for most users, unless aliases are disabled in their nixpkgs.config):

transmission = transmission_3;

I'd appreciate your vote on either of these options. Moreover, if you'd report that with 4.0.4, you don't experience the buggy behavior you observed with 4.0.3, that should affect this decision.

sorry for noise
but what does

transmission = lib.warn evaluate to ? null ? eg what is output when you try to build it ?

@doronbehar

Copy link
Copy Markdown
Contributor Author

transmission = lib.warn evaluate to ? null ? eg what is output when you try to build it ?

See: https://noogle.dev/?selected=%22lib.trivial.warn%22&term=%22warn%22

@kirillrdy

kirillrdy commented Oct 5, 2023

Copy link
Copy Markdown
Member

transmission = lib.warn evaluate to ? null ? eg what is output when you try to build it ?

See: https://noogle.dev/?selected=%22lib.trivial.warn%22&term=%22warn%22

@doronbehar thank you for you response
@ThinkChaos I like your suggestion, I would be leaning towards throw but that's just my opinion

@jtojnar

jtojnar commented Oct 5, 2023

Copy link
Copy Markdown
Member

I wasn't aware of this upstream release if I hadn't noticed it by chance by browsing Nixpkgs' pull requests.

I would prefer throwing over a silent migration to a broken version but I do not think there is much of a point. Nixpkgs is method for distributing software (which needs to be working to be useful) before being a mechanism for announcing latest versions of upstream projects. Also, eventually, we are going to remove transmission_3 and then we would probably want to go back to using transmission attribute.

Perhaps we can add some release notes, with links to upstream bug reports?

I do not think many people running unstable read release notes. Personally, I skim the commit log but it is really easy to miss something important there. As such, I would not consider a mention in release notes to be a sufficient precaution for bumping the transmission attribute to a version that eats data.

There is a section for announcing new versions and Transmission 4 definitely deserves a mention (with a warning) but that just would not be enough for the bump IMO.

My personal opinion is that unless upstream released a completely broken package, a distribution shouldn't hold such significant updates from all users just because some users experience a bug that can barely be reproduced...

I would consider any data loss a serious breakage. I would not be against bumping the attribute if it was just the feature that was broken but it clears the torrent status so it is not possible to fix by downgrading once user ran 4.0. And the bug can be reproduced easily – just because it is a niche feature that does not affect many torrent files does not mean it does not seriously affect many peopleʼs workflows.

@ThinkChaos

Copy link
Copy Markdown
Contributor

I would personally lean more towards warn for backward-compatibility reasons, and since it's similar to the established patern for module options (for instance mkRenamedOptionModule).
That would also allow you to backport the change and reach people using stable.

I do not think many people running unstable read release notes

I think you're right, personally I've started diffing the next release notes md file when updating my flake, works great :)

I would not consider a mention in release notes to be a sufficient precaution for bumping the transmission attribute to a version that eats data.

I agree, I meant just as a way to say "_4 exists, use it if you want".

@doronbehar

Copy link
Copy Markdown
Contributor Author

I opened a PR that does everything done in this file besides the rename, so that the discussion here will stay focused: #259361 . Your review is welcome.

There is a section for announcing new versions and Transmission 4 definitely deserves a mention (with a warning) but that just would not be enough for the bump IMO.

@jtojnar I feel we are in almost full agreement. Could you perhaps voice perhaps a more concrete opinion on the options suggested in my previous comment above?

@doronbehar doronbehar changed the title transmission: throw a message requesting the user to choose between transmission_3 and transmission_4 transmission: sent a warning and alias it to transmission_3 Jun 10, 2024
@doronbehar doronbehar marked this pull request as ready for review June 10, 2024 14:05
Comment thread nixos/modules/services/torrent/transmission.nix Outdated
@doronbehar doronbehar force-pushed the pkg/transmission_4 branch from 033ddce to f488a58 Compare June 10, 2024 16:23
@bb2020

bb2020 commented Jun 11, 2024

Copy link
Copy Markdown
Member

I decided to change this PR a bit after the discussion on discourse and these changes maybe don't fit now.

I see 4.00 still has some issues.

Perhaps you can submit a PR where the new settings you introduce change their default value based on the version of cfg.package?

I think you should still cherry pick my changes.
They are the defaults for older version and would minimize confusion if someone switches between V3 and V4.

@jtojnar

jtojnar commented Jun 11, 2024

Copy link
Copy Markdown
Member

I see 4.00 still has some issues.

Maybe we should create a thread in Discourse Announcements category like the following, and link it in the error message:

https://pad.lassul.us/lHdWr37LRxS-8gEHYWvfuA?both

(Feel free to edit)

They are the defaults for older version and would minimize confusion if someone switches between V3 and V4.

I think this is not our responsibility. And doing so might instead cause confusion for people switching from other distribution to NixOS. At most, we can mention it in the announcement.

@AndersonTorres

AndersonTorres commented Jun 11, 2024

Copy link
Copy Markdown
Member

It looks like a nice use case for RFC 127 problem infrastructure!

https://github.com/NixOS/rfcs/blob/master/rfcs%2F0127-issues-warnings.md

@jtojnar jtojnar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is another reference to pkgs.transmission in nixosTests.transmission:

transmission = handleTest ./transmission.nix { transmission = pkgs.transmission; };

@doronbehar

Copy link
Copy Markdown
Contributor Author

Thanks for the ideas @jtojnar . I added both a notice to the upcoming release notes, based on the text you wrote here.

They are the defaults for older version and would minimize confusion if someone switches between V3 and V4.

I think this is not our responsibility. And doing so might instead cause confusion for people switching from other distribution to NixOS. At most, we can mention it in the announcement.

I agree. I'll write a comment at the discourse thread when this is merged.

@doronbehar doronbehar force-pushed the pkg/transmission_4 branch from f488a58 to ecacf3c Compare June 12, 2024 18:07
@github-actions github-actions Bot added 8.has: documentation This PR adds or changes documentation 8.has: changelog This PR adds or changes release notes labels Jun 12, 2024
@jtojnar jtojnar dismissed their stale review June 12, 2024 18:48

resolved

Comment thread pkgs/top-level/aliases.nix Outdated
@doronbehar doronbehar force-pushed the pkg/transmission_4 branch from ecacf3c to f3e525d Compare June 12, 2024 19:30
@doronbehar doronbehar requested a review from jtojnar June 12, 2024 19:30
@ThinkChaos

Copy link
Copy Markdown
Contributor

I ran into another v4 bug that's technically data loss, sharing here for awareness: Downloaded data not saved, might be nice to also add to the release notes.

@doronbehar doronbehar force-pushed the pkg/transmission_4 branch from f3e525d to 63cd062 Compare June 12, 2024 20:13
@doronbehar

Copy link
Copy Markdown
Contributor Author

I ran into another v4 bug that's technically data loss, sharing here for awareness: Downloaded data not saved, might be nice to also add to the release notes.

Linked to it in the release notes 👍.

@doronbehar

Copy link
Copy Markdown
Contributor Author

So.. @jtojnar do I get your final approval on this change?

@doronbehar doronbehar force-pushed the pkg/transmission_4 branch from 63cd062 to 8ce56cc Compare June 21, 2024 09:31
@doronbehar doronbehar force-pushed the pkg/transmission_4 branch from 8ce56cc to 7645dde Compare June 21, 2024 09:33
@doronbehar

Copy link
Copy Markdown
Contributor Author

Once again I fixed the merge conflicts. Since the last revision of this PR, I got only approvals and hadn't seen any objections to it. Hence I'll merge it myself in a day or two.

@doronbehar doronbehar merged commit 9c7e7d8 into NixOS:master Jun 22, 2024
@doronbehar doronbehar deleted the pkg/transmission_4 branch June 22, 2024 21:07
@ju1m ju1m mentioned this pull request Oct 29, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: fetch Fetchers (e.g. fetchgit, fetchsvn, ...) 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: clean-up This PR removes packages or removes other cruft 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants