-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
hydra: 2020-02-06 -> 2020-03-{24,27} #83600
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ma27
added
the
9.needs: port to stable
A PR needs a backport to the stable release.
label
Mar 28, 2020
grahamc
reviewed
Mar 28, 2020
shipit! |
Upgrades Hydra to the latest master/flake branch. To perform this upgrade, it's needed to do a non-trivial db-migration which provides a massive performance-improvement[1]. The basic ideas behind multi-step upgrades of services between NixOS versions have been gathered already[2]. For further context it's recommended to read this first. Basically, the following steps are needed: * Upgrade to a non-breaking version of Hydra with the db-changes (columns are still nullable here). If `system.stateVersion` is set to something older than 20.03, the package will be selected automatically, otherwise `pkgs.hydra-migration` needs to be used. * Run `hydra-backfill-ids` on the server. * Deploy either `pkgs.hydra-unstable` (for Hydra master) or `pkgs.hydra-flakes` (for flakes-support) to activate the optimization. The steps are also documented in the release-notes and in the module using `warnings`. `pkgs.hydra` has been removed as latest Hydra doesn't compile with `pkgs.nixStable` and to ensure a graceful migration using the newly introduced packages. To verify the approach, a simple vm-test has been added which verifies the migration steps. [1] NixOS/hydra#711 [2] NixOS#82353 (comment)
Ma27
force-pushed
the
hydra-two-stage-deploy
branch
from
March 28, 2020 22:33
5a5a330
to
bd5324c
Compare
Ah, thanks for merging! (FYI already working on the backport :)) |
Backported as dabdd3a. |
Ma27
added
8.has: port to stable
A PR already has a backport to the stable release.
and removed
9.needs: port to stable
A PR needs a backport to the stable release.
labels
Mar 28, 2020
LGTM. |
3 tasks
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
6.topic: nixos
8.has: changelog
8.has: clean-up
8.has: documentation
8.has: module (update)
8.has: package (new)
8.has: port to stable
A PR already has a backport to the stable release.
10.rebuild-darwin: 0
10.rebuild-linux: 1-10
11.by: package-maintainer
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Upgrades Hydra to the latest master/flake branch. To perform this
upgrade, it's needed to do a non-trivial db-migration which provides a
massive performance-improvement[1].
The basic ideas behind multi-step upgrades of services between NixOS versions
have been gathered already[2]. For further context it's recommended to
read this first.
Basically, the following steps are needed:
Upgrade to a non-breaking version of Hydra with the db-changes
(columns are still nullable here). If
system.stateVersion
is set tosomething older than 20.03, the package will be selected
automatically, otherwise
pkgs.hydra-migration
needs to be used.Run
hydra-backfill-ids
on the server.Deploy either
pkgs.hydra-unstable
(for Hydra master) orpkgs.hydra-flakes
(for flakes-support) to activate the optimization.The steps are also documented in the release-notes and in the module
using
warnings
.pkgs.hydra
has been removed as latest Hydra doesn't compile withpkgs.nixStable
and to ensure a graceful migration using the newlyintroduced packages.
To verify the approach, a simple vm-test has been added which verifies
the migration steps.
[1] NixOS/hydra#711
[2] #82353 (comment)
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)