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

Fails if using the new Azure Pipelines based connection endpoint #29

Open
clairernovotny opened this issue Sep 10, 2018 · 13 comments
Open
Labels
bug 🐛 Something isn't working

Comments

@clairernovotny
Copy link

clairernovotny commented Sep 10, 2018

Bug Report

Azure DevOps has a new way of creating service endpoints - the Azure Pipelines app from the GitHub marketplace. When using that endpoint with the task, I get the following error. I suspect it needs to check for a different field for the access token/PAT?


2018-09-10T19:13:39.7462851Z ##[error]An error occured, log returned: 
An error occured, log returned: 
Error: missing required options: token
2018-09-10T19:13:39.7474073Z Finish draft release

To repro:

Go the GitHub marketplace and look for the Azure Pipelines app under the CI category. Follow the wizard to connect it to your VSTS account/project. It creates a new service endpoint with the GitHub org name.

Use that endpoint in a build/release pipeline with this task.

Before opening an issue please read this.

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error
MANDATORY FOR BUGS: Insert debug trace

In order to allow us to quickly reproduce you issue please include a link to a reproduction repository.

Expected behavior

A clear and concise description of what you expected to happen..

Enviroment

  • Service: [e.g. VSTS, TFS]
  • Agent: [e.g. Hosted, Custom]
  • OS: [e.g. OSX 10.13.4, Windows 10]
  • Node/npm version: [e.g. Node 8/npm 5]

Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.

@clairernovotny clairernovotny changed the title Fails if using ther new Azure Pipelines based connection endpoint Fails if using the new Azure Pipelines based connection endpoint Sep 10, 2018
@marceloavf marceloavf added the bug 🐛 Something isn't working label Sep 10, 2018
@marceloavf
Copy link
Owner

Hey @onovotny, thanks for the issue feedback!

I'll create some example to debug here and see if I can find any documentation for this new App.

As I can see they launched it today, If you have any docs information or something that can help I would be very grateful.

Thank you!

@clairernovotny
Copy link
Author

Working on getting docs on what needs to change to support that.

@marceloavf
Copy link
Owner

marceloavf commented Sep 11, 2018

We need to get the schema name for this endpoint, so I can integrate it properly, debugging it showing this should return where is it and fix the problem.

/**
* Get specific token, either OAuth or Personal Access Token
* WARNING: AccessToken first letter change depending on scheme
*/
if (githubEndpointObject.scheme === 'PersonalAccessToken') {
githubEndpointToken = githubEndpointObject.parameters.accessToken
} else {
// scheme: 'OAuth'
githubEndpointToken = githubEndpointObject.parameters.AccessToken
}

@marceloavf
Copy link
Owner

marceloavf commented Sep 13, 2018

Azure Pipelines connection uses a new pattern:

{ 
 parameters: {
    IdToken: '***',
    Signature: '***'
   },
  scheme: 'Token'
}

Tested with both IdToken and Signature but neither correspond correctly, returning Bad credentials from GitHub connection. 😢

@clairernovotny
Copy link
Author

I think it needs backend work so the Pipelines app can use its secret to return an access token.

@johanneskares
Copy link

Hey, thanks for looking into it, having the same problem!

@yacaovsnc
Copy link

Thanks for identifying this issue. We will take a look at the backend and see how to best address this. @marceloavf has already identified the issue, for GitHub App, we must dynamically create an Installation Token from the IdToken before we pass it down.

@yacaovsnc
Copy link

@onovotny @johanneskares Do you use this task in Build or Release pipeline? I have made the necessary change in Build pipeline. However it looks the Release pipeline change is more involved, and may require a bit more time.

@clairernovotny
Copy link
Author

clairernovotny commented Sep 19, 2018

I always use it in Release, since it's part of a deployment step for me -- "Prod Stage creates release in GitHub"

@johanneskares
Copy link

@yacaovsnc Thanks for update. Also using it in a Release pipeline.

@yacaovsnc
Copy link

Another quick update, sorry still don't have resolution. It's touching some core areas and we want to find the best way to address this. This is actively being designed and worked on. Really appreciate your patience.

@marceloavf marceloavf added the waiting ⏲️ Waiting some third-party information label Dec 11, 2018
@marceloavf marceloavf removed the waiting ⏲️ Waiting some third-party information label Jun 3, 2019
@azlam-abdulsalam
Copy link

@yacaovsnc Any updates on this?

@ericoporto
Copy link

Hey, I am getting errors on this. It used to work, but I haven't figured yet what's wrong with my pipelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants