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

Minor improvements to Nix expresions #939

Merged
merged 7 commits into from
Jul 13, 2016
Merged

Minor improvements to Nix expresions #939

merged 7 commits into from
Jul 13, 2016

Conversation

domenkozar
Copy link
Member

See commits for summary.

@eugeneia should we document somewhere that .version needs to be bumped on each release?

cc @kbara

@kbara kbara self-assigned this Jun 10, 2016
@eugeneia
Copy link
Member

Is there any way we could avoid the .version file? The way I see it it will be wrong/misleading in most commits and this information is already encoded in git tags.

@domenkozar
Copy link
Member Author

I'm open for suggestions, but in Nix we can't depend on .git since nix hash
is content addressed and .git folder is not deterministic for a given git
commit rev.
On Jun 13, 2016 12:12 PM, "Max Rottenkolber" notifications@github.com
wrote:

Is there any way we could avoid the .version file? The way I see it it
will be wrong/misleading in most commits and this information is already
encoded in git tags.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#939 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAHtg5P-qNPl_LR_-dEz7FtZo51m_jj_ks5qLTr0gaJpZM4Iy5jB
.

@lukego
Copy link
Member

lukego commented Jun 13, 2016

How about if release.nix would take the software version, etc, as parameters? i.e. instead of being a completely stand-alone release-and-test procedure it would simply be nix library code that can be referenced from other repositories e.g. nixpkgs and snabblab-nixos.

I see a few issues with trying to bake everything into the snabb/release.nix file:

  1. Determining software version, as we already discuss.
  2. Snabb has a distributed development workflow, where independent groups can make their own releases from their own application-specific branches, and it will be conflict-prone if everybody is changing the .version on their branch and then merging with each other.
  3. The release.nix is also referencing infrastructure like lugano server hardware which seems to me logically a part of the Snabb Lab (i.e. snabblab-nixos repo) and not of the software itself (which may be built/tested/released in a completely different environment e.g. upstream nixpkgs).

@domenkozar
Copy link
Member Author

I agree we should make release.nix more like a flat list of helper functions and disregard snabblab information.

.version could denote "upstream version" on which Snabb fork is based. I realize it's extra work for releases, we could name development branch 2016.07.dev or something similar.

It's possible to avoid this in Nix, but for every git checkout I need to explicitly specify the version. Not the end of the world, but also quite tedious.

That being said, I'll accept if we remove .version with "too much of a burden" reasoning.

@domenkozar domenkozar changed the title Minor improvements to Nix expresions [WIP] Minor improvements to Nix expresions Jun 16, 2016
@kbara
Copy link
Contributor

kbara commented Jun 22, 2016

I'd like to see consensus about what to do about version handling before merging this.

Nix expressions will always just set it according to source,
but let's still provide a default for convenience.
@domenkozar
Copy link
Member Author

@kbara we decided not to hardcode due to the forking workflow, which would be very confusing for downstream. Instead, we'll just provide the version manually based from where Snabb will be imported.

Ready for review :)

@domenkozar domenkozar changed the title [WIP] Minor improvements to Nix expresions Minor improvements to Nix expresions Jun 23, 2016
@domenkozar
Copy link
Member Author

Aha - this fails due to problems with davos/CI.

@domenkozar
Copy link
Member Author

@kbara snabb-nfv-test-vanilla passes, so this is ready to be merged.

kbara pushed a commit to kbara/snabb that referenced this pull request Jul 1, 2016
@kbara
Copy link
Contributor

kbara commented Jul 1, 2016

LGTM, thanks for this. Merged into kbara-next, PR'd for next.

@kbara kbara added the merged label Jul 1, 2016
@eugeneia eugeneia merged commit 1b60645 into master Jul 13, 2016
dpino pushed a commit to dpino/snabb that referenced this pull request Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants