-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(nix): fix flake lock refresh #33991
base: main
Are you sure you want to change the base?
Conversation
lib/modules/manager/nix/extract.ts
Outdated
@@ -93,7 +100,6 @@ export async function extractPackageFile( | |||
case 'github': | |||
deps.push({ | |||
depName, | |||
currentValue: flakeOriginal.ref, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find a way to tell the updater here to check against the flake.lock file instead of the matched flake.nix file
6e39464
to
de0b6fb
Compare
I think this approach of matching on both the I think one alternative approach would be something like this (main...mfenniak:renovate:fix-nix-alternative):
I think that would avoid the problem, if I've understood your change correctly -- there won't be any duplicate It would probably have a bug though: if |
2820cb4
to
6df6f7e
Compare
6df6f7e
to
78997c3
Compare
78997c3
to
0ba64df
Compare
I think that was because I dropped the currentValue and somehow created ghost updates that didn't really where there... Oh boy... :notlikethis: I have deployed the latest commit as of writing. This "ghost" PR got marked as abandon. NuschtOS/ixx#55 . Before with the commit from yesterday with this branch it pushed the entire day nonsense. See that PRs history. This dashboard is created with it NuschtOS/ixx#3 , too. |
0d379fc
to
1270283
Compare
* upstream/main: (27 commits) chore(deps): update python:3.13 docker digest to 7be9b75 (renovatebot#34045) chore(deps): update ghcr.io/containerbase/devcontainer docker tag to v13.7.7 (renovatebot#34043) docs(gitea): fix `gitUrl` support (renovatebot#34038) feat(npm): Support for new option `replacementApproach` (renovatebot#34018) chore(deps): lock file maintenance (renovatebot#33998) chore(deps): update sigstore/cosign-installer action to v3.8.0 (renovatebot#34034) docs(managers/pip-compile): update list of source files and managers (renovatebot#34030) chore(deps): update linters to v8.22.0 (renovatebot#33880) fix(gitea): use endpoint for pr cache pagination (renovatebot#34022) chore(deps): update otel/opentelemetry-collector-contrib docker tag to v0.119.0 (renovatebot#34032) feat(gradle): add support for gradle repository content descriptors (renovatebot#33692) feat(manager): add elixir as a mise core tooling (renovatebot#34025) chore(deps): update python:3.13 docker digest to d59d263 (renovatebot#34026) chore(deps): update ghcr.io/containerbase/devcontainer docker tag to v13.7.6 (renovatebot#34021) fix(gitea): allow overriding platform version (renovatebot#34019) chore(deps): update dependency @types/lodash to v4.17.15 (renovatebot#34020) fix(manager/terragrunt): Update terragrunt packageName (renovatebot#33810) feat(pip-compile): support `uv pip compile` (renovatebot#33952) fix(deps): update dependency mkdocs-material to v9.6.2 (renovatebot#34010) chore(label-actions): improve logs, pr closing (renovatebot#33995) ...
@@ -8,7 +8,7 @@ export const supportsLockFileMaintenance = true; | |||
export const url = 'https://nix.dev'; | |||
|
|||
export const defaultConfig = { | |||
fileMatch: ['(^|/)flake\\.nix$'], | |||
fileMatch: ['(^|/)flake\\.(nix|lock)$'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this approach. I think we need a different solution. instead of writing the version from lockfile to current version, use locked version property. this should refuse renovate from trying auto replace for such dependencies
renovate/lib/modules/manager/types.ts
Line 151 in 55b5919
lockedVersion?: string; |
Changes
This PR fixes flake.lock refreshes which didn't fully work in #31921 because of a testing oversight:
I used this to generate NuschtOS/ixx#54
The underlying problem is that renovate checks for the deps digest in the fileMatch which is for nix flakes the flake.lock. We need to keep the flake.nix otherwise the nixpkgs updater breaks. currentValue needed to be dropped because otherwise renovate would only search in there.
@mfenniak do you have a better idea?
Context
#31921 (comment)
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: