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

nixos/tsm-client: Fix multi-value dsm.sys options #327748

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

lluchs
Copy link
Contributor

@lluchs lluchs commented Jul 16, 2024

A configuration such as:

programs.tsmClient.servers.backup.domain = [ "/dir1" "/dir2" ];

...would previously result in an error ("cannot coerce a list to a string"), since makeDsmSysLines would return a nested list.

Description of changes

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.11 Release Notes (or backporting 23.11 and 24.05 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.

A configuration such as:

    programs.tsmClient.servers.backup.domain = [ "/dir1" "dir2" ];

...would previously result in an error ("cannot coerce a list to a
string"), since `makeDsmSysLines` would return a nested list.
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Jul 16, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jul 16, 2024
@Yarny0
Copy link
Contributor

Yarny0 commented Jul 17, 2024

Review per https://github.com/NixOS/nixpkgs/blob/d95b1060ca298c62f56de90d0bf755c4c6b48e0a/nixos/README.md#module-updates

Reviewed points
  • changes are backward compatible
  • removed options are declared with mkRemovedOptionModule
  • changes that are not backward compatible are documented in release notes
  • module tests succeed on x86-64
  • options types are appropriate
  • options description is set
  • options example is provided
  • documentation affected by the changes is updated
Possible improvements

(none)

Comments

Thanks @lluchs for catching this -- apparently I didn't test all possible config value types in #253428 . Now I did, and I can confirm: After applying the pull request at hand, values with a list, true and null all yield what is expected.

I approve this pull request. I recommend it to be merged. I also suggest it to be backported to stable NixOS via the backport label: Given that the fixed bug blocks evaluation of the system configuration, it should not cause any regressions.

(Note: I'm the maintainer of the tsm-client module)

Result of nixpkgs-review run on x86_64-linux 1
1 package blacklisted:
  • nixos-install-tools

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1834

@SuperSandro2000 SuperSandro2000 merged commit 669a3a6 into NixOS:master Jul 17, 2024
25 checks passed
@lluchs lluchs added the backport release-24.05 Backport PR automatically label Jul 17, 2024
Copy link
Contributor

Successfully created backport PR for release-24.05:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 backport release-24.05 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants