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 Report: Azure build definition fails when multiple builds are in the annotation #581

Closed
2 tasks done
slobodnic opened this issue Jun 28, 2024 · 5 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@slobodnic
Copy link

📜 Description

When specifying multiple build definitions with the dev.azure.com/build-definition, I'm getting and error message:

Error
400: InputError

Message
Invalid entityRef, not a string

👍 Expected behavior

According to the documentation, the plugin supports multiple build definitions separated by comma. I would expect the plugin to retrieve the builds for all the definitions.

👎 Actual Behavior with Screenshots

Returns an error 400 on the second build definition. The first build definition is retrieved correctly, but it looks like on the request for the second build definition, the entityRef is duplicated:

http://localhost:7007/api/azure-devops/builds/{Org}?definitionName={build-definition}&top=25&entityRef=component%3Adefault%2F{component-name}&entityRef=component%3Adefault%2F{component-name}

👟 Reproduction steps

On cataolg-info.yaml add

dev.azure.com/build-definition: build-definition1,build-definition2.
Navigate to the CI/CD tab for the given component

📃 Provide the context for the Bug.

No response

🖥️ Your Environment

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

@slobodnic slobodnic added the bug Something isn't working label Jun 28, 2024
@awanlin
Copy link
Contributor

awanlin commented Jun 28, 2024

The Azure DevOps plugin has been moved to the Community Plugins repo, I'll move this issue there. 👍

@awanlin awanlin transferred this issue from backstage/backstage Jun 28, 2024
@awanlin
Copy link
Contributor

awanlin commented Jun 28, 2024

Alright, now that we have this in the right place I wanted to follow up that this has been fixed by #564 and is just pending release. Plan to do that soon, by the end of next week ideally.

@awanlin
Copy link
Contributor

awanlin commented Jun 28, 2024

I am curious, you found the documentation about this plugin in the Community Plugins repo but you logged the Issue in the main Backstage repo, why did you do that? I'm wondering if maybe we need to update our docs somewhere 🤔

@slobodnic
Copy link
Author

I was looking at the code in https://github.com/backstage/backstage/blob/dbde3fa79fdc7bd57ee456c222b320ee39d871b0/plugins/azure-devops/src/api/AzureDevOpsClient.ts to try to understand where the bug is. This was a miss on my side.

@awanlin
Copy link
Contributor

awanlin commented Jun 28, 2024

No worries, I hadn't considered that you might have looked up the historical code from when it was in the main repo 👍

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

2 participants