apiops icon indicating copy to clipboard operation
apiops copied to clipboard

[BUG]Extractor pipeline getting failed at Fetch Extractor step when trying to extract definition for single API after adding tokenization to change API name in different environment

Open v-dast opened this issue 1 year ago • 4 comments

Release version

APIOps toolkits for Azure APIM v6.0.1.1

Describe the bug

##[error]PowerShell exited with code '1'. ##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;correlationId=d02035b8-3f57-49b2-b89f-6c13ad30cdcd;]PowerShell exited with code '1'. ##[debug]Processed: ##vso[task.complete result=Failed;]PowerShell exited with code '1'. ##[debug]task result: Failed ##[error]PowerShell wrote one or more lines to the standard error stream. ##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;correlationId=d02035b8-3f57-49b2-b89f-6c13ad30cdcd;]PowerShell wrote one or more lines to the standard error stream. ##[debug]Processed: ##vso[task.complete result=Failed;]PowerShell wrote one or more lines to the standard error stream. ##[error]InvalidOperation: /home/vsts/work/temp/e9b276f0-a9d8-4f16-946d-b3477352ff95.ps1:24 Line | 24 | … om/Azure/apiops/releases/download/v6.0.1.1/$releaseFileName_;!!Afohz … | ~~~~~~~~~~~~~~~~~~ | The variable '$releaseFileName__' cannot be retrieved because it has not | been set.

##[debug]Processed: ##vso[task.issue type=error;source=CustomerScript;correlationId=d02035b8-3f57-49b2-b89f-6c13ad30cdcd;]InvalidOperation: /home/vsts/work/temp/e9b276f0-a9d8-4f16-946d-b3477352ff95.ps1:24 Line | 24 | … om/Azure/apiops/releases/download/v6.0.1.1/$releaseFileName_;!!Afohz … | ~~~~~~~~~~~~~~~~~~ | The variable '$releaseFileName__' cannot be retrieved because it has not | been set.

Expected behavior

It should be extracted in a separate folder

Actual behavior

at Fetch Extractor step it is getting failed and not extracting the definition also need to know steps for publishing specific APIs or new APIs only, rather than all APIs in the Azure DevOps Repos.

Reproduction Steps

run-publisher.yaml.txt run-publisher-with-env.yaml.txt run-extractor.yaml.txt

v-dast avatar Dec 16 '24 11:12 v-dast

  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.

github-actions[bot] avatar Dec 16 '24 11:12 github-actions[bot]

Need help with extracting a single API and Publishing that single API only to higher environment instead of all APIs in azure DevOps repos

v-dast avatar Dec 16 '24 11:12 v-dast

@v-dast The error is indicating that the variable $releaseFileName is not being set. Normally it is set right before the "Downloading release" step:

  Write-Information "Setting name variables..."
  $releaseFileName = "extractor-linux-x64.zip"
  $executableFileName = "extractor"

  if ("$(Agent.OS)" -like "*win*") {
    $releaseFileName = "extractor-win-x64.zip"
    $executableFileName = "extractor.exe"
  }
  elseif ("$(Agent.OS)" -like "*mac*" -and "$(Agent.OSArchitecture)" -like "*arm*") {
    $releaseFileName = "extractor-osx-arm64.zip"
  }
  elseif ("$(Agent.OS)" -like "*mac*" -and "$(Agent.OSArchitecture)" -like "*x86_64*") {
    $releaseFileName = "extractor-osx-x64.zip"
  }

Write-Information "Downloading release..."
$uri = "https://github.com/Azure/apiops/releases/download/v6.0.1.1/$releaseFileName"

Check to make sure the variable $releaseFileName has been properly set by adding a logging to the script.

JamesProant avatar Feb 05 '25 10:02 JamesProant

Need help with extracting a single API and Publishing that single API only to higher environment instead of all APIs in azure DevOps repos

This is a different issue. Please create another issue if you still need support.

JamesProant avatar Feb 05 '25 10:02 JamesProant