-
Notifications
You must be signed in to change notification settings - Fork 35
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
Do not check logs in serverless tests #2267
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
wow, this is surprising
Can you share why is that?
app.getLogs()
can't retrieve them or even withoc
tool there are no logs?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.
If you run
oc status
, there would be no pods to read logs from (which is, I guess, expected). Callingapp.getLogs
returns empty list.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.
ok, I guess we would need to actively collect logs in FW for any serverless deployment before it gets scaled to zero.
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.
BTW, here how such deployment looks like:
mvn clean verify -Dit.test=ServerlessExtensionOpenShiftHttpMinimumReactiveIT -Popenshift -Dts.openshift.delete.project.after.all=false -Dts.openshift.ephemeral.namespaces.enabled=false -Doc.reruns=0
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.
When I tried this, with @fedinskiy 's command, the pod were present in the openshift while tests were searching for logs and remained there for quite a while even after the test failed. Logs from the pod were manually readable no problem and contained all the lines tests are searching for.
IDK why tests were not able to read those. But I agree that for now it is best to disable it investigate the issue with logs reading.
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.
@mocenas was it "build pod" or "app pod"? They can be distinguished by "Completed" status (or lack thereof). I have only seen the former.
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 was app pod. It was in state Running. (also build pod had "build" in name).
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.
Hmm, now I see temporary pod, which lives for roughly 80 seconds, but the last line in its logs contains "11:26:56,497 Installed features: [cdi, kubernetes, rest, rest-jackson, smallrye-context-propagation, vertx]", so no notification about interception there.
Maybe it is a bug in Quarkus interception, but for now we cann't check it automatically anyway
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.
Let's consider that you really can't inspect Knative serving function logs (which makes it basically unusable in production, I suppose they just export it automatically to grafana or something like that we don't have) - you still have running application that returns response. Can you set
quarkus.log.file.enable
andquarkus.log.file.path
and read it from the file system inside Quarkus application resource method? Here you have operator resource that you call https://github.com/quarkus-qe/quarkus-test-suite/blob/main/http/http-minimum-reactive/src/test/java/io/quarkus/ts/http/minimum/reactive/HttpMinimumReactiveIT.java#L99, is there something that stops you from adding a new method that returns logs for certain category (class - so that it is short)?Interestingly, this can be implemented as a FW feature as well when at least one extension is based on Vert.x HTTP (so 99 of 100 deployments), but I suspect that there is proper solution possible and it just needs a time that we don't have.