0

I have an ADO extension that uses a Java-based API wrapper (Jar file) to call an external API using CLI. This process involves using npm packages and toolrunner (microsoft/azure-pipelines-task-lib). The extension has a feature that accepts Id/Key and uses it to call the external API.

Recently, I made some changes to the Id/Key sharing mechanism with the API wrapper, where I directly assign Id/Key to the variable in the API wrapper instead of directly sending it via CLI. However, some of my existing customers are encountering issues when trying to use the new version of the extension. They have reported that the Id/Key is not properly getting shared.

After many attempts, I observed that the Azure DevOps Agent is causing this issue. It appears that the issue only occurs with YAML pipelines and self-hosted agents, and the root cause is likely an ADO agent-based caching issue.

Here are the pre-conditions that must be met for the issue to occur:

  1. YAML pipeline is used
  2. Self-hosted agent is used
  3. Working Id/Key is configured
  4. Other acceptable inputs are provided

To recreate the issue using a YAML pipeline, follow these steps:

  1. Install the old extension in ADO
  2. Observe that the pipeline runs without any issues
  3. Uninstall the old extension in ADO
  4. Install the new extension
  5. Observe that there is an error while running the pipeline

I conducted additional testing with the same environment configurations:

  1. Keep the same environment configurations as above
  2. Configure a new self-hosted agent
  3. Change the agent to the new self-hosted agent in the YAML pipeline
  4. Run the pipeline and observe that there is no error
  5. Change the agent back to the old self-hosted agent in the YAML pipeline
  6. Run the pipeline and observe that there is an error

Based on the testing, it can be assumed that this is an Azure DevOps agent caching issue. Although the best workaround is to change the customer's agents, I'm not sure if we can request this.

I would appreciate any suggestions for other probable options to fix this issue. I have tried deleting the _work folder and other temp files in the agent machine, but none have worked so far. If there are any file caching these data, please kindly share so we can request our customers to clear those files in their agents.

Lalindu
  • 329
  • 3
  • 17

0 Answers0