apiops icon indicating copy to clipboard operation
apiops copied to clipboard

What is the keyword so extractor doesnt extract policy fragment and version sets?

Open martin2176 opened this issue 1 year ago • 6 comments

Release version

6.0.1.3

Question Details

I have the below in configuration.extractor.yaml. However it is still extracting globalpolicy fragment and apiVersionSetsNames Q1. What is the correct keyword to use so that it doesn't extract globalpolicy fragment and versionsets? Q2. Can the documentation on wiki be updated to reflect all the supported resources and the correct keyword to use etc?

Image

Expected behavior

the extractor should skip over global policy fragments and apiversionsets

Actual behavior

the extractor is pulling down global policy fragments and apiversionsets

Reproduction Steps

use the attached configuration.extractor.yaml apiNames:

  • test backendNames:
  • none diagnosticNames:
  • none loggerNames:
  • none namedValueNames:
  • none productNames:
  • none subscriptionNames:
  • none tagNames:
  • none policyFragmentNames:
  • none apiVersionSetsNames:
  • none groupNames:
  • none

martin2176 avatar Oct 12 '24 18:10 martin2176

  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 Oct 12 '24 18:10 github-actions[bot]

@waelkdouh I think this is a bug than a new feature. The documentation says it should be possible to exclude globalpolicyfragments and version sets, however it is not excluding it.

martin2176 avatar Oct 30 '24 14:10 martin2176

@martin2176 - looking at the code, I don't see a filter for global policy. Can you point to the documentation where it says you can filter out global policy?

As for version sets, it should be versionSetNames in configuration.extractor.yaml.

guythetechie avatar Nov 01 '24 16:11 guythetechie

@guythetechie You are right. I dont see a filter for global policy in Doc. So that would be a feature request. However, I added versionSetNames: [none] as below. And ran an extract specifying configuration.extractor.yaml. But, it is still extracting versionsets (pls see attached pic of the folder structures of the artifacts extracted) PS: The only api I am extracting - api "test" doesnt have any version sets.

Image

Image

martin2176 avatar Nov 01 '24 17:11 martin2176

@martin2176 please try the following with version v6.0.1.3

versionSetNames: [ignore]

Works like a charm for me.

rubenaster avatar Nov 18 '24 17:11 rubenaster

@martin2176 please try the following with version v6.0.1.3

versionSetNames: [ignore]

Works like a charm for me.

Thanks . that worked and it excluded versionsets.

martin2176 avatar Nov 18 '24 18:11 martin2176