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

[Bug][Github] In version 0.21.0 github app payload adds empty token on subsequent tries and fails to load private key #7425

Closed
2 of 3 tasks
tcvall86 opened this issue May 6, 2024 · 1 comment
Labels
type/bug This issue is a bug

Comments

@tcvall86
Copy link

tcvall86 commented May 6, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

When adding a connection to Github Cloud using Github App - test and connection works.
image

{
    "success": true,
    "message": "success",
    "causes": null,
    "data": null,
    "login": "myapp-devlake",
    "warning": false,
    "installations": [
        {
            "id": <redacted>,
            "account": {
                "login": "myorg"
            }
        }
    ]
}

However in subsequent tests we get

{
    "success": false,
    "message": "invalid private key (400)\nWraps: (2) invalid key: Key must be a PEM encoded PKCS1 or PKCS8 key\nError types: (1) *hintdetail.withDetail (2) *errors.errorString",
    "causes": null,
    "data": null
}

Re-editing the connection also shows private key and id as invalid, even though just re-pasting the key works
It seems like something get's messed up when the key is saved. It also adds an additional token field to the request if that makes any difference.

image

In 0.18.0 we could add this app successfully but we had to manually search for repos. We are hoping this version would solve that.

Trying to add data scopes generates

TypeError: (n ?? []).map is not a function

But since the test is failing previously I think that is expected

What do you expect to happen

We should be able to reliably save the connection for the Github App in version 0.21

How to reproduce

Add a github app with required scopes https://devlake.apache.org/docs/v0.18/Configuration/GitHub/#github-apps and then try to add app as connection. After saved, re-test and it fails.

Anything else

All the time as far as we can tell

Version

v0.21.0

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@tcvall86 tcvall86 added the type/bug This issue is a bug label May 6, 2024
@tcvall86 tcvall86 changed the title [Bug][Github] In version 0.21.0 github app payload adds empty token on subsequent tries [Bug][Github] In version 0.21.0 github app payload adds empty token on subsequent tries and fails to load private key May 6, 2024
@tcvall86
Copy link
Author

tcvall86 commented May 6, 2024

Nvm it was the config-ui update that took sometime to load. It works now

@tcvall86 tcvall86 closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug This issue is a bug
Projects
None yet
Development

No branches or pull requests

1 participant