GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor: Qdrant module QOL improvements by anush008 · Pull Request #8449 · testcontainers/testcontainers-java

Conversation

@anush008

@anush008 anush008 commented Mar 13, 2024

Copy link
Copy Markdown

This PR makes QOL improvements to the Qdrant module.

Adds builder methods to configure an API key and config file with associated tests.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@anush008
refactor: Qdrant module
d6767c9
@anush008
anush008 requested a review from a team March 13, 2024 06:01
@github-actions github-actions Bot added the modules/qdrant label Mar 13, 2024
eddumelendez
eddumelendez requested changes Mar 13, 2024
View reviewed changes

@eddumelendez eddumelendez left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for your contribution, @anush008! I've left some comments.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread modules/qdrant/src/main/java/org/testcontainers/qdrant/QdrantContainer.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread modules/qdrant/src/main/java/org/testcontainers/qdrant/QdrantContainer.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread modules/qdrant/src/main/java/org/testcontainers/qdrant/QdrantContainer.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread modules/qdrant/src/main/java/org/testcontainers/qdrant/QdrantContainer.java Outdated
Comment on lines +51 to +57
public int getRestPort() {
return getMappedPort(QDRANT_REST_PORT);
}

public int getGrpcPort() {
return getMappedPort(QDRANT_GRPC_PORT);
}

@eddumelendez eddumelendez Mar 13, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

we haven't done this in the past but I think for GRPC this makes sense? I'll discuss with the team to open QDRANT_REST_PORT and QDRANT_GRPC_PORT instead of doing it in all the modules.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
anush008 added 3 commits March 14, 2024 09:19
@anush008
Merge branch 'main' into main
4f1129b
@anush008
chore: getHttpPort() QdrantContainer.java
7dcb034
@anush008
Merge branch 'main' into main
17fa473
eddumelendez
eddumelendez reviewed Mar 14, 2024
View reviewed changes
Comment thread modules/qdrant/src/test/java/org/testcontainers/qdrant/QdrantContainerTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@eddumelendez
Apply suggestions from code review
215af26
@anush008
anush008 requested a review from eddumelendez March 18, 2024 11:32
anush008 added 2 commits March 20, 2024 16:27
@anush008
Merge branch 'main' into main
9d7786c
@anush008
Merge branch 'main' into main
a011a51
eddumelendez
eddumelendez reviewed Apr 12, 2024
View reviewed changes
Comment thread modules/qdrant/src/main/java/org/testcontainers/qdrant/QdrantContainer.java
Comment on lines +10 to +14
*
* <p>Supported image: {@code qdrant/qdrant}
*
* <p>Exposed ports:
*

@eddumelendez eddumelendez Apr 12, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

can we revert those changes, please?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread modules/qdrant/src/main/java/org/testcontainers/qdrant/QdrantContainer.java
Comment on lines +51 to +53
public int getHttpPort() {
return getMappedPort(QDRANT_REST_PORT);
}

@eddumelendez eddumelendez Apr 12, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I understand one of the ways for the GRPC client is using specifically the port but do we know of any client building the API just like GRPC?

Suggested change
public int getHttpPort() {
return getMappedPort(QDRANT_REST_PORT);
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@anush008 anush008 Apr 12, 2024

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I didn't get what you meant. Could you clarify, please?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@eddumelendez eddumelendez Apr 12, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Is there a qdrant client that use the REST port just like GRPC does? In GRPC makes sense because the client allows it but with the REST port IDK

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@anush008 anush008 Apr 12, 2024

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It for general availability for anyone who wants to use Qdrant via the REST interface in any way.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@eddumelendez eddumelendez Apr 12, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

In that case, getHttpHostAddress() or getHttpEndpoint() make sense but since Qdrant doesn't provide a rest client, I'd prefer just to keep the getGrpcHostAddress()

String getHttpHostAddress() {
return getHost() + ":" + getMappedPort(REST_PORT);
}

String getHttpEndpoint() {
return "http://" + getHost() + ":" + getMappedPort(REST_PORT);
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread modules/qdrant/src/test/java/org/testcontainers/qdrant/QdrantContainerTest.java
.healthCheck(QdrantOuterClass.HealthCheckRequest.getDefaultInstance())
.get();
QdrantClient client = new QdrantClient(
QdrantGrpcClient.newBuilder(qdrant.getHost(), qdrant.getGrpcPort(), false).build()

@eddumelendez eddumelendez Apr 12, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

wonder why changing this test? It is also a valid way to build a client and using the getGrpcHostAddress()

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@anush008 anush008 Apr 12, 2024

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is only a style improvement. It's comparatively simpler.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@eddumelendez

eddumelendez commented Apr 18, 2024

Copy link
Copy Markdown
Member

Thanks for your contribution, @anush008. I can not update the PR because is your main branch. I'm closing this in favor of #8556

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eddumelendez eddumelendez closed this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@eddumelendez eddumelendez eddumelendez requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

modules/qdrant

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@anush008 @eddumelendez
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.