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
from

Conversation

@twhitehead
Copy link

@twhitehead twhitehead commented Jan 9, 2020

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 twhitehead:fixedoutput-rebuild branch 2 times, most recently from bacbc2b to 7c389a2 Jan 9, 2020
@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
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.
@twhitehead twhitehead force-pushed the twhitehead:fixedoutput-rebuild branch from 7c389a2 to 67c7e02 Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.