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

restate: init at 1.1.6 #367466

Merged
merged 2 commits into from
Jan 2, 2025
Merged

restate: init at 1.1.6 #367466

merged 2 commits into from
Jan 2, 2025

Conversation

myypo
Copy link
Contributor

@myypo myypo commented Dec 22, 2024

Restate is a tool for developing durable workflows

Closes #325360

Have tried running several official examples and it seems to be working fine.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Dec 22, 2024
@myypo myypo changed the title Init restate restate: init at 1.1.5 Dec 22, 2024
@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Dec 22, 2024
@myypo myypo marked this pull request as draft December 22, 2024 21:38
restate,
}:
let
# Have to link against this fork until this PR is merged
Copy link
Contributor

Choose a reason for hiding this comment

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

You can put the diff the PR represents into the folder with the package.nix and apply it to the source, then pull from the original repo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On testing I have realized that it needs more than a single PR I have mentioned to build. A diff against their fork generates 12 patches, so I have removed the nixpkgs input altogether, now rustPlatform.buildRustPackage builds it instead. I think, that a benefit of this approach, is that rocksdb is linked statically then.

src = fetchFromGitHub {
owner = "restatedev";
repo = "restate";
rev = "v${version}";
Copy link
Contributor

Choose a reason for hiding this comment

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

tag = "v${version}"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@steeleduncan
Copy link
Contributor

@myypo

It looks good to me, but I don't have commit access, and don't maintain a similar package, so it doesn't make sense for me to leave an approving review.

My suggestion to get it merged would be to find someone who has merged a PR comparable to this into nixpkgs recently, and ping them for a review. Good luck!

@myypo
Copy link
Contributor Author

myypo commented Dec 31, 2024

@GaetanLepage
Hi. I noticed that you have recently been contributing to the Materialize package.
Restate is also a Rust project that uses rdkafka and rocksdb. If you have some time, I would appreciate your review.

cargoHash = "sha256-z7VAKU4bi6pX2z4jCKWDfQt8FFLN7ugnW2LOy6IHz/w=";

env = {
PROTOC = "${protobuf}/bin/protoc";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
PROTOC = "${protobuf}/bin/protoc";
PROTOC = lib.getExe protobuf;

Comment on lines 86 to 97
auditable = false;

passthru = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
auditable = false;
passthru = {
auditable = false;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;
passthru = {

Add this one too as it will run at build time.

Comment on lines 106 to 117
homepage = "https://restate.dev";
mainProgram = "restate";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
homepage = "https://restate.dev";
mainProgram = "restate";
homepage = "https://restate.dev";
changelog = "https://github.com/restatedev/restate/releases/tag/v${version}";
mainProgram = "restate";

@myypo myypo changed the title restate: init at 1.1.5 restate: init at 1.1.6 Dec 31, 2024
@myypo myypo requested a review from GaetanLepage December 31, 2024 18:29
PROTOC_INCLUDE = "${protobuf}/include";

VERGEN_GIT_COMMIT_DATE = "2024-12-23";
VERGEN_GIT_SHA = src.tag;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
VERGEN_GIT_SHA = src.tag;
VERGEN_GIT_SHA = "v${version}";

It's better not to rely on src fields as they might not be available when overriding src.

Copy link
Contributor Author

@myypo myypo Jan 1, 2025

Choose a reason for hiding this comment

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

Makes sense for ergonomics. Force pushed a fix.

@GaetanLepage
Copy link
Contributor

@ofborg build restate

Comment on lines 87 to 91
auditable = false;

nativeInstallCheckInputs = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
auditable = false;
nativeInstallCheckInputs = [
auditable = false;
__darwinAllowLocalNetworking = true;
nativeInstallCheckInputs = [

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added it.

@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 367466


x86_64-linux

✅ 1 package built:
  • restate

x86_64-darwin

❌ 1 package failed to build:
  • restate

aarch64-darwin

❌ 1 package failed to build:
  • restate

@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 367466


x86_64-linux

✅ 1 package built:
  • restate

x86_64-darwin

✅ 1 package built:
  • restate

aarch64-darwin

✅ 1 package built:
  • restate

Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

Diff looks good !
Could you please squash your commits so as to leave only two:

  • maintainers: add myypo
  • restate: init at 1.1.6

@myypo myypo force-pushed the init-restate branch 2 times, most recently from 5ea647c to 5bce0ee Compare January 1, 2025 22:14
@GaetanLepage
Copy link
Contributor

In the other order ;)

@myypo
Copy link
Contributor Author

myypo commented Jan 1, 2025

In the other order ;)

Thanks, changed the order. Got a bit confused by the manual on it.

@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 367466


x86_64-linux

✅ 1 package built:
  • restate

x86_64-darwin

✅ 1 package built:
  • restate

aarch64-darwin

✅ 1 package built:
  • restate

Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your patience. Everything looks fine now !

@GaetanLepage GaetanLepage merged commit 30cec14 into NixOS:master Jan 2, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: Restate
4 participants