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

bats: 1.10.0 -> 1.11.0, resholve: fix related test breakage #303883

Merged
merged 4 commits into from
Apr 17, 2024

Conversation

abathur
Copy link
Member

@abathur abathur commented Apr 13, 2024

Description of changes

  • Update bats to 1.11.0 (changelog entry for 1.11.0)

  • Work around some resholve tests broken by this update. This uses patches (for now) to avoid needing to go through staging.

    Despite this, I'm deferring to the maintainer's opinion that this behavior shift doesn't rise to the level of a major/breaking change. After discussing with them, it sounds like I held it ~wrong and ended up depending on a ~quirky/buggy/misleading implementation detail that they needed to fix (for posterity, here's that discussion comment). They released a month ago (after a couple months in the release candidate stage) and I haven't seen issues/chatter indicating that this broke anyone else.

  • Add bats-tested packages to bats passthru.tests to reduce the likelihood we merge an update that'll break any of them (and do a little reformatting to aid this)

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.05 Release Notes (or backporting 23.05 and 23.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
  • Fits CONTRIBUTING.md.

Result of nixpkgs-review run on x86_64-darwin 1

4 packages built:
  • bash-preexec
  • bats
  • locate-dominating-file
  • packcc

Note: I'll update this later with results from NixOS; don't have access to the system atm.


Add a 👍 reaction to pull requests you find important.

I'm preparing to update bats to 1.11.0, but a change it includes will
require updating 3 of resholve's tests. Since a full resholve source
bump would need to go through staging now, I'm just patching the tests
in the separate test derivation.
Upcoming commit will add packages that use bats to passthru.tests,
which is a little more clear when this is one attrset.

Splitting this format-only change out for easier review.
It would have been ~easy for someone to update bats without noticing
whether the update broke any packages that depend directly on the
nixpkgs-packaged bats for their tests. (I'm phrasing this tediously
because there are also some packages that vendor a copy of bats.)

Hopefully this will make it easier to confirm future updates.
Copy link
Contributor

@drupol drupol left a comment

Choose a reason for hiding this comment

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

LGTM

pkgs/development/interpreters/bats/default.nix Outdated Show resolved Hide resolved
Also conditionally excludes pkill from resolution on macOS, since the
procps package should contain pkill on other platforms.
@drupol drupol merged commit 7a445b4 into NixOS:master Apr 17, 2024
24 checks passed
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.

2 participants