Azure / apiops

APIOps applies the concepts of GitOps and DevOps to API deployment. By using practices from these two methodologies, APIOps can enable everyone involved in the lifecycle of API design, development, and deployment with self-service and automated tools to ensure the quality of the specifications and APIs that they’re building.
https://azure.github.io/apiops
MIT License
328 stars 193 forks source link

[BUG] Getting The pipeline is not valid error #665

Closed sandhya-techie closed 2 months ago

sandhya-techie commented 2 months ago

Release version

v6.0.1.1

Describe the bug

I am not able to authorized newly service connection to publisher pipeline. As it got deleted accidently.

I am getting below error.

There was a resource authorization issue: "The pipeline is not valid. Job push_changes_to_Prod_APIM: Step input azureSubscription references service connection which could not be found. The service connection does not exist, has been disabled or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz."

Expected behavior

It should have authorized newly created service connection.

Actual behavior

image

Reproduction Steps

Go to the Service Connections section and create a new service connection Edit the variable group to replace the old service connection name with the new service connection name. Delete old service connection name

github-actions[bot] commented 2 months ago
  Thank you for opening this issue! Please be patient while we will look into it and get back to you as this is an open source project. In the meantime make sure you take a look at the [closed issues](https://github.com/Azure/apiops/issues?q=is%3Aissue+is%3Aclosed) in case your question has already been answered. Don't forget to provide any additional information if needed (e.g. scrubbed logs, detailed feature requests,etc.).
  Whenever it's feasible, please don't hesitate to send a Pull Request (PR) our way. We'd greatly appreciate it, and we'll gladly assess and incorporate your changes.
waelkdouh commented 2 months ago

This is an issue with your own azure devops environment. Nothing related to apiops.

Here is a potential resolution for your error. Again none apiops related. Service connection could not be found: The pipeline is unable to locate the specified service connection.

Possible reasons:

The service connection does not exist: The service connection referenced might not have been created, or the ID/name of the connection is incorrect. The service connection has been disabled: The service connection could have been disabled, either manually or due to expiration of credentials (like expired Azure service principal or expired tokens). The service connection has not been authorized for use: The pipeline may not have the necessary permissions to use the service connection. The project or pipeline might not have been authorized to access the service connection. How to fix it: Check if the service connection exists:

In Azure DevOps, go to Project Settings → Service connections and verify if the service connection specified in the pipeline exists. Verify the service connection’s status:

Make sure the connection is enabled and that any credentials (e.g., Azure service principal) associated with it are still valid. Authorize the service connection for the pipeline:

Ensure the service connection has been properly authorized for use in the project or pipeline. Some service connections require manual authorization for each pipeline. Verify permissions:

Ensure that the account running the pipeline has the necessary permissions to access and use the service connection.