apiops icon indicating copy to clipboard operation
apiops copied to clipboard

[BUG] APINames are not extracted

Open jhuchler-iamds opened this issue 9 months ago • 2 comments

Release version

v6.0.1.4

Describe the bug

The API is displayed in the log (trace) but is not written to a file. Everything else is extracted correctly.

Strangely, it works with the following configuration, but i don't need extractAll.

JSON is displayed there.

Expected behavior

Extract API with apiNames: value

Actual behavior

Extract api with apiNames value not possible

Reproduction Steps

workspaceNames:
- ignore

apiNames:
- myAPIName

backendNames:
- myBackendName

diagnosticNames:
#- ignore

loggerNames:
#- ignore

namedValueNames:
#- ignore

productNames:
#- ignore

subscriptionNames:
- mySubscriptionName

tagNames:
#- ignore

policyFragmentNames:
#- ignore

versionSetNames:
#- ignore

Debug Trace ends like this:

info: extractor[0]
      Writing API operation policy file /home/vsts/work/1/artifacts-from-portal/sharedproducts/apim/apimArtifacts/apis/myAPIName/operations/post-action/policy.xml...
dbug: Microsoft.FeatureManagement.FeatureManager[0]

This configuration doesn't extract apiNames:

workspaceNames:
- ignore

apiNames:
- myAPIName

backendNames:
- myBackendName

diagnosticNames:
- ignore

loggerNames:
- ignore

namedValueNames:
- myNamedValues

productNames:
- rfmint

subscriptionNames:
- mySubscriptionName

tagNames:
- ignore

policyFragmentNames:
- ignore

versionSetNames:
- ignore

Debug Trace ends like this:

dbug: Microsoft.FeatureManagement.FeatureManager[0]
      The feature definition for the feature 'Workspaces' was not found.
info: extractor[0]

The write is simply missing here, although the API or the content for the

jhuchler-iamds avatar Mar 18 '25 14:03 jhuchler-iamds

  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 Mar 18 '25 14:03 github-actions[bot]

@jhuchler-iamds just found the same thing. Removing the versionSetNames from the extractor config solves this issue or actually adding a valid version set to extract.
As a workaround for now..

kimlood avatar Mar 18 '25 19:03 kimlood