Skip to content

[BUG] Hardcoded ports in OpenSearch client initialization in CLI #500

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

Closed
nathaliellenaa opened this issue May 2, 2025 · 2 comments · Fixed by #501
Closed

[BUG] Hardcoded ports in OpenSearch client initialization in CLI #500

nathaliellenaa opened this issue May 2, 2025 · 2 comments · Fixed by #501
Assignees
Labels
bug Something isn't working

Comments

@nathaliellenaa
Copy link
Contributor

What is the bug?
In the connector CLI implementation, the OpenSearch client is initialized using a hardcoded port number (443 for AOS domain, and 9200 otherwise). We cannot hardcoded port number. For example, when users create a load balancer in front of their cluster, they can use any port number for the load balancer. Therefore, we should use the endpoint directly to initialize the client.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Set up a load balancer in front of OpenSearch cluster with a custom port (e.g., 8080)
  2. Create connector through the CLI
  3. The connector creation will fail because the client ignores the specified port and uses hardcoded values instead

What is the expected behavior?
The CLI should be able to create connector successfully with any port number.

What is your host/environment?

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Plugins

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?
Add any other context about the problem.

@nathaliellenaa nathaliellenaa added bug Something isn't working untriaged labels May 2, 2025
@nathaliellenaa
Copy link
Contributor Author

Can a maintainer assigned this to me?

@ylwu-amzn
Copy link
Collaborator

Sure , assigned to you @nathaliellenaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants