Giter Club home page Giter Club logo

kotoed's People

Contributors

belyaev-mikhail avatar gagarski avatar h31 avatar ice-phoenix avatar mavro-dev avatar saloed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kotoed's Issues

Remove unneeded utilities

Original report by Kirill Gagarski (Bitbucket: gagarski, GitHub: gagarski).


Some utilities are not very useful now and can be safely removed:

  • Project search

    Currently we can search for project/submission from the course page. Global project search behavior is slightly different from per-course search and has completely different implementation. Also it's hard to imagine a situation when it's really needed.

  • Tag search
    We can search by tags from the course page. Again, global tag search does not seem useful. Also this search page is very limited: it's case-sensitive, it does not use full-text search. This feature should be properly reimplemented or removed.

Enhance project "root table": assignee / tag / status

Original report by Mikhail Glukhikh (Bitbucket: mglukhikh, GitHub: mglukhikh).


I mean the table we see just after KotlinAsFirst2017 opening. As minimum, I would recommend to add some kind of "Assignee" for each submission (as alternative, assignee tags can work, but we should be able to see them), and may be also add some kind of submission status (like "waiting for review" before review, "waiting for fixes" after unsuccessful review, "accepted" after successful review, "invalid" if submission is not correct).

Multiple db errors while setting auto-tags

Original report by Mikhail Belyaev (Bitbucket: belyaev.mikhail, GitHub: belyaev-mikhail).


Several log messages cause races between setting and resetting of tags on the same submission. These are guaranteed not to cause any inconsistencies (or are they?), but are very annoying.

A typical scenario is as follows:

  • Log 1 received (success)
  • Log 2 received (success)
  • Log 3 received (success)
  • Log 1 handler starts dbFind, gets records A, B, C
  • Log 2 handler starts dbFind, gets records A, B, C (duh!)
  • Log 3 handler starts dbFind, gets records A. B, C
  • Log 1 handler deletes records A, B, C, creates record A1
  • Log 2 handler deletes record A (knows nothing about A1), which is already deleted, crashtrace
  • Log 3 handler deletes record A (knows nothing about A1), which is already deleted, crashtrace

Some hack for updating static files without rebuilding and redeloying

Original report by Anonymous.


Now static files are packed to fat JAR and served by VertX from there (unpacked to VertX cache folder). This is fine but it takes long time to build and redeploy the whole project to update a couple of JS files.

The following might help:

  1. Disable browser caching for static files while in debug mode.
  2. Add script that webpacks front-end module and injects target into VertX file cache (this is ugly but OK for debugging purposes).
  3. Maybe adopt webpack --watch together with 2
  4. Use the same technique for templates (might not work because of compiled template caching)

mvn exec:java is broken

Original report by Kirill Gagarski (Bitbucket: gagarski, GitHub: gagarski).


After splitting to modules we cannot do mvn exec:java anymore.

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] kotoed
[INFO] kotoed-js
[INFO] kotoed-server
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building kotoed 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ kotoed ---
[INFO] skipping execute as per configuration
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building kotoed-js 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ kotoed-js ---
[INFO] skipping execute as per configuration
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building kotoed-server 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] kotoed ............................................. SUCCESS [  0.181 s]
[INFO] kotoed-js .......................................... SUCCESS [  0.019 s]
[INFO] kotoed-server ...................................... FAILURE [  0.212 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.583 s
[INFO] Finished at: 2017-06-30T21:46:35+03:00
[INFO] Final Memory: 15M/485M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project kotoed-server: Could not resolve dependencies for project org.jetbrains.research:kotoed-server:jar:0.1.0-SNAPSHOT: Could not find artifact org.jetbrains.research:kotoed-js:jar:0.1.0-SNAPSHOT -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :kotoed-server

Combining exec:java with standard maven lifecycle phase (e. g. mvn package exec:java) helps but Kotoed cannot acquire DB driver:

2017-06-30T21:48:47.793 INFO  [io.vertx.ext.web.handler.impl.LoggerHandlerImpl] - 0:0:0:0:0:0:0:1 - GET /login HTTP/1.1 200 725 - 38 ms
2017-06-30T21:48:52.628 DEBUG [io.vertx.ext.web.handler.impl.SessionHandlerImpl] - Using session cookies without https could make you susceptible to session hijacking: http://localhost:9000/login
[WARNING] 
java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:postgresql://localhost/kotoed
        at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:88)
        at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:323)
        at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:114)
        at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:105)
        at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:97)
        at org.jetbrains.research.kotoed.util.database.KotoedDataSource.getConnection(DataSourceHolder.kt)
        at io.vertx.ext.jdbc.impl.JDBCClientImpl.lambda$getConnection$1(JDBCClientImpl.java:133)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getDriver(DriverManager.java:315)
        at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:81)
        ... 9 more

java -jar kotoed-server/target/kotoed-server-0.1.0-SNAPSHOT-fat.jar works fine

Strange error when listing repo which is not cloned yet

Original report by Kirill Gagarski (Bitbucket: gagarski, GitHub: gagarski).


Request to http://localhost:9000/debug/eventbus/kotoed.api.submission.code.list:

{
  "submission_id": 3
}

Response:

{
    "success": false,
    "error": "abort: unknown revision '4c4b22a'!",
    "code": 500,
    "stacktrace": [
        "io.vertx.core.eventbus.impl.MessageImpl.fail(MessageImpl.java:114)",
        "org.jetbrains.research.kotoed.util.ExceptionsKt.handleException(Exceptions.kt:63)",
        "org.jetbrains.research.kotoed.util.CoroutineUtilKt$UnconfinedWithExceptions$2.handleException(CoroutineUtil.kt:73)",
        "kotlinx.coroutines.experimental.CoroutineExceptionHandlerKt.handleCoroutineException(CoroutineExceptionHandler.kt:34)",
        "kotlinx.coroutines.experimental.StandaloneCoroutine.afterCompletion(Builders.kt:121)",
        "kotlinx.coroutines.experimental.JobSupport.completeUpdateState(Job.kt:419)",
        "kotlinx.coroutines.experimental.JobSupport.updateState(Job.kt:375)",
        "kotlinx.coroutines.experimental.AbstractCoroutine.resumeWithException(CoroutineScope.kt:92)",
        "kotlinx.coroutines.experimental.AbstractCoroutine.resumeWithException(CoroutineScope.kt:85)",
        "kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resumeWithException(CoroutineImpl.kt:59)",
        "kotlinx.coroutines.experimental.DispatchedContinuation.resumeWithException(CoroutineDispatcher.kt:165)",
        "kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resumeWithException(CoroutineImpl.kt:59)",
        "kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resumeWithException(CoroutineImpl.kt:59)",
        "kotlinx.coroutines.experimental.DispatchedContinuation.resumeWithException(CoroutineDispatcher.kt:165)",
        "kotlin.coroutines.experimental.SafeContinuation.resumeWithException(SafeContinuationJvm.kt:70)",
        "org.jetbrains.research.kotoed.util.CoroutineUtilKt$vxa$1$1.handle(CoroutineUtil.kt:48)",
        "org.jetbrains.research.kotoed.util.CoroutineUtilKt$vxa$1$1.handle(CoroutineUtil.kt)",
        "io.vertx.core.eventbus.impl.EventBusImpl.lambda$convertHandler$1(EventBusImpl.java:334)",
        "io.vertx.core.eventbus.impl.HandlerRegistration.deliver(HandlerRegistration.java:212)",
        "io.vertx.core.eventbus.impl.HandlerRegistration.handle(HandlerRegistration.java:191)",
        "io.vertx.core.eventbus.impl.EventBusImpl.lambda$deliverToHandler$3(EventBusImpl.java:505)",
        "io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:324)",
        "io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)",
        "io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)",
        "io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:445)",
        "io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)",
        "java.lang.Thread.run(Thread.java:748)"
    ]
}

Consider using https://github.com/babel/babel-preset-env

Original report by Kirill Gagarski (Bitbucket: gagarski, GitHub: gagarski).


[ERROR] warning [email protected]: We're really excited that you're trying to use ES2017 syntax, but instead of making more yearly presets, Babel has a better preset that we recommend you use instead: npm install babel-preset-env --save-dev. Give us a follow @babeljs to get more updates
[ERROR] warning [email protected]: We're really excited that you're trying to use ES2016 syntax, but instead of making more yearly presets, Babel has a better preset that we recommend you use instead: npm install babel-preset-env --save-dev. Give us a follow @babeljs to get more updates
[ERROR] warning There appears to be trouble with your network connection. Retrying...

Exception from JParsec when searching for single backslash

Original report by Kirill Gagarski (Bitbucket: gagarski, GitHub: gagarski).


2017-09-01T02:42:26.637 ERROR [org.jetbrains.research.kotoed.util.UnconfinedWithExceptions] - Exception caught while handling message:
{"filter":"document matches \"\\\"","find":{},"joins":[{"field":"author_id","key":null,"query":{"filter":null,"find":{},"joins":[],"limit":null,"offset":null,"table":"denizen"},"result_field":"author"}],"limit":20,"offset":0,"table":"submission_comment_text_search"} sent to kotoed.db.submission_comment_text_search.query
org.jparsec.error.ParserException: line 1, column 21:
" expected, EOF encountered.
	at org.jparsec.ScannerState.run(ScannerState.java:80) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jparsec.Parser$Mode$1.run(Parser.java:859) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jparsec.Parser.parse(Parser.java:830) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jparsec.Parser.parse(Parser.java:807) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jetbrains.research.kotoed.db.condition.lang.ConditionKt.parseCondition(Condition.kt:84) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jetbrains.research.kotoed.db.CrudDatabaseVerticle$handleQuery$1$2.invoke(DbVerticle.kt:294) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jetbrains.research.kotoed.db.CrudDatabaseVerticle$handleQuery$1$2.invoke(DbVerticle.kt:118) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jetbrains.research.kotoed.db.DatabaseVerticle$dbWithTransaction$1$1.invoke(DbVerticle.kt:108) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jetbrains.research.kotoed.db.DatabaseVerticle$dbWithTransaction$1$1.invoke(DbVerticle.kt:33) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jetbrains.research.kotoed.db.DatabaseVerticle$withTransaction$1.run(DbVerticle.kt:63) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jooq.impl.DefaultDSLContext.lambda$transactionResult0$0(DefaultDSLContext.java:468) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jooq.impl.Tools$10$1.block(Tools.java:3291) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3323) ~[na:1.8.0_121]
	at org.jooq.impl.Tools$10.get(Tools.java:3288) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]
	at org.jooq.impl.DefaultDSLContext.transactionResult0(DefaultDSLContext.java:505) ~[kotoed-server-0.1.0-SNAPSHOT-fat.jar:na]

Some hack for updating static files without rebuilding and redeloying

Original report by Kirill Gagarski (Bitbucket: gagarski, GitHub: gagarski).


Now static files are packed to fat JAR and served by VertX from there (unpacked to VertX cache folder). This is fine but it takes long time to build and redeploy the whole project to update a couple of JS files.

The following might help:

  1. Disable browser caching for static files while in debug mode.
  2. Add script that webpacks front-end module and injects target into VertX file cache (this is ugly but OK for debugging purposes).
  3. Maybe adopt webpack --watch together with 2
  4. Use the same technique for templates (might not work because of compiled template caching)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.