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

nix: upgrade from 2.13.4 to 2.19.3 #18742

Merged
merged 1 commit into from
Feb 13, 2024
Merged

nix: upgrade from 2.13.4 to 2.19.3 #18742

merged 1 commit into from
Feb 13, 2024

Conversation

jakubgs
Copy link
Member

@jakubgs jakubgs commented Feb 7, 2024

We are moving location of symlinks for build derivations for gcroots from /nix/var/nix/gcroots/per-user to .nix-gcroots in the repo to avoid errors like this caused by profile migration in 2.14 release:

error: creating directory '/nix/var/nix/gcroots/per-user/joe': Permission denied

For more details see: NixOS/nix#8564

To upgrade without using make nix-purge use make nix-upgrade.

Related infra change:

@jakubgs jakubgs added infra nix dependencies Pull requests that update a dependency file labels Feb 7, 2024
@jakubgs jakubgs self-assigned this Feb 7, 2024
@status-im-auto
Copy link
Member

status-im-auto commented Feb 7, 2024

Jenkins Builds

Click to see older builds (41)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ f4006cb #1 2024-02-07 10:59:50 ~5 min tests 📄log
✔️ f4006cb #1 2024-02-07 11:02:07 ~8 min android 🤖apk 📲
✔️ f4006cb #1 2024-02-07 11:03:31 ~9 min android-e2e 🤖apk 📲
✔️ f4006cb #1 2024-02-07 11:05:48 ~11 min ios 📱ipa 📲
✔️ 0543485 #2 2024-02-07 12:41:10 ~6 min tests 📄log
✔️ 0543485 #2 2024-02-07 12:42:38 ~7 min android 🤖apk 📲
✔️ 0543485 #2 2024-02-07 12:42:50 ~7 min android-e2e 🤖apk 📲
✔️ 0543485 #2 2024-02-07 12:47:00 ~12 min ios 📱ipa 📲
23c2efd #3 2024-02-07 14:27:05 ~1 min android 📄log
23c2efd #3 2024-02-07 14:27:53 ~2 min android-e2e 📄log
✔️ 23c2efd #3 2024-02-07 14:32:33 ~6 min ios 📱ipa 📲
23c2efd #3 2024-02-07 14:33:45 ~7 min tests 📄log
8a5c518 #4 2024-02-08 08:52:51 ~13 sec android 📄log
✔️ 8a5c518 #4 2024-02-08 08:58:58 ~6 min tests 📄log
✔️ 8a5c518 #4 2024-02-08 08:59:45 ~7 min ios 📱ipa 📲
✔️ 8a5c518 #4 2024-02-08 09:01:37 ~9 min android-e2e 🤖apk 📲
✔️ 6d19967 #5 2024-02-08 10:01:08 ~5 min tests 📄log
✔️ 6d19967 #5 2024-02-08 10:01:22 ~6 min ios 📱ipa 📲
✔️ 6d19967 #5 2024-02-08 10:03:34 ~8 min android-e2e 🤖apk 📲
✔️ 6d19967 #6 2024-02-08 10:05:31 ~7 min android 🤖apk 📲
19b3574 #8 2024-02-08 10:39:59 ~29 sec android 📄log
19b3574 #6 2024-02-08 10:40:12 ~42 sec android-e2e 📄log
✔️ 19b3574 #6 2024-02-08 10:44:56 ~5 min tests 📄log
✔️ 19b3574 #6 2024-02-08 10:45:34 ~6 min ios 📱ipa 📲
✔️ 062ad9e #7 2024-02-08 10:54:34 ~5 min tests 📄log
✔️ 062ad9e #7 2024-02-08 10:55:28 ~6 min ios 📱ipa 📲
✔️ 062ad9e #7 2024-02-08 10:57:11 ~8 min android-e2e 🤖apk 📲
✔️ 062ad9e #9 2024-02-08 10:57:18 ~8 min android 🤖apk 📲
d46a775 #10 2024-02-08 12:15:02 ~15 sec android 📄log
d46a775 #8 2024-02-08 12:15:03 ~16 sec android-e2e 📄log
✔️ d46a775 #8 2024-02-08 12:20:19 ~5 min tests 📄log
✔️ d46a775 #8 2024-02-08 12:21:38 ~6 min ios 📱ipa 📲
✔️ d46a775 #11 2024-02-08 12:27:19 ~7 min android 🤖apk 📲
✔️ 37aa6ad #9 2024-02-08 13:41:16 ~6 min ios 📱ipa 📲
✔️ 37aa6ad #12 2024-02-08 13:46:26 ~11 min android 🤖apk 📲
✔️ 37aa6ad #9 2024-02-08 13:48:19 ~13 min tests 📄log
✔️ 37aa6ad #9 2024-02-08 13:50:48 ~16 min android-e2e 🤖apk 📲
✔️ b6cc389 #10 2024-02-08 14:30:30 ~5 min tests 📄log
✔️ b6cc389 #10 2024-02-08 14:32:37 ~8 min android-e2e 🤖apk 📲
✔️ b6cc389 #10 2024-02-08 14:32:46 ~8 min ios 📱ipa 📲
✔️ b6cc389 #13 2024-02-08 14:33:15 ~8 min android 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 0620365 #11 2024-02-12 18:20:03 ~5 min tests 📄log
✔️ 0620365 #11 2024-02-12 18:20:49 ~5 min ios 📱ipa 📲
✔️ 0620365 #11 2024-02-12 18:23:09 ~8 min android-e2e 🤖apk 📲
✔️ 0620365 #14 2024-02-12 18:23:13 ~8 min android 🤖apk 📲
✔️ c5df51d #12 2024-02-13 12:40:37 ~7 min ios 📱ipa 📲
✔️ c5df51d #12 2024-02-13 12:42:57 ~9 min tests 📄log
✔️ c5df51d #12 2024-02-13 12:43:55 ~10 min android-e2e 🤖apk 📲
✔️ c5df51d #15 2024-02-13 12:45:01 ~11 min android 🤖apk 📲

@jakubgs
Copy link
Member Author

jakubgs commented Feb 7, 2024

These warning are kinda annoying but not serious:

warning: Ignoring setting 'auto-allocate-uids' because experimental feature 'auto-allocate-uids' is not enabled
warning: Ignoring setting 'impure-env' because experimental feature 'configurable-impure-env' is not enabled

It is a known issue:

@jakubgs jakubgs force-pushed the nix/upgrade-2-19-2 branch from f4006cb to 0543485 Compare February 7, 2024 12:34
@jakubgs jakubgs changed the title nix: upgrade from 2.13.4 to 2.19.2 nix: upgrade from 2.13.4 to 2.19.3 Feb 7, 2024
@jakubgs
Copy link
Member Author

jakubgs commented Feb 7, 2024

Another bigger problem is this error:

error: creating directory '/nix/var/nix/gcroots/per-user/joe': Permission denied

Which has not been resolved since 2.14.0:

EDIT: The correct solution is to move gcroots symlinks to .nix-gcroots folder at repo root.

@jakubgs jakubgs force-pushed the nix/upgrade-2-19-2 branch from 0543485 to 23c2efd Compare February 7, 2024 14:25
@jakubgs
Copy link
Member Author

jakubgs commented Feb 7, 2024

All CI hosts have been upgraded to use Nix 2.19.2:

 > a ci-slave-macos -o -a '. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh; nix --version' | sort
maci7-01.ms-eu-dublin.ci.devel | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2
maci7-02.ms-eu-dublin.ci.devel | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2
maci7-03.ms-eu-dublin.ci.devel | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2
macm1-01.ih-eu-mda1.ci.devel | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2
macm2-01.ih-eu-mda1.ci.devel | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2
macm2-02.ih-eu-mda1.ci.devel | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2
macm2-01.ih-eu-mda1.ci.release | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2

 > a ci-slave-linux -o -a '. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh; nix --version' | sort
linux-01.he-eu-hel1.ci.release | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2
linux-01.he-eu-hel1.ci.devel | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2
linux-02.he-eu-hel1.ci.devel | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2
linux-03.he-eu-hel1.ci.devel | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2
linux-04.he-eu-hel1.ci.devel | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2
linux-05.he-eu-hel1.ci.devel | CHANGED | rc=0 | (stdout) nix (Nix) 2.19.2

I did not use 2.19.3 since I've been testing 2.19.2 on release CI hosts for a few weeks and I am sure it works.

Copy link
Contributor

@siddarthkay siddarthkay left a comment

Choose a reason for hiding this comment

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

Looks good to me!
Glad that we are able to bump the nix interpreter version ❤️👏🏻👏🏻

Testing locally with make nix-purge (just to be 100% sure) and will reply back after checking a couple of make commands.

@jakubgs jakubgs marked this pull request as ready for review February 8, 2024 10:34
@jakubgs jakubgs force-pushed the nix/upgrade-2-19-2 branch 4 times, most recently from d46a775 to 37aa6ad Compare February 8, 2024 13:34
@jakubgs
Copy link
Member Author

jakubgs commented Feb 8, 2024

There is an issue that happens on some hosts:

+ chgrp nixbld /tmp/nix-env-240208-121446-dik4h0SU.tmp
chgrp: changing group of '/tmp/nix-env-240208-121446-dik4h0SU.tmp': Operation not permitted
script returned exit code 1

But this happens only when the SSH process for jenkins user is not restarted after Nix reinstallation.

@jakubgs jakubgs force-pushed the nix/upgrade-2-19-2 branch from 37aa6ad to b6cc389 Compare February 8, 2024 14:24
Copy link
Member

@yakimant yakimant left a comment

Choose a reason for hiding this comment

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

I think make clean should run git clean without -x. Removing only not ignored files. And purge should remove both ignored and not (-X as it it is now).

Might not be related to the issue. I was just thinking if there are any cases on CI or locally, when .nix-gcroots is removed, but should not.

@jakubgs
Copy link
Member Author

jakubgs commented Feb 12, 2024

@yakimant your point about relationship between .nix-gcroots and git clean -fdx is a fair one. I have not considered it.

I think there is a possibility that calling clean would also result in a too big nix store purge, but it is quite the edge case.
I don't have any strong argument against removing -x, might be fine, but it is a big change in behavior of make clean, while it is a very small change in how it interacts with Nix. I can be persuaded both ways.

We are moving location of symlinks for build derivations for `gcroots`
from `/nix/var/nix/gcroots/per-user` to `.nix-gcroots` in the repo to
avoid errors like this caused by profile migration in `2.14` release:
```
error: creating directory '/nix/var/nix/gcroots/per-user/joe': Permission denied
```
For more details see: NixOS/nix#8564

To upgrade without using `make nix-purge` use `make nix-upgrade`.

Related infra change:
status-im/infra-ci@37c6ce47

Signed-off-by: Jakub Sokołowski <jakub@status.im>
@jakubgs jakubgs merged commit c5df51d into develop Feb 13, 2024
6 checks passed
@jakubgs jakubgs deleted the nix/upgrade-2-19-2 branch February 13, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file infra nix
Projects
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants