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

test(smoketest): add native image sample app #1525

Merged
merged 4 commits into from
Jun 8, 2023

Conversation

andrewazores
Copy link
Member

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed the last commit: git commit --amend --signoff

Related to cryostatio/cryostat-core#217

Description of the change:

Adds a Quarkus native image sample application to the smoketest.sh.

Motivation for the change:

This makes it visible and convenient to test Cryostat functionality against a native image target.

How to manually test:

  1. Run CRYOSTAT_IMAGE=quay.io... sh smoketest.sh...
  2. ...

@github-actions github-actions bot added the needs-triage Needs thorough attention from code reviewers label Jun 7, 2023
@mergify mergify bot added the safe-to-test label Jun 7, 2023
@andrewazores andrewazores added test and removed safe-to-test needs-triage Needs thorough attention from code reviewers labels Jun 7, 2023
@andrewazores andrewazores changed the title feat(smoketest): add native image sample app testsmoketest): add native image sample app Jun 7, 2023
@andrewazores andrewazores changed the title testsmoketest): add native image sample app test(smoketest): add native image sample app Jun 7, 2023
@mergify mergify bot added the safe-to-test label Jun 7, 2023
smoketest.sh Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

Test image available:

$ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1525-d14915b08b0a65c4ce8b9cc4a13557add5f17056 sh smoketest.sh

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

Test image available:

$ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1525-14db103e7084a3cc60837e7d1973b49957ba03ac sh smoketest.sh

@andrewazores andrewazores marked this pull request as ready for review June 7, 2023 20:13
@andrewazores andrewazores requested a review from ebaron as a code owner June 7, 2023 20:13
@andrewazores andrewazores requested a review from tthvo June 7, 2023 20:13
@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

Test image available:

$ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1525-4faf6be17b0017961a7ee4955d49c1601f447271 sh smoketest.sh

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

Test image available:

$ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1525-a12cfdfd7a8da623c6ea1ab239786abf4d0fac94 sh smoketest.sh

@tthvo
Copy link
Member

tthvo commented Jun 7, 2023

Not sure if its just me but Cryostat can't seems to pull templates.

Screenshot from 2023-06-07 17-23-04

SEVERE: HTTP 500: Could not get template models
io.vertx.ext.web.handler.HttpException: Internal Server Error
Caused by: io.cryostat.core.FlightRecorderException: Could not get template models
	at io.cryostat.core.templates.LocalStorageTemplateService.getTemplateModels(LocalStorageTemplateService.java:276)
	at io.cryostat.core.templates.AbstractTemplateService.getTemplates(AbstractTemplateService.java:53)
	at io.cryostat.core.templates.LocalStorageTemplateService.getTemplates(LocalStorageTemplateService.java:73)
	at io.cryostat.core.templates.MergedTemplateService.getTemplates(MergedTemplateService.java:70)
	at io.cryostat.net.web.http.api.v1.TargetTemplatesGetHandler.lambda$handleAuthenticated$0(TargetTemplatesGetHandler.java:126)
	at io.cryostat.net.TargetConnectionManager.executeConnectedTask(TargetConnectionManager.java:168)
	at io.cryostat.net.web.http.api.v1.TargetTemplatesGetHandler.handleAuthenticated(TargetTemplatesGetHandler.java:122)
	at io.cryostat.net.web.http.AbstractAuthenticatedRequestHandler.handle(AbstractAuthenticatedRequestHandler.java:102)
	at io.cryostat.net.web.http.AbstractAuthenticatedRequestHandler.handle(AbstractAuthenticatedRequestHandler.java:72)
	at io.vertx.ext.web.impl.BlockingHandlerDecorator.lambda$handle$0(BlockingHandlerDecorator.java:48)
	at io.vertx.core.impl.ContextBase.lambda$null$0(ContextBase.java:137)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264)
	at io.vertx.core.impl.ContextBase.lambda$executeBlocking$1(ContextBase.java:135)
	at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: Is a directory
	at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method)
	at java.base/sun.nio.ch.FileDispatcherImpl.read(FileDispatcherImpl.java:48)
	at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:330)
	at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:296)
	at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:273)
	at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:232)
	at java.base/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65)
	at java.base/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:107)
	at java.base/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:101)
	at java.base/java.io.InputStream.read(InputStream.java:218)
	at java.base/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:81)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.readAndBuffer(XMLEntityManager.java:3025)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:705)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:150)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:861)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:637)
	at org.openjdk.jmc.flightrecorder.controlpanel.ui.configuration.model.xml.XMLModel.create(XMLModel.java:160)
	at org.openjdk.jmc.flightrecorder.controlpanel.ui.model.EventConfiguration.createModel(EventConfiguration.java:148)
	at io.cryostat.core.templates.LocalStorageTemplateService.getTemplateModels(LocalStorageTemplateService.java:271)
	... 17 more

@tthvo
Copy link
Member

tthvo commented Jun 7, 2023

I saw that we can start recording with native image so not sure how we do that? Maybe not on UI?

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2023

Test image available:

$ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1525-271448820628a8ffc22ae2328c5ad84f1b59d428 sh smoketest.sh

@andrewazores
Copy link
Member Author

That stack trace looks like your custom template storage is broken. What do you have in your project templates/ directory?

image

image

@tthvo
Copy link
Member

tthvo commented Jun 8, 2023

That stack trace looks like your custom template storage is broken. What do you have in your project templates/ directory?

Ahh thanks! Somehow that directory was containing helm charts dated back to May 18:)) Can't rmb what i did on that day haha...

But anyways looks very good! Awesome!!

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2023

Test image available:

$ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1525-549d5dae393f55c902a6cc51d9228cfab6f6a447 sh smoketest.sh

@andrewazores andrewazores merged commit f0884a6 into cryostatio:main Jun 8, 2023
@andrewazores andrewazores deleted the nativeimage-sample branch June 8, 2023 15:22
mergify bot pushed a commit that referenced this pull request Jun 13, 2023
* feat(smoketest): add native image sample app

* remove unnecessary publish

* clean up port publications

* bump -core version to one that can connect to native images

(cherry picked from commit f0884a6)

# Conflicts:
#	smoketest.sh
andrewazores added a commit that referenced this pull request Jun 13, 2023
* feat(smoketest): add native image sample app

* remove unnecessary publish

* clean up port publications

* bump -core version to one that can connect to native images

(cherry picked from commit f0884a6)

# Conflicts:
#	smoketest.sh
andrewazores added a commit that referenced this pull request Jun 13, 2023
* test(smoketest): add native image sample app (#1525)
(cherry picked from commit f0884a6)

---------

Co-authored-by: Andrew Azores <aazores@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants