Azure / Azure/apiops

Running publisher with an API that has a VersionSet fails on an 'empty' APIM instance

Open
#641 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
448
Forks
247
PR merge metrics
No merged PRs in 30d

Description

### Release version

v6.0.1.1

### Describe the bug

When I run the publisher to upload all of my artifacts (one of the apis contains a versionSet into a 'clean' apim instance I get the following error stating that the ApiVersionSet not found.

```bash
System.Net.Http.HttpRequestException: HTTP request to URI failed with status code 404. Content is '{"error":{"code":"ResourceNotFound","message":"ApiVersionSet not found.","details":null}}'
```

### Expected behavior

Publisher would create the API with multiple versions correctly into APIM.

### Actual behavior

Error occurs trying to find the versionSet that is stored in the `apiinformation.json` file. Since it's an empty APIM instance it won't find the versionSet.

### Reproduction Steps

- Create an api that has multiple versions
- Extract that api into your git repo
- Run the publisher on a new APIM instance

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the publisher run against an empty Azure API Management instance, then trace the versionSet lookup using the apiinformation.json data. Check where the publisher handles a missing ApiVersionSet before creating versioned APIs. Done means publishing an API with multiple versions succeeds without the 404 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.