-
Notifications
You must be signed in to change notification settings - Fork 344
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
Fix route name for OCP #917
Fix route name for OCP #917
Conversation
Like the original PR addressing the length limitation, this might indicate a problem deeper than what originally thought. Is the test failing only because it's trying to lookup a route based on a truncated name? If so, the test should use |
This is the failing log
The instance name is the shortest part of the URL. Truncate should be called on the final URL but we do not have access to it. This PR fixes the issue though. |
The hostname is made of name and namespace of the route, and we can control the size of the name. This is what the actual code does to prevent creating an invalid route: jaeger-operator/pkg/route/query.go Lines 37 to 45 in 6b81f9d
|
I had the same problem as I mentioned in #904 This PR seems to fix the issue. |
To @jpkrohling note, the test code correctly gets the route and uses the hostname from the route to construct the URL for smoke test. The problem might by that shortened URL is ending with |
There's a |
// If the final name starts with "-", "a" is added as prefix. Similarly, if it ends with "-", "z" is added. | ||
// Any char that is not [a-z0-9] is replaced by "-" or "a". | ||
// Replacement character "a" is used only at the beginning or at the end of the name. | ||
// The function does not change length of the string. | ||
func DNSName(name string) string { |
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 have changed the behavior, the issue was that the function was changing the length of the name
and in our codebase the DNSName
was applied after the truncation.
There is no need to use a
and z
as replacement chars. The original name cannot be reconstructed.
pkg/strategy/all_in_one_test.go
Outdated
@@ -6,6 +6,8 @@ import ( | |||
"strings" | |||
"testing" | |||
|
|||
"github.com/jaegertracing/jaeger-operator/pkg/util" |
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.
Import is out of order :/
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.
goimports
seems to be buggy. I will fix it manually.
pkg/strategy/production_test.go
Outdated
@@ -6,6 +6,8 @@ import ( | |||
"strings" | |||
"testing" | |||
|
|||
"github.com/jaegertracing/jaeger-operator/pkg/util" |
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 one too
Signed-off-by: Pavol Loffay <[email protected]>
f8220e7
to
3dd765d
Compare
Resolves https://issues.redhat.com/browse/TRACING-965
Fixes smoke test failures on OCP
make e2e-tests-smoke
caused probably by #891. Other related fixes #904 and #915Signed-off-by: Pavol Loffay [email protected]