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

use upstream hubcaps #624

Merged
merged 2 commits into from
Dec 3, 2022
Merged

use upstream hubcaps #624

merged 2 commits into from
Dec 3, 2022

Conversation

Artturin
Copy link
Member

@Artturin Artturin commented Nov 15, 2022

ran cargo fmt on rustfmt 1.5.1
fixed clippy warnings

fixes #595

Comment on lines +17 to +20
# hyper = { version = "0.14", features = ["full"] }
hyper = "=0.10.*"
hyper-native-tls = "0.3.0"
# maybe can be removed when hyper is updated
http = "0.2"
Copy link
Member Author

Choose a reason for hiding this comment

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

will take a shot at updating hyper too but in a separate PR

Copy link
Member Author

Choose a reason for hiding this comment

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

the release that caused large incompatibilities was hyper 0.11, couldn't figure out a way to update hyper

ofborg/src/config.rs Outdated Show resolved Hide resolved
Credentials::Token(self.github.clone().unwrap().token),
)
.unwrap()
Copy link
Member

Choose a reason for hiding this comment

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

I'd also really like to see less unwraps (even though I introduced most of these in my quick-n-dirty attempt).

@Artturin
Copy link
Member Author

Reminder @cole-h

@@ -186,10 +183,11 @@ impl GithubAppVendingMachine {
}

fn jwt(&self) -> JWTCredentials {
JWTCredentials::new(self.conf.app_id, self.conf.private_key.clone())
let key = std::fs::read(self.conf.private_key.clone()).expect("Unable to read private_key");
JWTCredentials::new(self.conf.app_id, key).expect("Unable to create JWTCredentials")
Copy link
Member

Choose a reason for hiding this comment

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

Looks like the upstream expects this to be DER (the raw bytes), whereas we used to use PEM (base64-encoded). Required a small change to the ofborg infra, but otherwise works.

Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

OK, let's see how this goes.

@cole-h cole-h merged commit 14015d0 into NixOS:released Dec 3, 2022
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.

switch hubcap away from fork
2 participants