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
Uri shortener for long host label endpoints #2083
Conversation
4d7da72
to
c6ef44d
Compare
c6ef44d
to
87bd940
Compare
It will automatically shorten host labels of system-generated proxy endpoints, that exceed the 63-char limit imposed by RFC-1035. Closes [THREESCALE-5089](https://issues.redhat.com/browse/THREESCALE-5089)
87bd940
to
36bd1d7
Compare
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 wonder, instead of using The route created in OpenShift could have annotations to query by |
I think the problem is that this will become the public URL of the service. Customers will probably prefer keep getting something easier to remember and yet still be more or less in control of the host name (up to a point). |
I really do not know, it is a copy paste anyway, used in scripts not something you type in your browser url bar. |
@hallelujah, the 63-char limit per hostname label is currently being easily reached in Openshift when service discovery is used because we generate the system name. It's not (directly) chosen by the customer. It's About how the endpoints are used afterwards, I really don't know. You may be right. I just didn't wanna break behaviour too much. |
I was thinking of using a UUID or something instead of the template when it is generated by ServiceDiscovery 2 services with long enough name can generate a similar system name that will be shortened, leading to 2 generated same URLs pointing to 2 services (one accepted by OpenShift, the other not) |
@hallelujah, that's why I used a SHA-1 based on the original hostname label. The chance of name collision here is virtually zero (or as low as SHA-1 algorithm has to generate two hashes with the same 7-char prefix for two different sources). In other words, given that |
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.
Right! I thought it was truncate then SHA1. Sorry I am tired :(
Good job @guicassolato 🎖️ 🚀
Uri shortener for long host label endpoints
It will automatically shorten host labels of system-generated proxy endpoints, that exceed the 63-char limit imposed by RFC-1035.
Closes THREESCALE-5089