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

oData filter In not working #2779

Open
miguelautoentry opened this issue Dec 16, 2024 · 6 comments
Open

oData filter In not working #2779

miguelautoentry opened this issue Dec 16, 2024 · 6 comments
Labels
Question: API Status: No recent activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:bug A broken experience

Comments

@miguelautoentry
Copy link

Describe the bug

We have integration tests that started to fail at least between the last successful build 15 Dec 24 20:51 UTC and the first failed build 16 Dec 24 04:15
The test adds 5 files per thread concurrently and then filters the files with a query like "(CreatedDateTime le 2024-12-16T11:24:32Z and Id in ('01WCQGNM66BSFNDZMK5JH3A3DN64PY6ZR5','01WCQGNM2REEZ4ZMMUSNGLVQT5YL2SXZSE','01WCQGNM3ML2GFF6OTVFBILBJQRWOJNWYK','01WCQGNMY4LZ6RNUK3XRGYZYBERUD3TAQV','01WCQGNM2M6MRRINBMIVAYKXWQHVEWASEQ'))" the result is bringing the requested files and other files with different ids other than the ids requested, I tried using In.. Name with the same results. This is a regression on the service

Expected behavior

Filter to work correctly

How to reproduce

  • upload 3 files
  • Execute requestBuilder.Items.GetAsync (
    configuration =>
    {
    configuration.QueryParameters
    .Filter = <<odata filter with the ids of 1 or 2 files using the IN clause as specified above>>;
    }
    , cancellationToken
    );
  • you'll get the 3 files or more if there are more meeting the date time filter condition as specified above

SDK Version

Micrososft.Graph 5.67.0

Latest version known to work for scenario above?

its a service error not a lib error

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
@miguelautoentry miguelautoentry added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Dec 16, 2024
@MartinM85
Copy link
Contributor

What is requestBuilder? Could you include the code how do you create requestBuilder? Not sure if Graph API has ever fully supported filtering items on /drives/{id}/items endpoint

Maybe off-topic, but ID is a unique key, so it doesn't make sense to combine filtering by createdDateTime and ID.

@miguelautoentry
Copy link
Author

These filters where indeed working as our integration tests where working and they stopped working without changes since last Sunday's nightly build. The name filter IN does not work either.

@andrueastman
Copy link
Member

Thanks for raising this @miguelautoentry

Any chance this issue is still occurring? If indeed any chance you can post the issue at the link below to get visibility of the owners of the API?(this repo mainly handles library issues)

https://aka.ms/askGraph

@andrueastman andrueastman added Question: API status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Jan 13, 2025
@magahl
Copy link

magahl commented Jan 13, 2025

There is a question here:

https://learn.microsoft.com/en-us/answers/questions/2133562/graph-drive-getitems-filter-has-no-effect

Im having a hard time using the accepted answer with the v5 sdk though.

@MartinM85
Copy link
Contributor

MartinM85 commented Jan 13, 2025

Drive item id is unique, I would make a separate call for each id

var driveItem = await requestBuilder.Items["driveItemId"].GetAsync();

If you want retrieve all drive items in parallel, you can use batching.

Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question: API Status: No recent activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

4 participants