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

reproduce: Only download the needed commit #789

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

Conversation

c00w
Copy link

@c00w c00w commented Jun 28, 2020

On something like github this is super efficient due to
git/git@68ee628

But in general it should be more efficient since the entire nixpkg
history doesn't need to be downloaded.

I've manually tested this by fetching a reproduce script from hydra + modifying it to have these changes.

@c00w
Copy link
Author

c00w commented Jun 28, 2020

@Mic92 Any idea who I should reach out to for hydra changes?

@Mic92
Copy link
Member

Mic92 commented Jun 29, 2020

It's mainly maintained by @edolstra but @basvandijk and @grahamc also can merge changes.

@Mic92
Copy link
Member

Mic92 commented Jun 29, 2020

I think @knl or @Ma27 could review the change to give the merger less work to do.

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested against a live Hydra, LGTM 👍

@edolstra
Copy link
Member

Doesn't this break the next line:

     revCount="$(cd "$inputDirTmp" && (git rev-list '[% input.revision %]' | wc -l))"

@Ma27
Copy link
Member

Ma27 commented Jun 29, 2020

It says 1 then since only one ref is fetched, but at least I don't consider that an issue.

@edolstra
Copy link
Member

It means that the evaluation result may no longer be the same, which is a bad thing for a script called "reproduce".

@c00w
Copy link
Author

c00w commented Jun 30, 2020

Sounds like I need to modify hydra to pass the revCount in as a parameter to the template.

On something like github this is super efficient due to
git/git@68ee628

But in general it should be more efficient since the entire nixpkg
history doesn't need to be downloaded.

I've manually tested this by fatchin a reproduce script from hydra.
@c00w
Copy link
Author

c00w commented Jun 30, 2020

I'm 30% positive what I've done will work. The revCount is produced by the Git and Hg Plugins, but I totally can't figure out how the inputs to reproduce.tt get passed in (I see the controller file, but I don't see where it's actually rendered, or what type anything is).

If someone can point me in the right direction, that would be awesome.

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

4 participants