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

Knative SD implementation doesn't get the correct service instance endpoint #488

Closed
aureamunoz opened this issue Feb 7, 2023 · 4 comments
Assignees
Labels
bug Bug or Bug Fixes
Milestone

Comments

@aureamunoz
Copy link
Collaborator

aureamunoz commented Feb 7, 2023

From this PR

The knative service discovery strategy is not working correctly. Given the quarkus-super-heroes project, when curl the rest-fights app on the /api/fights/randomfighters endpoint I would expect to see two random fighters, but I don’t. I see the fallback fighters

╰─ http https://rest-fights-eric-deandrea-dev.apps.sandbox-m2.ll9k.p1.openshiftapps.com/api/fights/randomfighters
HTTP/1.1 200 OK
cache-control: private
content-length: 314
content-type: application/json;charset=UTF-8
date: Mon, 06 Feb 2023 16:39:59 GMT
server: envoy
set-cookie: f876558f2b90f5b848dd878960dd0dc7=539d5cd9b01519008a395f7357457294; path=/; HttpOnly
x-envoy-upstream-service-time: 859

{
    "hero": {
        "level": 1,
        "name": "Fallback hero",
        "picture": "https://dummyimage.com/280x380/1e8fff/ffffff&text=Fallback+Hero",
        "powers": "Fallback hero powers"
    },
    "villain": {
        "level": 45,
        "name": "Fallback villain",
        "picture": "https://dummyimage.com/280x380/b22222/ffffff&text=Fallback+Villain",
        "powers": "Fallback villain powers"
    }
}

To reproduce:
using https://developers.redhat.com/developer-sandbox
https://github.com/edeandrea/quarkus-super-heroes/tree/fix-stork
Steps to deploy:
Make sure you’re using Java 17!
1 - oc apply -f https://raw.githubusercontent.com/edeandrea/quarkus-super-heroes/fix-stork/rest-villains/deploy/k8s/java17-knative.yml
2 - oc apply -f https://raw.githubusercontent.com/edeandrea/quarkus-super-heroes/fix-stork/rest-heroes/deploy/k8s/java17-knative.yml
3 - Clone https://github.com/edeandrea/quarkus-super-heroes and switch to the fix-stork branch
4 -

cd quarkus-super-heroes/rest-fights
./mvnw clean package -DskipTests \
  -Dquarkus.profile=knative-openshift-17 \
  -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 \
  -Dquarkus.container-image.group=$(oc project -q) \
  -Dquarkus.knative.labels.\"app.openshift.io/runtime\"=quarkus \
  -Dquarkus.knative.version=1.0 \
  -Dquarkus.kubernetes.deploy=true
@aureamunoz aureamunoz added the bug Bug or Bug Fixes label Feb 7, 2023
@aureamunoz aureamunoz self-assigned this Feb 7, 2023
aureamunoz added a commit to aureamunoz/smallrye-stork that referenced this issue Feb 9, 2023
aureamunoz added a commit to aureamunoz/smallrye-stork that referenced this issue Feb 17, 2023
aureamunoz added a commit to aureamunoz/smallrye-stork that referenced this issue Feb 17, 2023
aureamunoz added a commit to aureamunoz/smallrye-stork that referenced this issue Feb 20, 2023
aureamunoz added a commit to aureamunoz/smallrye-stork that referenced this issue Feb 20, 2023
@edeandrea
Copy link

@aureamunoz did this get merged in yet? If so, do you know when it will make it into a Quarkus release?

@aureamunoz
Copy link
Collaborator Author

The PR has been already merged to 2.16, it will be released soon but don't know when. I need to create the corresponding one targeting mainbranch in Quarkus. I'll do it.

@edeandrea
Copy link

Thanks!

@cescoffier
Copy link
Contributor

Closing - please re-open if not fixed.

@cescoffier cescoffier added this to the 2.0.0 milestone Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug or Bug Fixes
Projects
None yet
Development

No branches or pull requests

3 participants