loopbackio / loopback-connector-redis

EXPERIMENTAL: Redis connector for LoopBack.
http://loopback.io/doc/en/lb2/Redis-connector.html
Other
36 stars 46 forks source link

Empty result returns error to use for 404 #35

Closed penguinpowernz closed 7 years ago

penguinpowernz commented 8 years ago

This a duplicate of #32 on which I screwed the rebase.

slnode commented 8 years ago

Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."

slnode commented 8 years ago

Can one of the admins verify this patch?

slnode commented 8 years ago

Can one of the admins verify this patch?

jannyHou commented 8 years ago

@slnode test please

jannyHou commented 8 years ago

@penguinpowernz The pr is still out-of-date. You can try this on your local:

  1. git checkout master
  2. git pull
  3. git checkout your_branch_name
  4. git rebase -i master
  5. Hopefully no merge conflict to solve. Done.

I find a test failure, PTAL too. Thanks.

1) when a model does not exist should return an error: Error: No objects found at D:\workspace\loopback-connector-redis\68dfec3a\lib\redis.js:9:38523 at D:\workspace\loopback-connector-redis\68dfec3a\lib\redis.js:9:7422 at D:\workspace\loopback-connector-redis\68dfec3a\lib\redis.js:9:6448 at try_callback (D:\workspace\loopback-connector-redis\68dfec3a\node_modules\redis\index.js:592:9) at RedisClient.return_reply (D:\workspace\loopback-connector-redis\68dfec3a\node_modules\redis\index.js:685:13) at ReplyParser. (D:\workspace\loopback-connector-redis\68dfec3a\node_modules\redis\index.js:321:14) at ReplyParser.send_reply (D:\workspace\loopback-connector-redis\68dfec3a\node_modules\redis\lib\parser\javascript.js:300:10) at ReplyParser.execute (D:\workspace\loopback-connector-redis\68dfec3a\node_modules\redis\lib\parser\javascript.js:211:22) at RedisClient.on_data (D:\workspace\loopback-connector-redis\68dfec3a\node_modules\redis\index.js:547:27) at Socket. (D:\workspace\loopback-connector-redis\68dfec3a\node_modules\redis\index.js:102:14) at readableAddChunk (_stream_readable.js:153:18) at Socket.Readable.push (_stream_readable.js:111:10) at TCP.onread (net.js:536:20)

cc @superkhau

superkhau commented 8 years ago

@jannyHou We should start enabling tests for this repo again. I landed/closed all stale PRs and triaged all the issues, this connector should be stable enough now.

superkhau commented 8 years ago

@penguinpowernz I think you should try again rebasing again. You shouldn't see the ESLint changes on your PR.

superkhau commented 8 years ago

@penguinpowernz Are you still working on this?

penguinpowernz commented 8 years ago

Yes sorry haven't had much time yet, will finish this off in the next few days.

penguinpowernz commented 7 years ago

OK so I did the steps that @jannyHou suggested, and there were merge conflicts which I was able to resolve without too much hassle. But now when I try to push I get the following error:

To git@github.com:penguinpowernz/loopback-connector-redis.git
 ! [rejected]        penguinpowernz-patch-1 -> penguinpowernz-patch-1 (non-fast-forward)
error: failed to push some refs to 'git@github.com:penguinpowernz/loopback-connector-redis.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Should I do a force push? Or pull and then push? If I pull I would wipe the rebase I just did right?

jannyHou commented 7 years ago

@penguinpowernz I am not sure about the situation on your side, usually you need to git push -f after you rebase your code and resolve conflict. I suggest copy your good code somewhere then do try those git operations :)

penguinpowernz commented 7 years ago

OK moved to #42 and it looks good. Quick merge it before someone pushes something to master and I have to do that rebasing voodoo again lol :P