Conversation
|
plase update tests/test_*.nit |
| *.orig | ||
| db_loader_serial.nit | ||
| out/ | ||
| db/ |
There was a problem hiding this comment.
we still need to ignore the directory I think
| *.orig | ||
| db_loader_serial.nit | ||
| out/ | ||
| db/ |
There was a problem hiding this comment.
we still need to ignore the db generated files
|
the PR is huge. If you do not plan to split it, could you explain what you did exactly? |
|
45 files changed, 3 commits... seriously? |
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
|
TODO:
|
|
Done |
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
| RUN apt-get update && apt-get install -y libevent-dev libssl-dev libsasl2-dev libcurl4-openssl-dev file libsqlite3-dev | ||
|
|
||
| # Install mongo-c-driver manually since it is not available in Debian/jessie | ||
| RUN curl -L https://github.com/mongodb/mongo-c-driver/releases/download/1.4.0/mongo-c-driver-1.4.0.tar.gz -o mongo-c-driver-1.4.0.tar.gz \ |
There was a problem hiding this comment.
Mongo-c-driver is no longer required if sqlite is used .
There was a problem hiding this comment.
It should not be, but there seems to be some import somewhere at the moment which prevents us from compiling when mongoc is unavailable, so we left it for now
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org> Reviewed-by: Istvan SZALAÏ <istvan.szalai@savoirfairelinux.com>
|
OK, for the explanation of what is happening here, the new model is articulated around a few things:
This should sum-up the differences, if there are any questions left, feel free to ask. |
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org> Reviewed-by: Istvan SZALAÏ <istvan.szalai@savoirfairelinux.com>
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org> Reviewed-by: Istvan SZALAÏ <istvan.szalai@savoirfairelinux.com>
src/api/api_auth_shibuqam.nit
Outdated
|
|
||
| # The *code permanent* (or the uid for non student) | ||
| var id: String | ||
| var slug: String |
src/api/api_auth.nit
Outdated
| # | ||
| # Helper method to use when a new account is created. | ||
| fun register_new_player(player: Player) | ||
| fun register_new_player(ctx: DBContext, player: Player) |
| end | ||
|
|
||
| redef class HttpRequest | ||
| var ctx: DBContext is lazy do return new DBContext |
src/model/submissions.nit
Outdated
| return res | ||
| end | ||
|
|
||
| redef fun insert do |
There was a problem hiding this comment.
factorize the insert/update/whatever with the "template method" design pattern™ by extracting the query part
| # Create a dummy user | ||
| var player = new Player("John", "Doe") | ||
| config.players.save player | ||
| with ctx = new DBContext do |
| </div> | ||
| <mission-submit mission='missionCtrl.mission' mission-status='missionCtrl.missionStatus' | ||
| ng-if='missionCtrl.playerId' /> | ||
| ng-if='missionCtrl.playerId && missionCtrl.missionStatus.status != "locked"' /> |
There was a problem hiding this comment.
We'll add some debug/god mode someday for this.
| <h5>{{notification.object}}</h5> | ||
| <p class='text-muted'> | ||
| {{notification.timestamp * 1000 | date: 'dd, MMM, yyyy HH:MM:ss a'}} | ||
| </p> |
src/model/missions.nit
Outdated
| var solve_reward: Int = 0 is writable, serialize_as("reward") | ||
| var path: String = "" is writable | ||
| # Template for the source code | ||
| var template: nullable String = null is writable |
|
mission tree is broken |
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org> Reviewed-by: Istvan SZALAÏ <istvan.szalai@savoirfairelinux.com>
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org> Reviewed-by: Istvan SZALAÏ <istvan.szalai@savoirfairelinux.com>
|
+1 |
|
@R4PaSs: I would definitely expect some benchmarks explaining why we have to endure this 1500 lines addon :) |
tests/test_nitc.nit
Outdated
|
|
||
| # clean bd | ||
| config.db.drop | ||
| #config.db.drop |
tests/test_nitc.nit
Outdated
|
|
||
| # Load nit | ||
| config.load_track("tracks/nit") | ||
| #config.load_track("tracks/nit") |
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org> Reviewed-by: Istvan SZALAÏ <istvan.szalai@savoirfairelinux.com>
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org> Reviewed-by: Istvan SZALAÏ <istvan.szalai@savoirfairelinux.com>
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Signed-off-by: Philippe Pepos Petitclerc <ppeposp@gmail.com>
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
05115cf to
39d1390
Compare
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org> Reviewed-by: Istvan SZALAÏ <istvan.szalai@savoirfairelinux.com>
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org> Reviewed-by: Istvan SZALAÏ <istvan.szalai@savoirfairelinux.com>
 Big PR here, this should make the transition from a MongoDB model to the famed SQL model. The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work. Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here. Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/morriar/missions/158) <!-- Reviewable:end --> Pull-Request: #158 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org> Reviewed-by: Istvan SZALAÏ <istvan.szalai@savoirfairelinux.com>
Big PR here, this should make the transition from a MongoDB model to the famed SQL model.
The code base being large, there might be some parts of the application that might break, but from the last checks I did, most of the app should work.
Some parts, like achievements may need a bit of an overhaul to make it production-ready, but the base is here.
Note: I know the login redirect is semi-broken, I'll check to fix it, in the meantime, you are more than encouraged to take a look at the code :)
This change is