-
-
Notifications
You must be signed in to change notification settings - Fork 145
Description
Problems
Importing flakes is starting to get outscaled
This has started causing CI issues.
For example, https://github.com/NixOS/nixos-search/actions/workflows/import-to-elasticsearch.yml fails repetitively which makes https://search.nixos.org/flakes unable to be updated
Errors
Disk space seems to be the culprit since errors seems to mostly be
System.IO.IOException: No space left on device
(except the first failing of the failing streak)
And some other are
The job has exceeded the maximum execution time of 6h0m0s
Subject
- first failing of the failing streak: Hourly import to Elasticsearch #30802
- last succeeding before the failing streak: Hourly import to Elasticsearch #30801
nixos-search/.github/workflows/import-to-elasticsearch.yml
Lines 116 to 120 in 701750c
- name: Import ${{ matrix.group }} group if: github.repository_owner == 'NixOS' shell: sh run: | nix run --accept-flake-config .#flake-info -- --push --elastic-schema-version=$(cat ./VERSION) group ./flakes/${{ matrix.group }}.toml ${{ matrix.group }}
That step, and especially for the "manual" matrix group (= "Import manual group" step) is the failing one
Proposed Solutions
Ordered by (@Malix-Labs's) preference
Only one implementation would be sufficient, but a combination could help in case it isn't
- Enhancing CI algorithm by looping for each flake entry and checking for garbage collecting needs before iterating or by using periodic disk monitoring (which maybe would need to be done in flake-info
- Keep a single file but split its evaluation into chunks (preferably of ~ equal hardware requirements, maybe by pre-evaluating each flake hardware requirements before the "Import ${{ matrix.group }} group" / "Import manual group" step)
- Use GitHub large runners
- Splitting flakes entry into arbitrary files (Split flake lists into groups #1037)
References
- enhance(ci): Workflow "Check Flake Groups" - Increasing Time to Complete #1027 (concerns are somewhat related)