Skip to content
This repository was archived by the owner on Mar 10, 2023. It is now read-only.

Upgrade derek dependency to 0.10.2 #664

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

Waterdrips
Copy link
Contributor

Signed-off-by: Alistair Hey [email protected]

Description

This version of derek includes an update to remove a soon to be depricated API endpoint on github.
Reference: https://developer.github.com/changes/2020-04-15-replacing-create-installation-access-token-endpoint/

This release will need the following 3 containers bumped:

github-status
git-tar
buildshiprun

note: buildshiprun wasnt using Derek for auth but had it in the Gopkg

How Has This Been Tested?

A new OFC installation was created and the above 3x containers swapped for my own built versions.

A deployment was then completed using a commit from a linked git repository.

How are existing users impacted? What migration steps/scripts do we need?

Github users will need to update these 3x containers in their installations before the endpoint on github is deprecated.

The legacy "Create an installation access token" endpoint will be disabled at the earliest on October 1 2020.

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • read the CONTRIBUTION guide
  • signed-off my commits with git commit -s
  • added unit tests

Copy link
Contributor

@wilsonianb wilsonianb left a comment

Choose a reason for hiding this comment

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

I'm getting the following error in github-status:

Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key

It goes away if I update the call to MakeAccessTokenForInstallation (see below), and I no longer get the email warning about my new GitHub app calling the deprecated endpoint 🎉

@Waterdrips Waterdrips force-pushed the waterdrips-upgrade-derek branch 2 times, most recently from d284fcf to 01fe28c Compare September 17, 2020 07:53
@Waterdrips
Copy link
Contributor Author

Good spots, updated to 10.2. and made changes & fixes based on suggestions, fancy giving this branch a build and try @wilsonianb

@Waterdrips Waterdrips force-pushed the waterdrips-upgrade-derek branch from 01fe28c to ae6ca5c Compare September 17, 2020 09:01
This version of derek includes an update to remove a soon to be
depricated API endpoint on github.
Reference: https://developer.github.com/changes/2020-04-15-replacing-create-installation-access-token-endpoint/

Signed-off-by: Alistair Hey <[email protected]>
@Waterdrips Waterdrips force-pushed the waterdrips-upgrade-derek branch from ae6ca5c to cf722c7 Compare September 17, 2020 11:48
@@ -119,14 +125,31 @@ func getLogs(status *sdk.CommitStatus, event *sdk.Event) (string, error) {
}

func reportToGithub(commitStatus *sdk.CommitStatus, event *sdk.Event) error {
secretKey, err := sdk.ReadSecret(defaultPayloadSecretName)
if err != nil {
log.Printf("reusing provided auth token")
Copy link
Contributor

Choose a reason for hiding this comment

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

seems like this can be removed

Copy link
Contributor

@wilsonianb wilsonianb left a comment

Choose a reason for hiding this comment

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

Tested again and github events including github-status work. 👍

@alexellis
Copy link
Member

@wilsonianb thanks for your input here. PRs are welcome - you seem to have a good handle on how things fit together. Try to keep them short & sweet. Ideally defensible - i.e. changes for a defined purpose.

Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

Approved

@alexellis alexellis merged commit 0d5598d into openfaas:master Sep 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants