Skip to content

fix(deployment): flake import #1033

@Malix-Labs

Description

@Malix-Labs

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

- 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

  1. 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
  2. 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)
  3. Use GitHub large runners
  4. Splitting flakes entry into arbitrary files (Split flake lists into groups #1037)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions