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

How to package/install fed2 plugin on NixOS #1069

Open
ivanbrennan opened this issue Apr 6, 2022 · 3 comments
Open

How to package/install fed2 plugin on NixOS #1069

ivanbrennan opened this issue Apr 6, 2022 · 3 comments
Labels
question ❓ help understanding functionality or implementation triage issues and PRs that need to be triaged

Comments

@ivanbrennan
Copy link

Description

I'd like to use rover on NixOS, which precludes installing via the provided install scripts, so I wrote a Nix package for rover -- NixOS/nixpkgs#164986 -- which works as expected.

However, I can't figure out how to include the fed2 plugin in my Nix package, and attempting to install it imperatively fails:

$ rover install --plugin rover-fed2
rover-fed2 is licensed under the Elastic license, the full text can be found here: https://raw.githubusercontent.com/apollographql/rover/v0.4.8/plugins/rover-fed2/LICENSE
By installing this plugin, you accept the terms and conditions outlined by this license.
Do you accept the terms and conditions of the ELv2 license? [y/N]:
y
error: Could not install rover-fed2

Caused by:
    You cannot install rover-fed2 without first installing rover.

I'm not very familiar with Rust, and was unable to determine why I get the above error, or (more importantly) how to properly include the plugin in my Nix package installation in the first place.

Any help you can provide would be much appreciated.

@ivanbrennan ivanbrennan added question ❓ help understanding functionality or implementation triage issues and PRs that need to be triaged labels Apr 6, 2022
@EverlastingBugstopper
Copy link
Contributor

EverlastingBugstopper commented Apr 7, 2022

Hey @ivanbrennan - we are deprecating the rover-fed2 plugin and I think what we have coming up (currently available as a release candidate) might just fix this for you?

For some background, rover-fed2 was released as part of "Federation 2 Preview" of what we will be making generally available in the coming weeks. We've made some significant changes to how the plugin works, and Rover's new install script should handle installing the plugin automatically for you. I have not tested this on NixOS, but I have tested it on Centos 7, Windows, WSL, and MacOS. Unfortunately you cannot use rover supergraph compose with alpine/musl because reasons). I would love your help testing out our release candidate to see if the changes we made have any impact on the error message you get here (or if it just works out of the box! I hope it does!)

Once you download the binary from our release assets, you can run rover install --plugin supergraph-0 && rover intall--plugin supergraph-2. this will download both federation 1 and federation 2 plugins. If you skip this step, that's not a problem either. The first time someone runs rover supergraph compose, we'll automatically download the appropriate plugin (depending on what they set federation_version to in supergraph.yaml). It's up to you how you want to implement it, our curl | sh installer downloads the plugins on first installation but it wouldn't necessarily have to be that way.

Also you may notice the prompt to accept the Elv2 license. it can get annoying to have to accept it so many times, so we have plans to store your answer in config that should be landing soon. until then you can just set the environment variable (on your local machine, not in the package itself please) APOLLO_ELV2_LICENSE=accept

edit: please let me know if you run into any other issues, thanks for taking the time to open an issue here 😄

@EverlastingBugstopper
Copy link
Contributor

We've since released v0.5.1 of Rover that should be much easier to integrate. I have a docs PR that is in review stage right now that may be helpful to you. I'll post again here when those docs go live. #1087

@EverlastingBugstopper
Copy link
Contributor

cc @aaronArinder since we discussed this recently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question ❓ help understanding functionality or implementation triage issues and PRs that need to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants