Diff Tool should ignore positional changes in enums

Aperta
#10 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
tooling

Direzione di ricerca

Start with the DOM serialization in Kiota’s PublicAPIExportService.cs around line 80, which the issue identifies as including enum member positions, then trace how the diff tool uses that output for breaking change detection. Check the related Graph PR and metadata change linked in the issue for context. Done means positional enum insertions no longer produce breaking change detections when enum values are unset.

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

Descrizione

Related to changes in https://github.com/microsoftgraph/msgraph-sdk-dotnet/pull/2826

The tool does detect the change in order of the enums where the timeCard member is inserted into the enum at position 8.

Removal of Microsoft.Graph.Models.workforceIntegrationSupportedEntities has an enum member timeOffReason with order 8
Removal of Microsoft.Graph.Models.workforceIntegrationSupportedEntities has an enum member timeOff with order 9
Removal of Microsoft.Graph.Models.workforceIntegrationSupportedEntities has an enum member timeOffRequest with order 10
Addition of Microsoft.Graph.Models.workforceIntegrationSupportedEntities has an enum member timeCard with order 8
Addition of Microsoft.Graph.Models.workforceIntegrationSupportedEntities has an enum member timeOffReason with order 9
Addition of Microsoft.Graph.Models.workforceIntegrationSupportedEntities has an enum member timeOff with order 10
Addition of Microsoft.Graph.Models.workforceIntegrationSupportedEntities has an enum member timeOffRequest with order 11

However, from metadata change at https://github.com/microsoftgraph/msgraph-metadata/pull/760/files#diff-eb3d3e370adab9ae29d645852adb1ce71b9206412f026061d55bd4b4b3776d48 the insertion isn't really breaking given that the value members was not set.

Image

We should probably investigate ignoring insertions (the positional order) of enum members in breaking change detections for graph because the members end up being serialized as strings as from the SDK perspective, the change in position is really to be determined by the API.

This would involve changing the serialization of the dom to no longer have the positional parameter as seen here https://github.com/microsoft/kiota/blob/c35b901a90fbd6e19a6790d7fea8ef1ab14a5a35/src/Kiota.Builder/Export/PublicAPIExportService.cs#L80

Lingua principale
C#
Stelle
0
Fork
4
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoftgraph/kiota-dom-export-diff-tool

Tutte le issue di microsoftgraph/kiota-dom-export-diff-tool

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.