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

Extract Aspire.Hosting.Milvus.Tests project #4875

Merged
merged 11 commits into from
Jul 22, 2024
Merged

Conversation

Alirexaa
Copy link
Contributor

@Alirexaa Alirexaa commented Jul 12, 2024

Contributes to #3185
Contributes to #4294

Microsoft Reviewers: Open in CodeFlow

@Alirexaa Alirexaa requested a review from mitchdenny as a code owner July 12, 2024 15:41
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-codeflow for labeling automated codeflow. intentionally a different color! label Jul 12, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 12, 2024
@Alirexaa
Copy link
Contributor Author

@eerhardt, we need to import milvusdb/milvus:1.0:2.3-latest and zilliz/attu:v2.3 to netaspireci.azurecr.io.

var milvusClient = host.Services.GetRequiredService<MilvusClient>();

string collectionName = "book";
var collection = await milvusClient.CreateCollectionAsync(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will need some resilience added to this test as it is currently failing. Looks like it tries hitting the database before it is ready.


[Fact]
[RequiresDocker]
public async Task VerifyMilvusDatabaseResource()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this test is fully necessary. It seems to duplicate the above test a lot. Can we just have 1 functional test like this? See #4862 for example.


[Fact]
[RequiresDocker]
public async Task WithDataVolumeShouldPersistStateBetweenUsages()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this and the DataBindMount tests into a Theory? See #4862 and #4879 for examples.


[Fact]
[RequiresDocker]
public async Task PersistenceIsDisabledByDefault()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this test for every resource. I think this can be removed for Milvus.

Comment on lines 54 to 58
new[] {
FieldSchema.Create<long>("book_id", isPrimaryKey:true),
FieldSchema.Create<long>("word_count"),
FieldSchema.CreateVarchar("book_name", 256),
FieldSchema.CreateFloatVector("book_intro", 2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
new[] {
FieldSchema.Create<long>("book_id", isPrimaryKey:true),
FieldSchema.Create<long>("word_count"),
FieldSchema.CreateVarchar("book_name", 256),
FieldSchema.CreateFloatVector("book_intro", 2)
new[]
{
FieldSchema.Create<long>("book_id", isPrimaryKey:true),
FieldSchema.Create<long>("word_count"),
FieldSchema.CreateVarchar("book_name", 256),
FieldSchema.CreateFloatVector("book_intro", 2)

Comment on lines 156 to 157
// Stops the container, or the Volume would still be in use
await app.StopAsync();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in a finally block like #4910 does. And same for the other StopAsync in this test.

sebastienros and others added 2 commits July 15, 2024 22:48
Co-authored-by: Ankit Jain <radical@gmail.com>
…csproj

Co-authored-by: Ankit Jain <radical@gmail.com>
@Alirexaa
Copy link
Contributor Author

As soon as i come back to my desk i will apply suggested changes.

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for another contribution, @Alirexaa!

BTW - I pushed a change to remove Milvus from the EndToEnd tests, like we've done elsewhere.

@eerhardt eerhardt enabled auto-merge (squash) July 22, 2024 16:43
@Alirexaa
Copy link
Contributor Author

Thanks for another contribution

It was my pleasure.

@eerhardt eerhardt merged commit 2576de3 into dotnet:main Jul 22, 2024
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-codeflow for labeling automated codeflow. intentionally a different color! community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants