-
Notifications
You must be signed in to change notification settings - Fork 33
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
[DROOLS-7608] EAP 7.4.15 VFS changes make drools PMML tests fail #25
Conversation
- WIP : ugly reflection
Jenkins run fdb |
if (!Files.exists(Paths.get(path))) { | ||
log.info("path : " + path + " --- does not exist"); | ||
log.info("fallback for EAP 7.14.5"); | ||
try { | ||
Method m3 = Class.forName("org.jboss.vfs.VFS").getDeclaredMethod("getMount", Class.forName("org.jboss.vfs.VirtualFile")); | ||
m3.setAccessible(true); | ||
Method m4 = Class.forName("org.jboss.vfs.VFS$Mount").getDeclaredMethod("getFileSystem"); | ||
m4.setAccessible(true); | ||
Method m5 = Class.forName("org.jboss.vfs.spi.FileSystem").getMethod("getMountSource"); | ||
|
||
Object virtualFile = m2.invoke(null, url.toURI()); | ||
Object mount = m3.invoke(null, virtualFile); | ||
Object fileSystem = m4.invoke(mount); | ||
log.info("fileSystem : " + fileSystem); | ||
File mountSource = (File) m5.invoke(fileSystem); | ||
log.info("mountSource : " + mountSource); | ||
path = mountSource.getPath(); | ||
} catch (Exception e) { | ||
e.printStackTrace(System.out); | ||
} | ||
} |
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 is the main part of the (temporary) fix. I was not able to find public methods to get the physical file (e.g. kie-server-integ-tests-drools/target/cargo/configurations/wildfly23x/tmp/vfs/temp/tempc483d0975993750a/content-c8ee66a0826ffc48/WEB-INF/lib/kie-pmml-7.75.0-SNAPSHOT.jar
). So used setAccessible(true)
for package-private methods.
Object virtualFile = m2.invoke(null, url.toURI()); | ||
log.info("virtualFile=" + virtualFile); | ||
File f = (File)m.invoke( m2.invoke(null, url.toURI()) ); | ||
log.info("f=" + f); |
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.
You can confirm that VirtualFile.getPhysicalFile
returns file path under deployment
directory. (e.g. target/cargo/configurations/wildfly23x/tmp/vfs/deployment/deploymente0f78ed559baff33/kie-pmml-7.75.0-SNAPSHOT.jar-9458e4090f0fae31/contents/META-INF/kmodule.xml
)
Actually, the kmodule.xml
is created on the file path as a cache file. But what we want here is the kie-pmml-7.75.0-SNAPSHOT.jar
which is under temp
directory.
|
Jenkins run fdb |
replaced by #26 |
Thank you for submitting this pull request
NOTE!:
kiegroup/drools
is maintained only for old branches e.g.7.x
,7.67.x
,7.67.x-blue
.If you are submitting a PR for
main
branch, please useapache/incubator-kie-drools
instead.Ports
This is a PR for 7.x
JIRA:
https://issues.redhat.com/browse/DROOLS-7608
How to replicate CI configuration locally?
Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.
build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.
How to retest this PR or trigger a specific build:
for pull request checks
Please add comment: Jenkins retest this
for a specific pull request check
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] tests
for a full downstream build
run_fdb
a compile downstream build please add comment: Jenkins run cdb
a full production downstream build please add comment: Jenkins execute product fdb
an upstream build please add comment: Jenkins run upstream
for quarkus branch checks
Run checks against Quarkus current used branch
Please add comment: Jenkins run quarkus-branch
for a quarkus branch specific check
Run checks against Quarkus current used branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] quarkus-branch
for quarkus main checks
Run checks against Quarkus main branch
Please add comment: Jenkins run quarkus-main
for a specific quarkus main check
Run checks against Quarkus main branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] quarkus-main
for quarkus lts checks
Run checks against Quarkus lts branch
Please add comment: Jenkins run quarkus-lts
for a specific quarkus lts check
Run checks against Quarkus lts branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] quarkus-lts
for native checks
Run native checks
Please add comment: Jenkins run native
for a specific native check
Run native checks
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] native
for native lts checks
Run native checks against quarkus lts branch
Please add comment: Jenkins run native-lts
for a specific native lts check
Run native checks against quarkus lts branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] native-lts
How to backport a pull request to a different branch?
In order to automatically create a backporting pull request please add one or more labels having the following format
backport-<branch-name>
, where<branch-name>
is the name of the branch where the pull request must be backported to (e.g.,backport-7.67.x
to backport the original PR to the7.67.x
branch).Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
If something goes wrong, the author will be notified and at this point a manual backporting is needed.