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

Duplicate operation Ids (Currently blocking Microsoft Graph SDK PowerShell releases) #604

Closed
timayabi2020 opened this issue Nov 13, 2024 · 3 comments
Labels
powershell Issues affecting Graph Powershell SDK

Comments

@timayabi2020
Copy link
Contributor

Running the weekly open Api refresh pipeline updates the sliced Open Api files in PowerShell with duplicate operation Ids causing AutoREST build failures.

This is an example of a call made to DevX API to slice the larger Open API file to small files based on tags passed to the service.
https://devxapi-func-prod-eastus.azurewebsites.net/$openapi?tags=^users.calendar$&title=Calendar&openapiversion=3&style=Powershell&fileName=powershell_v2&graphVersion=v1.0&singularizeOperationIds=true
If you execute a GET request and search for user.calendar.calendarView.instance_ListExtension, you will see that the operation Id has been assigned to two different paths.

Image

Attached is a file showing all the duplicated operation Ids for v1.0 paths.
duplicateOperationIds.csv

@timayabi2020 timayabi2020 added the powershell Issues affecting Graph Powershell SDK label Nov 13, 2024
@irvinesunday
Copy link
Contributor

irvinesunday commented Nov 15, 2024

From the latest powershell_v2 file in the metadata I'm only seeing one instance of the operation id for the respective paths:

Image
users.calendars.calendarView.instances.ListExtensions

and

Image
users.calendar.calendarView.instances.ListExtensions

It could be possible that this specific DevX API endpoint might be pointing to stale data: https://devxapi-func-prod-eastus.azurewebsites.net/

@timayabi2020
Copy link
Contributor Author

When the refresh runs, there is a ForceRefresh query parameter passed to DevX and my expectation is that no stale data will be downloaded. Is there something else that needs to be done to ensure freshness of data?

@andrueastman
Copy link
Member

@timayabi2020 @irvinesunday @Ndiritu

To summarize our earlier discussion, the conversion library is not to blame for the duplicate operation ids in the document.
This is also validated at PR level in the metadata repo using the check added at the link below.
https://github.com/microsoftgraph/msgraph-metadata/blob/350c13155dbf986baee9b9664357e343a4059abf/.github/workflows/openapi-parser-validation.yml#L41

The issue causing the duplicate Id is the singularization logic in devX api which we discovered due to updated groupings of paths( paths for functions/actions moved to other files making the bug apparent) due to the issue at #605.

For now we can close this specific issue(regarding duplicate operation ids) as it is not an issue with the library and follow it up on devXApi via microsoftgraph/microsoft-graph-devx-api#2255

I'll also provide more details on the tags grouping issue at #605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
powershell Issues affecting Graph Powershell SDK
Projects
None yet
Development

No branches or pull requests

3 participants