Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Extractor pipeline still extracts unnecessary version sets instead of extracting only version set of API being extracted #626

Closed
JamesProant opened this issue Aug 12, 2024 · 6 comments

Comments

@JamesProant
Copy link

Release version

6.0.1

Describe the bug

When using extractor pipeline, all version sets are being extracted from all of our API's in the APIM instance, instead of only the version set of the specific API being extracted.
Feature req-(#529 (comment)) was declared as solved, but same behavior is happening.

Expected behavior

Only version set of API being extracted should be added to artifacts.

Actual behavior

Every version set from our APIM instance is being extracted and added to artifacts.

Reproduction Steps

Run extractor pipeline for API-A.
New branch with artifacts contains every version set for every API in APIM instance.

Copy link

  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.

@guythetechie
Copy link
Contributor

We don't limit version sets by API because they can exist independently. A version set can have no API, one API, or multiple APIs.

To only extract specific version sets, update your configuration.extractor.yaml like this:

versionSetNames
- version-set-to-extract

@JamesProant
Copy link
Author

Hello @guythetechie

Thank you for your quick reply.

I have tried adding that parameter to the configuration.extractor.yaml file, but it seems to not work properly. In fact whenever I add the parameter "versionSetNames" to the config file, the extractor no longer extracts any api artifacts at all.

Any idea why this behaviour is happening?

@guythetechie
Copy link
Contributor

Sure.

If you put version set names under versionSetNames, we will only extract those version sets. We will also filter APIs and only extract APIs associated with those version sets.

Make sure that the names under versionSetNames match the version set names/IDs, not their display names. Easy way to see the correct names is to remove the version set filter in configuration.extractor.yaml, extract everything, and then look at the folder names in /artifacts/version sets/.

@guythetechie
Copy link
Contributor

To expand on the API/version set filter relationship, we filter APIs like this:

  • Is there an apiNames filter in configuration? If yes, get those APIs; if not, get all APIs.
  • For each API, check whether it has a version set.
    • If it has no version set, extract it
    • If it has a version set, check whether there is a versionSetNames filter in configuration
      • If there is no filter, extract the API
      • If there is a filter, only extract the API if its version set is in the versionSetNames filter.

@ash9368
Copy link

ash9368 commented Oct 29, 2024

only change i have to do in the configuration.extractor.yaml file to extract the API version or is there anything also i have to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants