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

CI: Add a new workflow that tries to automatically update nix hashes #2871

Merged
merged 26 commits into from
Dec 8, 2021

Conversation

nomeata
Copy link
Collaborator

@nomeata nomeata commented Oct 31, 2021

Usually, when we upgrade some dependencies, we have to manually update the hashes. This involves

  • changing the hash to something else (e.g. changing one character)
  • running the build locally
  • observing the error message with the actual hash
  • pasting that
  • commit and push.

The nix-update tool can automate that.

This PR makes Github do that on all pushes (even to feature branches), and if needed, push a fix to that branch.

With #2761 adding even more fixed output derivations, this may be more relevant.

with #2761 adding even more fixed output derivations, this may be
useful.

If this works, maybe I’ll extract the `run` script here to a script in
the repo that works offline just as well.
@github-actions
Copy link

github-actions bot commented Oct 31, 2021

Comparing from 0fbdd43 to 519e079:
The produced WebAssembly code seems to be completely unchanged.

@nomeata nomeata marked this pull request as ready for review October 31, 2021 14:35
@nomeata
Copy link
Collaborator Author

nomeata commented Oct 31, 2021

This seems to work, I suggest we get it into master to see if it works reliably, and then possibly expand to other hashes in the repo, in particular the RTS hashes.

It breaks the hydra build, because it pulls in code that’s not on DFINITY’s whitelist. Maybe time to turn hydra off finally? (See #2771)

Copy link
Contributor

@ggreif ggreif left a comment

Choose a reason for hiding this comment

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

This needs some prose in the explanation otherwise I don't know what I am reviewing :-)

@nomeata
Copy link
Collaborator Author

nomeata commented Nov 3, 2021

True; updated the PR description

Copy link
Contributor

@ggreif ggreif left a comment

Choose a reason for hiding this comment

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

Great addition! Thanks!

@ggreif
Copy link
Contributor

ggreif commented Nov 22, 2021

@nomeata will we merge this?

@nomeata
Copy link
Collaborator Author

nomeata commented Nov 22, 2021

No hurry, maybe better when I'm back from traveling.

@nomeata nomeata marked this pull request as draft November 22, 2021 14:31
@nomeata nomeata marked this pull request as ready for review December 8, 2021 06:41
@nomeata
Copy link
Collaborator Author

nomeata commented Dec 8, 2021

Looks like I lost my commit rights here too? Is that intentional?

@ggreif
Copy link
Contributor

ggreif commented Dec 8, 2021

Looks like I lost my commit rights here too? Is that intentional?

No way. What are the symptoms you see? E.g. unable to resolve the conflict?

nix/default.nix Outdated Show resolved Hide resolved
@@ -0,0 +1,36 @@
{ lib
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto: nixpkgs-21.11 has this

@nomeata
Copy link
Collaborator Author

nomeata commented Dec 8, 2021

I can't commit your suggestions, please apply yourself

@rossberg
Copy link
Contributor

rossberg commented Dec 8, 2021

@nomeata, I just added you to the repo. Maybe it just happened to work earlier because you were member of the Dfinity core team?

@nomeata
Copy link
Collaborator Author

nomeata commented Dec 8, 2021

No, I lost that membership months ago, and were manually added to this repo and ic-hs. I assume it was some over-eager security team person or script? Thanks for adding me back.

@ggreif
Copy link
Contributor

ggreif commented Dec 8, 2021

A JIRA is open to add back the commit bit.

@nomeata
Copy link
Collaborator Author

nomeata commented Dec 8, 2021

A JIRA is open to add back the commit bit.

Andreas already took care of it for motoko, so ic-hs is still missing

nix/default.nix Outdated Show resolved Hide resolved
@ggreif
Copy link
Contributor

ggreif commented Dec 8, 2021

@nomeata the action sez: error: unrecognised flag '-c'.
All other errors come from the bad hash attached to drun-vendor.


Resolved: nix-2.4-related change.

nix/drun.nix Outdated Show resolved Hide resolved
needs `nix-command` as experimental
Copy link
Contributor

@ggreif ggreif left a comment

Choose a reason for hiding this comment

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

This looks like ready for the heavy-duty!

@ggreif ggreif added the automerge-squash When ready, merge (using squash) label Dec 8, 2021
@ggreif
Copy link
Contributor

ggreif commented Dec 8, 2021

@nomeata you have both bits back :-) Sorry for the grievances!

Ich bitte um Verzeihung fuer die Umstaende und um das
Weiterleiten dieser Entschuldigung an Joachim und Andreas.

@nomeata
Copy link
Collaborator Author

nomeata commented Dec 8, 2021

Thanks for quick fixing :-)

@mergify mergify bot merged commit 067f8fc into master Dec 8, 2021
@mergify mergify bot deleted the joachim/update-nix-hash-in-actions branch December 8, 2021 10:36
@mergify mergify bot removed the automerge-squash When ready, merge (using squash) label Dec 8, 2021
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.

3 participants