Skip to content

Make nix-collect-garbage -d look into more places#8154

Merged
Ericson2314 merged 2 commits intoNixOS:masterfrom
tweag:delete-old-on-all-profiles-dir
May 16, 2023
Merged

Make nix-collect-garbage -d look into more places#8154
Ericson2314 merged 2 commits intoNixOS:masterfrom
tweag:delete-old-on-all-profiles-dir

Conversation

@thufschmitt
Copy link
Member

@thufschmitt thufschmitt commented Apr 3, 2023

Motivation

Make it look into the new-style profiles dir, the old-style one, and the
target of ~/.nix-profile to be sure that we don't miss anything when running
the GC.

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • documentation in the internal API docs
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

Priorities

Add 👍 to pull requests you find important.

Fix #8294

@thufschmitt thufschmitt requested a review from edolstra as a code owner April 3, 2023 13:34
Ericson2314
Ericson2314 previously approved these changes Apr 3, 2023
@Ericson2314
Copy link
Member

Oh great, the dreaded error: without warning: for SQLite.

@thufschmitt
Copy link
Member Author

Ping @NixOS/nix-team. This fixes #8294 which is a quite annoying bug

Copy link
Contributor

@fricklerhandwerk fricklerhandwerk left a comment

Choose a reason for hiding this comment

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

Discussed in Nix team meeting:

This needs a test to prevent regressions in the future.

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/2023-05-08-nix-team-meeting-minutes-53/27967/1

@Ericson2314
Copy link
Member

I checked some of the review boxes.

Théophane Hufschmitt added 2 commits May 15, 2023 11:36
Make it look into the new-style profiles dir, the old-style one, and the
target of `~/.nix-profile` to be sure that we don't miss anything
@thufschmitt thufschmitt force-pushed the delete-old-on-all-profiles-dir branch from a57810b to e97e9e9 Compare May 15, 2023 09:59
@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label May 15, 2023
@thufschmitt
Copy link
Member Author

@Ericson2314 I've added a test for it (which fails without the first commit). PTAL

@thufschmitt thufschmitt requested a review from Ericson2314 May 15, 2023 10:07
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

Looks great!

@Ericson2314
Copy link
Member

Ericson2314 commented May 16, 2023

We need docs too, but this can be done in a follow-up (since this is fixing a regression, there is no intended new behavior).

@github-actions
Copy link

Successfully created backport PR for 2.15-maintenance:

@Ericson2314
Copy link
Member

Ericson2314 commented May 16, 2023

Oh, I suspect this test is incomplete too, and there are still bugs. I will take look into this.

False alarm, my bad. The additional test passed.

max-privatevoid added a commit to privatevoid-net/nix-super that referenced this pull request May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug with-tests Issues related to testing. PRs with tests have some priority

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

sudo nix-collect-garbage -d does not remove all old generations

6 participants