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

Service name duplication in widget when running several services on the same port #392

Open
2 tasks done
AkibaAT opened this issue Nov 29, 2024 · 0 comments · May be fixed by #393
Open
2 tasks done

Service name duplication in widget when running several services on the same port #392

AkibaAT opened this issue Nov 29, 2024 · 0 comments · May be fixed by #393
Labels
bug Something isn't working

Comments

@AkibaAT
Copy link
Contributor

AkibaAT commented Nov 29, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Are you sure that this bug is related to this DDEV Integration Plugin?

  • I am sure

Enter your error report ID (If available)

No response

Describe the bug

When running several services within one DDEV project, using the same port, the names in the widget are being duplicated.

The issue is caused by URL.hashCode(), which resolves the host name to an IP address which in turn is then being used for the hash, resulting in the same hash for both hostnames.

Migrating the code, or at the very last the hash calculation, to URI would resolve the issue.

See https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4434494 for reference.

Steps to reproduce

  • Set up a new DDEV project
  • Add an additional service, e.g. ddev add-on get ddev/ddev-solr
  • Configure the service to use the same ports as the web container (80 & 443), but with a different hostname:
VIRTUAL_HOST: solr.${DDEV_HOSTNAME}
HTTP_EXPOSE: 80:8983
HTTPS_EXPOSE: 443:8983
  • ddev start
  • The web and solr service names are set to the same value, randomly changing:
    image
    image

Additional context

No response

@AkibaAT AkibaAT added the bug Something isn't working label Nov 29, 2024
@AkibaAT AkibaAT linked a pull request Nov 29, 2024 that will close this issue
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
Status: New
Development

Successfully merging a pull request may close this issue.

1 participant