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

Output hash duplication detection fails fixed outputs (closes #697) #701

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

twhitehead
Copy link
Contributor

Using the output path to avoid repeating previously failued builds results to changes in fixed output paths not being rebuilt (e.g., updating a src url). Use the derivation path instead to fix this.

This seems to have resolved the issue on our hydra server (i.e., it now performs rebuilds even if only the source url is changed). I'm not an expert on this code base at all, so please do double check.

Here is a top-level example (usually this occurs on the src line for a package and not at top-level) of a package that exhibits the problem. Initially you have

drvtest = fetchurl {
  url = "https://www.sharcnet.ca/~tyson-oops/git.pdf";
  sha256 = "0w319fv5aanllf92m083ldh11vz21cdjnpyb7mnwmlyi06i628cy";
};

then you realize the url has changed (or is wrong), so you update it to the correct one

drvtest = fetchurl {
  url = "https://www.sharcnet.ca/~tyson/git.pdf";
  sha256 = "0w319fv5aanllf92m083ldh11vz21cdjnpyb7mnwmlyi06i628cy";
};

but hydra doesn't rebuild it because both have the same fixed output path. With this patch it does rebuild because they don't both have the same drv path. Here is the test case I ran on our hydra server with this patch in place

Note, under the Details tab, how both builds have the same Output store paths.

@twhitehead twhitehead force-pushed the fixedoutput-rebuild branch 2 times, most recently from bacbc2b to 7c389a2 Compare January 9, 2020 16:49
@twhitehead twhitehead changed the title Duplicate detection via output hash fails for fixed outputs (#679) Output hash duplication detection fails fixed outputs (closes #697) Jan 9, 2020
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/calling-all-hydra-users/11851/5

Using the output path to avoid repeating previously failued builds
results to changes in fixed output paths not being rebuilt (e.g.,
updating a src url). Use the derivation path instead to fix this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants