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

Adding .WithPartitionKey() #20300

Merged
merged 1 commit into from
Mar 18, 2020
Merged

Adding .WithPartitionKey() #20300

merged 1 commit into from
Mar 18, 2020

Conversation

1iveowl
Copy link
Contributor

@1iveowl 1iveowl commented Mar 16, 2020

Adding .WithPartitionKey() IQueryable extension method.

Needed when using resource tokens for secure authentication when permissions are grated based on partition keys. #20221

@1iveowl 1iveowl changed the title Release/3.1 Adding .WithPartitionKey() Mar 16, 2020
@AndriySvyryd
Copy link
Member

Also add a test to EndToEndCosmosTest and squash the commits

@1iveowl 1iveowl changed the base branch from release/3.1 to master March 18, 2020 11:34
@1iveowl
Copy link
Contributor Author

1iveowl commented Mar 18, 2020

Also add a test to EndToEndCosmosTest and squash the commits

I've squashed the commits.

Working on passing the end-to-end cosmos test...

@1iveowl
Copy link
Contributor Author

1iveowl commented Mar 18, 2020

Working on passing the end-to-end cosmos test...

Test added and all end-to-end cosmos tests passed.

@dotnet dotnet deleted a comment from smitpatel Mar 18, 2020
@dotnet dotnet deleted a comment from smitpatel Mar 18, 2020
@1iveowl
Copy link
Contributor Author

1iveowl commented Mar 18, 2020

Not sure what to make of these check fails?

##[error]XUnit(0,0): error : (NETCORE_ENGINEERING_TELEMETRY=Test) Tests failed: /Users/runner/runners/2.165.2/work/1/s/artifacts/TestResults/Release/EFCore.Cosmos.Tests_netcoreapp3.1_x64.html [netcoreapp3.1|x64] : Source link

@smitpatel
Copy link
Member

\r\n-- Missing NotNull annotations --\r\nMicrosoft.EntityFrameworkCore.Cosmos.Query.Internal.CosmosQueryCompilationContext..ctor[dependencies]\nMicrosoft.EntityFrameworkCore.Cosmos.Query.Internal.CosmosQueryCompilationContextFactory..ctor[dependencies]\nMicrosoft.EntityFrameworkCore.Cosmos.Query.Internal.CosmosQueryMetadataExtractingExpressionVisitor..ctor[cosmosQueryCompilationContext]\nMicrosoft.EntityFrameworkCore.Cosmos.Query.Internal.CosmosQueryTranslationPreprocessor..ctor[dependencies]\nMicrosoft.EntityFrameworkCore.Cosmos.Query.Internal.CosmosQueryTranslationPreprocessor..ctor[queryCompilationContext]\nMicrosoft.EntityFrameworkCore.Cosmos.Query.Internal.CosmosQueryTranslationPreprocessorFactory..ctor[dependencies]\nExpected: False\nActual: True

\r\n-- Missing virtual APIs --\r\nMicrosoft.EntityFrameworkCore.Cosmos.Query.Internal.CosmosQueryCompilationContext.get_PartitionKey\nExpected: False\nActual: True

Since there is new public API and class, just few missing virtual keyword and [NotNull] annotations. Also where you put [NotNull] on parameter, make sure to also call Check.NotNull for parameter.

Adding WithPartitionKey
@AndriySvyryd AndriySvyryd merged commit 7e02fdb into dotnet:master Mar 18, 2020
@AndriySvyryd
Copy link
Member

@1iveowl Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants