You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2020/02/29 00:25:26 UTC
[GitHub] [drill] dobesv opened a new pull request #2003: Try to add some
helpful tips to Testing.md
dobesv opened a new pull request #2003: Try to add some helpful tips to Testing.md
URL: https://github.com/apache/drill/pull/2003
Just a little docs change.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [drill] paul-rogers commented on a change in pull request #2003:
Try to add some helpful tips to Testing.md
Posted by GitBox <gi...@apache.org>.
paul-rogers commented on a change in pull request #2003: Try to add some helpful tips to Testing.md
URL: https://github.com/apache/drill/pull/2003#discussion_r385999514
##########
File path: docs/dev/Testing.md
##########
@@ -172,6 +172,59 @@ class DrillBuf ...
}
```
+# Simulating GitHub Actions
+
+Sometimes a test failure that occurs in the GitHub Actions CI cannot be reproduced locally. You can try to run the tests in a more similar environment using https://github.com/nektos/act
+
+1. Install act according to its instructions
+2. Edit `.github/workflows/ci.yml` to remove extra "matrix" elements and adjust the maven command line to set the tests you are interested in: ```run: mvn install -Dsurefire.useFile=false -DtrimStackTrace=false -Dtest=org.apache.drill.exec.server.rest.TestQueryWrapper -DfailIfNoTests=false```
+3. Run `act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 --job build` to run the build
+
# IntelliJ
-TBA
+IntelliJ IDEA has decent support for maven built in, IntelliJ IDEA users can use these steps to get up and running:
+
+First, import maven pom.xml as projects.
+
+Change settings in File > Settings > Build, Execution, Deployment > Build Tools > Maven:
+
+ 1. Enable "Work Offline" to avoid checking for dependency updates on every run
+ 2. Increase the "Thread Count" to speed up builds - a reasonable default is the number of CPU cores you have
+ 3. Go to the "Runner" subsection
+ 4. Enable "Delegate IDE build/run actions to Maven". The IDE didn't seem to do things in a manner compatible with running the application
+ 5. Enable "skip tests" you will probably want to run tests manually rather than every time you try to run something
+ 6. To skip some uninteresting build steps, you can also set the following properties to `true`: `checkstyle.skip`, `findbugs.skip`, `license.skip`, `maven.javadoc.skip`, `rat.skip`, `skipIfEmpty`
+
+At this point you should be able to use the built-in IDE features to run tests
+
+Running/debugging Drillbit is also possible:
+ 1. Create a new run configuration on the class `org.apache.drill.exec.server.Drillbit`
+ 2. you have to create a run configuration and set the VM parameters:
+
+ -Xms4G
+ -Xmx4G
+ -XX:MaxDirectMemorySize=8G
+ -XX:ReservedCodeCacheSize=1G
+ -Ddrill.exec.enable-epoll=false
+ -XX:MaxPermSize=512M
+ -XX:+CMSClassUnloadingEnabled
+ -XX:+UseG1GC
+ -Dlog.path=/opt/drill/log/drillbit.log
+ -Dlog.query.path=/opt/drill/log/drillbit_queries.json
+ -Xbootclasspath/a:/opt/drill/conf
Review comment:
This is only needed to simulate a "real" drillbit. In that case, I've found it easier to just add an `DRILLBIT_JAVA_OPTS` variable, in the environment or in `drill-env.sh` to enable remote debugging. Then, just connect to the running Drillbit from your IDE and you are assured to be using all the right config.
What is describe here works, just is a bit fiddly.
You can also see that config with `drillbit.sh debug`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [drill] paul-rogers commented on a change in pull request #2003:
Try to add some helpful tips to Testing.md
Posted by GitBox <gi...@apache.org>.
paul-rogers commented on a change in pull request #2003: Try to add some helpful tips to Testing.md
URL: https://github.com/apache/drill/pull/2003#discussion_r385999324
##########
File path: docs/dev/Testing.md
##########
@@ -172,6 +172,59 @@ class DrillBuf ...
}
```
+# Simulating GitHub Actions
+
+Sometimes a test failure that occurs in the GitHub Actions CI cannot be reproduced locally. You can try to run the tests in a more similar environment using https://github.com/nektos/act
+
+1. Install act according to its instructions
+2. Edit `.github/workflows/ci.yml` to remove extra "matrix" elements and adjust the maven command line to set the tests you are interested in: ```run: mvn install -Dsurefire.useFile=false -DtrimStackTrace=false -Dtest=org.apache.drill.exec.server.rest.TestQueryWrapper -DfailIfNoTests=false```
+3. Run `act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 --job build` to run the build
+
# IntelliJ
-TBA
+IntelliJ IDEA has decent support for maven built in, IntelliJ IDEA users can use these steps to get up and running:
+
+First, import maven pom.xml as projects.
+
+Change settings in File > Settings > Build, Execution, Deployment > Build Tools > Maven:
+
+ 1. Enable "Work Offline" to avoid checking for dependency updates on every run
+ 2. Increase the "Thread Count" to speed up builds - a reasonable default is the number of CPU cores you have
+ 3. Go to the "Runner" subsection
+ 4. Enable "Delegate IDE build/run actions to Maven". The IDE didn't seem to do things in a manner compatible with running the application
+ 5. Enable "skip tests" you will probably want to run tests manually rather than every time you try to run something
+ 6. To skip some uninteresting build steps, you can also set the following properties to `true`: `checkstyle.skip`, `findbugs.skip`, `license.skip`, `maven.javadoc.skip`, `rat.skip`, `skipIfEmpty`
+
+At this point you should be able to use the built-in IDE features to run tests
+
+Running/debugging Drillbit is also possible:
+ 1. Create a new run configuration on the class `org.apache.drill.exec.server.Drillbit`
+ 2. you have to create a run configuration and set the VM parameters:
+
+ -Xms4G
+ -Xmx4G
+ -XX:MaxDirectMemorySize=8G
+ -XX:ReservedCodeCacheSize=1G
+ -Ddrill.exec.enable-epoll=false
+ -XX:MaxPermSize=512M
+ -XX:+CMSClassUnloadingEnabled
+ -XX:+UseG1GC
+ -Dlog.path=/opt/drill/log/drillbit.log
+ -Dlog.query.path=/opt/drill/log/drillbit_queries.json
+ -Xbootclasspath/a:/opt/drill/conf
+
+ 3. Set environment variables:
+
+ DRILL_HOST_NAME=localhost:8047
+ DRILL_LOG_DIR=/opt/drill/log
+
+ 4. Edit `/opt/drill/conf/drill-override.conf` to set some options:
+
+ drill.exec: {
+ zk.connect: "localhost:2181",
+ allow_loopback_address_binding: true,
+ }
Review comment:
Another FYI: Another option is to create a `ClusterTest` based test that does this. That way, all the config is in a code file and you just tell it to run. Just another option.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [drill] arina-ielchiieva commented on issue #2003: DRILL-7614: Add
some helpful tips to Testing.md
Posted by GitBox <gi...@apache.org>.
arina-ielchiieva commented on issue #2003: DRILL-7614: Add some helpful tips to Testing.md
URL: https://github.com/apache/drill/pull/2003#issuecomment-593095718
@cgivre I think Bridget is no longer actively engaged in Drill project.
Well, currently Testing.md information is available only inside Drill project, of course it can be copied to Drill site, there is an extensive tutorial on how to generate web site updates (https://github.com/apache/drill/blob/gh-pages/README.md), first of course PR should be opened to the site branch. Plus @vvysotskyi is working on the automated job which will update Drill site once site branch is updated ( https://issues.apache.org/jira/browse/DRILL-7571).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [drill] cgivre commented on issue #2003: DRILL-7614: Add some
helpful tips to Testing.md
Posted by GitBox <gi...@apache.org>.
cgivre commented on issue #2003: DRILL-7614: Add some helpful tips to Testing.md
URL: https://github.com/apache/drill/pull/2003#issuecomment-593024386
Just a suggestion, but could we put this in the Drill website as well in the developer tab?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [drill] dobesv commented on a change in pull request #2003:
DRILL-7614: Add some helpful tips to Testing.md
Posted by GitBox <gi...@apache.org>.
dobesv commented on a change in pull request #2003: DRILL-7614: Add some helpful tips to Testing.md
URL: https://github.com/apache/drill/pull/2003#discussion_r386067683
##########
File path: docs/dev/Testing.md
##########
@@ -172,6 +172,59 @@ class DrillBuf ...
}
```
+# Simulating GitHub Actions
+
+Sometimes a test failure that occurs in the GitHub Actions CI cannot be reproduced locally. You can try to run the tests in a more similar environment using https://github.com/nektos/act
+
+1. Install act according to its instructions
+2. Edit `.github/workflows/ci.yml` to remove extra "matrix" elements and adjust the maven command line to set the tests you are interested in: ```run: mvn install -Dsurefire.useFile=false -DtrimStackTrace=false -Dtest=org.apache.drill.exec.server.rest.TestQueryWrapper -DfailIfNoTests=false```
+3. Run `act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 --job build` to run the build
+
# IntelliJ
-TBA
+IntelliJ IDEA has decent support for maven built in, IntelliJ IDEA users can use these steps to get up and running:
+
+First, import maven pom.xml as projects.
+
+Change settings in File > Settings > Build, Execution, Deployment > Build Tools > Maven:
+
+ 1. Enable "Work Offline" to avoid checking for dependency updates on every run
+ 2. Increase the "Thread Count" to speed up builds - a reasonable default is the number of CPU cores you have
+ 3. Go to the "Runner" subsection
+ 4. Enable "Delegate IDE build/run actions to Maven". The IDE didn't seem to do things in a manner compatible with running the application
+ 5. Enable "skip tests" you will probably want to run tests manually rather than every time you try to run something
+ 6. To skip some uninteresting build steps, you can also set the following properties to `true`: `checkstyle.skip`, `findbugs.skip`, `license.skip`, `maven.javadoc.skip`, `rat.skip`, `skipIfEmpty`
+
+At this point you should be able to use the built-in IDE features to run tests
+
+Running/debugging Drillbit is also possible:
+ 1. Create a new run configuration on the class `org.apache.drill.exec.server.Drillbit`
+ 2. you have to create a run configuration and set the VM parameters:
+
+ -Xms4G
+ -Xmx4G
+ -XX:MaxDirectMemorySize=8G
+ -XX:ReservedCodeCacheSize=1G
+ -Ddrill.exec.enable-epoll=false
+ -XX:MaxPermSize=512M
+ -XX:+CMSClassUnloadingEnabled
+ -XX:+UseG1GC
+ -Dlog.path=/opt/drill/log/drillbit.log
+ -Dlog.query.path=/opt/drill/log/drillbit_queries.json
+ -Xbootclasspath/a:/opt/drill/conf
+
+ 3. Set environment variables:
+
+ DRILL_HOST_NAME=localhost:8047
+ DRILL_LOG_DIR=/opt/drill/log
+
+ 4. Edit `/opt/drill/conf/drill-override.conf` to set some options:
+
+ drill.exec: {
+ zk.connect: "localhost:2181",
+ allow_loopback_address_binding: true,
+ }
Review comment:
Hmm if you have changes to suggest I guess you can open a PR against this branch?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [drill] cgivre commented on issue #2003: DRILL-7614: Add some
helpful tips to Testing.md
Posted by GitBox <gi...@apache.org>.
cgivre commented on issue #2003: DRILL-7614: Add some helpful tips to Testing.md
URL: https://github.com/apache/drill/pull/2003#issuecomment-593028733
@dobesv That wasn't for this PR... I'm not really sure that we have a process for website updates. @bbevens Can you assist?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [drill] asfgit closed pull request #2003: DRILL-7614: Add some
helpful tips to Testing.md
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #2003: DRILL-7614: Add some helpful tips to Testing.md
URL: https://github.com/apache/drill/pull/2003
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [drill] dobesv commented on issue #2003: DRILL-7614: Add some
helpful tips to Testing.md
Posted by GitBox <gi...@apache.org>.
dobesv commented on issue #2003: DRILL-7614: Add some helpful tips to Testing.md
URL: https://github.com/apache/drill/pull/2003#issuecomment-593025563
I agree this might be nice to have in the website, to be honest I only found this when I was thinking I wanted to document it, I hadn't seen that developer docs folder before.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [drill] arina-ielchiieva commented on issue #2003: DRILL-7614: Add
some helpful tips to Testing.md
Posted by GitBox <gi...@apache.org>.
arina-ielchiieva commented on issue #2003: DRILL-7614: Add some helpful tips to Testing.md
URL: https://github.com/apache/drill/pull/2003#issuecomment-592949132
@dobesv we don't need to create Jira if we are doing updates to the Drill site but for docs that reside in Drill project, Jira is required. I have already created Jira for you (https://issues.apache.org/jira/browse/DRILL-7614). Could you please update the commit message to include Jira number? Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services