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

Field compress_num_threads declared twice break the cache. #1389

Open
amerocu opened this issue Jun 12, 2024 · 0 comments
Open

Field compress_num_threads declared twice break the cache. #1389

amerocu opened this issue Jun 12, 2024 · 0 comments
Labels

Comments

@amerocu
Copy link

amerocu commented Jun 12, 2024

Describe the bug
If the option compress_num_threads is set multiple times in the hydra configurations, hydra is no more able to serve the cache.

From the service logs:

hydra-server[896354]: sh: -c: line 1: syntax error near unexpected token `('
hydra-server[896354]: sh: -c: line 1: `nix-store --dump '/nix/store/hzlywcjdlr0n0nibcrfm9x5hh58nvzqb-src' | pixz -0 -pARRAY(0x4a06e50)'

while running this command from a client:

$ curl https://yourhydra.nix/nar/hzlywcjdlr0n0nibcrfm9x5hh58nvzqb-src --output derivation.bundle

The point of the hydra code that throws that error is this one.

It seems that if a field is declared more times in the configuration, the value of the field in the configuration becomes a list.

This bug happens every time the field compress_num_threads is set, because the hydra repository module always set a value for this field.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy the hydra application with compress_num_threads declared twice.

Expected behavior
The cache should be served successfully, honoring the last value declared.

@amerocu amerocu added the bug label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant