Skip to content

Conversation

ballinette
Copy link

@ballinette ballinette commented Mar 1, 2018

  • Added Server controller with the following methods:
    • adminExists()
    • getAllStats()
    • getConfig()
    • getLastStats()
    • getStats()
    • info()
    • now()

fix https://github.com/kuzzleio/kuzzle-backlog/issues/101

@codecov-io
Copy link

codecov-io commented Mar 1, 2018

Codecov Report

Merging #285 into 6.x will increase coverage by 2.27%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##              6.x    #285      +/-   ##
=========================================
+ Coverage   84.13%   86.4%   +2.27%     
=========================================
  Files          20      21       +1     
  Lines        1973    1957      -16     
=========================================
+ Hits         1660    1691      +31     
+ Misses        313     266      -47
Impacted Files Coverage Δ
src/Kuzzle.js 54.61% <100%> (+8.75%) ⬆️
src/Server.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f24bd9...b12a765. Read the comment docs.

Copy link
Contributor

@benoitvidis benoitvidis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need bluebird to promisify functions.
It would be simpler imo to directly modify query and its dependencies to return a promise (wip on my side)

@ballinette ballinette added the wip label Mar 13, 2018
@ballinette
Copy link
Author

@benoitvidis As explained in the PR's description, I let the bluebird's promisification for query here only to keep the whole code working until the refactoring is not totally finished yet:

If we modify first the query method, all methods that use it will be broken. So we have 2 options:

  • either have a broken code until we have rewriten all the SDK (and be sure we won't draft any new release before that)
  • or keep query as is for now and rewrite it at the final step of the refactoring.

I personally chose the 2nd option because IMHO, it's a better way for me to make sure each PR don't break methods that are still not rewritten...

# Conflicts:
#	src/Kuzzle.js
#	test/kuzzle/constructor.test.js
#	test/kuzzle/methods.test.js
#	webpack.config.js
@ballinette
Copy link
Author

ballinette commented Mar 16, 2018

@benoitvidis
Ok, since #288 has been merged and already contains the refactor of query method that you made, I moved to it in this one, and resovled merge conflicts.

@jenow you may want to review this PR again.

@ballinette ballinette added the wip label Mar 28, 2018
@ballinette
Copy link
Author

replaced by #290

@ballinette ballinette closed this Apr 25, 2018
@scottinet scottinet deleted the 101-server-controller branch June 29, 2018 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants