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

🐛 azure-devops: Error while using EntityAzurePipelinesContent outside Entity page #2972

Open
2 tasks done
c4rth opened this issue Feb 23, 2025 · 2 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@c4rth
Copy link

c4rth commented Feb 23, 2025

Workspace

azure-devops

📜 Description

I'm trying to use the EntityAzurePipelinesContent in a custom component.
An error is thrown (see screenshots):
Cannot route to routeRef{type=absolute,id=azure-pipelines-entity-content} with parent routeRef{type=absolute,id=catalog:entity} as it has parameters

👍 Expected behavior

Show the Azure DevOps pipelines list.

👎 Actual Behavior with Screenshots

Image

console:
Image

👟 Reproduction steps

Custom component using EntityAzurePipelinesContent:

<EntityProvider entity={serviceEntity}>
  <TabbedLayout>
    {isAzureDevOpsAvailable(serviceEntity) || isAzurePipelinesAvailable(serviceEntity) ?
      <TabbedLayout.Route path="/ci-cd" title="CI/CD">
        <EntityAzurePipelinesContent />
      </TabbedLayout.Route>
      : null
    }
  </TabbedLayout>
</EntityProvider>

📃 Provide the context for the Bug.

If I add a new component in the azure-devops plugin (with createComponentExtension) using the same EntityPageAzurePipelines component, and using it in my component, it works.

export const EntityAzurePipelinesCard = azureDevOpsPlugin.provide(
  createComponentExtension({
    name: 'EntityAzurePipelinesCard',
    component: {
      lazy: () => import('./components/EntityPageAzurePipelines').then(m => m.EntityPageAzurePipelines),
    },
  }),
);

Moreover if I use this EntityAzurePipelinesCard in the EntityPage, it also works.

👀 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?

No, but I'm happy to collaborate on a PR with someone else

@c4rth c4rth added the bug Something isn't working label Feb 23, 2025
@awanlin
Copy link
Contributor

awanlin commented Feb 23, 2025

Hi @c4rth, this isn't an intended use case. What's you end goal? Why are you wanting to use it this way?

@c4rth
Copy link
Author

c4rth commented Feb 23, 2025

Hi @awanlin
As Backstage doesn't manage versioning of components (services, API, ...), I created components to manage it for my specific use case (adding custom annotations, frontend and backend plugin, ...).
The custom components are for system, API and service.
For a versioned service, I would like to show Azure DevOps pipelines related to a versioned service that is a standard entity but shown in my custom component, so not using the default Entity page .
Here are some screenshots:

Image Image Image

So my goal was to reuse the azure-devops plugin to show the Azure Devops Pipelines, and potentially the other Azure DevOps items (like PR), without 'hacking' them in a copy of the frontend plugin.

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