-
Notifications
You must be signed in to change notification settings - Fork 6
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
AuditLogQueries Unknown AuditLogRecordType #410
Comments
Out of curiosity @L4r1k, does the error block/prevent the parsing of the entire response? |
@andrueastman yes, it's by design. |
@baywet The behavior seems inconsistent with that of other languages. (Looks to be highlighted at microsoft/kiota-dotnet#277). |
I'm fine either way, we've received feedback from some people that they prefer a hard failure rather than a silent one. |
I would agree with fail first rather than serializing it to a nil. Of concern, it will be almost impossible for developers to know if the enum value was not set i.e this is a null value from the server, or if its a serialization error that was ignored. |
I'm unfortunately biased to the setting the value to nil in this scenario and not totally failing here. From a graph perspective, I don't think we want the state of things to be "the API was updated, so your code will break till the metadata is updated" but rather "the API was updated, so you won't access the new member till the metadata is updated". I think at a certain state/version of the package/library, only certain members of the enum exist from the client's perspective, so the returning of new value defaulting to nil could arguably be saying "nothing you expected came back. Update if you want to receive something new". This is not the same as defaulting to a certain member in the enumeration (e.g. the first value) which would be misleading as nil is not really a member in enumeration. If strictness is what we're going for, nil really shouldn't be an option really. |
I think we could shoehorn that change on the parsing side without causing a breaking change since: |
I would also make the argument that just dropping the entirety of the data on that iteration is not what we should be doing. Particular when it comes to forensics, dropping data is just unacceptable. I've had to spend months making painstaking workarounds for error handling, picking up iteration after the failure, etc. and have had to submit a number of tickets where the metadata has drifted from the SDK and caused this issue. ( I actually just ran into another over the weekend I need to post ). I would much rather we fill the new field with |
To add to the above: It's so severe I'm seriously considering pivoting away from the SDK and just coding up the raw queries myself (something I'd really rather not do as I do want to support the SDK) |
We'll keep this issue open for the purposes of tracking the metadata issue here.
Created microsoft/kiota#4621 for the generation change described here. |
Any update on the ICM for this one @baywet ? Thanks! |
They mentioned they are working on a fix as we speak. |
Any chance it'll be in the next build? 🤞 |
A pull request is awaiting review and merge on the schema side. Unlikely the fix will be in this week on the SDKs side. |
Update: the service team has made the metadata change about 10 days ago. We're waiting for the central service team to roll out the deployment. |
Update: the deployment was never completed for some reason, I have opened another ICM on the service team to understand what's going on. |
update: the deployment has resumed and the metadata should be updated next week |
Hi @baywet,
Sorry to report again, but having another similar metadata issue to #391 and microsoftgraph/msgraph-sdk-go#617 where I'm getting the following error when retrieving audit log query records from the new beta endpoint https://learn.microsoft.com/en-us/graph/api/security-auditlogquery-list-records?view=graph-rest-beta&tabs=http .
Unknown AuditLogRecordType value: CopilotInteraction
Occurs when the following value appears in the
auditLogRecordType
field for an audit log query record returned by the API:The text was updated successfully, but these errors were encountered: