Azure / Azure/apiops

[Question] How to not include "Managed" gateway by default when publishing APIs

Aperta
#501 15 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement question
Lingua principale
C#
Stelle
448
Fork
247
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Release version

v5.1.1

### Question Details

Our APIM solely uses self-hosted gateways and thus does not require every API to be assigned to the "Managed" gateway.
However, even though the API is only assigned to a specific self-hosted gateway, the "Managed" gateway is still getting assigned to it.

I added a "Managed" gateway into the `gateways` directory and set the APIs to an empty array.
However, this only works when not using the commit id during publishing, as the Managed gateway file is not changed when I add a new API.

How is this supposed to be handled?

### Expected behavior

"Managed" gateway is not assigned whenever I assign it to some custom gateways.

### Actual behavior

"Managed" gateway is always assigned to new APIs.

### Reproduction Steps

Create a fresh API and assign it to a custom gateway (not the "Managed" one)

Folder structure:
![image](https://github.com/Azure/apiops/assets/5477981/1ddd911f-3f70-4ce3-b516-3c573d7bd840)

Content of `gateways/self-hosted/apis.json`
```
[
{
"name": "my-new-api"
}
]
```

Content of `gateways/Managed/apis.json`
```
[]
```

Since the `gateways/Managed/apis.json` has not been touched/changed during the commit, the publisher does not update the Managed gateway assignment, so the new API is actually having both the "Managed" and "self-hosted" gateways assigned to it.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da gateways/self-hosted/apis.json e gateways/Managed/apis.json, quindi traccia il comportamento del publisher durante la pubblicazione con un ID di commit. Riproduci l’assegnazione usando una nuova API e un gateway personalizzato. Il lavoro è completato quando un’API appena assegnata non viene assegnata anche a Managed se il relativo file del gateway Managed non è cambiato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure
Ambito
api, cloud
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.