workflows/check-by-name: Pin nixpkgs-check-by-name tool#281374
Merged
infinisil merged 1 commit intoNixOS:masterfrom Jan 16, 2024
Merged
workflows/check-by-name: Pin nixpkgs-check-by-name tool#281374infinisil merged 1 commit intoNixOS:masterfrom
infinisil merged 1 commit intoNixOS:masterfrom
Conversation
8 tasks
l0b0
approved these changes
Jan 16, 2024
Before this, the tool for CI would update when nixos-unstable updated, which is kind of terrible because you don't know when it happens, and it might break master. In fact, the tooling _right now_ has a serious bug and shouldn't be used! This PR addresses this by _pinning_ the tooling in Nixpkgs itself. Updating the tooling now requires two PRs: - The first PR to update the tooling source - (wait for Hydra to build and publish it in nixos-unstable) - The second PR to update the pinned tooling In turn you know exactly when the changes are going to take effect. This change however has additional benefits: - It makes CI more reproducible, because it doesn't depend on the state of nixos-unstable anymore - Updates to the tooling can be tested with the workflow itself, because PRs that update the pinned tool will be tested on the updated version - CI gets a sizable speed boost, because there's no need to download and evaluate a channel anymore - It makes it more realistic to move the source of the tool into a separate repository - It removes the brittle branch-specific logic that was previously needed to ensure that release branches use their own version of the tooling.
b7a37d6 to
cc422e3
Compare
ConnorBaker
approved these changes
Jan 16, 2024
tomberek
approved these changes
Jan 16, 2024
Ericson2314
approved these changes
Jan 16, 2024
infinisil
added a commit
to tweag/nixpkgs
that referenced
this pull request
Jan 16, 2024
fetch-tool.sh was decommissioned in NixOS#281374, see the removed comment for why it can only be removed now
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
2 tasks
infinisil
added a commit
to tweag/nixpkgs
that referenced
this pull request
Jan 17, 2024
Since NixOS#281374, the nixpkgs-check-by-name tooling is pinned to a specific /nix/store path to avoid having to evaluate Nixpkgs in CI. The same path is used for local runs, but that doesn't actually work when you're trying to run it on a platform different from CI. This commit makes it work by being clearer about platforms and making local runs check out the correct Nixpkgs to evaluate the tool from.
This was referenced Jan 17, 2024
infinisil
added a commit
to NixOS/nixpkgs-vet
that referenced
this pull request
Mar 18, 2024
fetch-tool.sh was decommissioned in NixOS/nixpkgs#281374, see the removed comment for why it can only be removed now
infinisil
added a commit
to NixOS/nixpkgs-vet
that referenced
this pull request
Mar 18, 2024
Since NixOS/nixpkgs#281374, the nixpkgs-check-by-name tooling is pinned to a specific /nix/store path to avoid having to evaluate Nixpkgs in CI. The same path is used for local runs, but that doesn't actually work when you're trying to run it on a platform different from CI. This commit makes it work by being clearer about platforms and making local runs check out the correct Nixpkgs to evaluate the tool from.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Important
This needs to be merged quickly because #275539 will take effect in like a day and would break master! See #281390
Description of changes
Before this, the tool for CI would update when nixos-unstable updated, which is kind of terrible because you don't know when it happens, and it might break master.
In fact, the tooling right now has a serious bug and shouldn't be used! See #281390 for details and a fix.
This PR addresses this by pinning the tooling in Nixpkgs itself.
Updating the tooling now requires two PRs:
In turn you know exactly when the changes are going to take effect.
This change however has additional benefits:
Things done
./update-pinned-tool.shsuccessfully./run-local.sh mastersuccessfullyAdd a 👍 reaction to pull requests you find important.