Skip to content

Conversation

@zyoung51
Copy link
Contributor

  • Add 'tags' to nodes to identify groups of nodes by arbitrary tag names
  • Add 1.1 and 2.0 paths for new /nodes and /tags routes.

return nodes.getNodesByTag(req.swagger.params.tagName.value);
});

var postWorkflowById = controller({success: 202}, function(req, res) {

Choose a reason for hiding this comment

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

'res' is defined but never used.

Choose a reason for hiding this comment

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

'res' is defined but never used.

Choose a reason for hiding this comment

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

'res' is defined but never used.

Choose a reason for hiding this comment

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

'res' is defined but never used.

@zyoung51
Copy link
Contributor Author

@RackHD/corecommitters @uppalk1 @keedya @tannoa2
Depends on RackHD/on-core#88, RackHD/on-taskgraph#62

@JenkinsRHD
Copy link
Contributor

*** BUILD #400 ***
Test Name: Http.Api.Tags "before all" hook: start HTTP server
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
    at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
    at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
    at spec/lib/api/1.1/tags-spec.js:41:19
    at b (domain.js:183:18)
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

Test Name: Http.Api.Tags "after all" hook: stop HTTP server
Error Details: Cannot read property 'find' of undefined
Stack Trace: TypeError: Cannot read property 'find' of undefined
    at spec/lib/api/1.1/tags-spec.js:62:27
    at b (domain.js:183:18)
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

}
}));

router.delete('/nodes/:identifier/tags/:name', rest(function(req) {
Copy link
Member

Choose a reason for hiding this comment

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

need annotations, v1.1 api apidoc, and python-client is based on router's annotations.

@WangWinson
Copy link
Contributor

General question, does add new API route cause a API version bump ?

@anhou
Copy link
Member

anhou commented Feb 19, 2016

👍 after fix annotation, unused 'res', travisCI failure, and if others have no concerns about promise assertion

@jlongever
Copy link
Contributor

test this please

@JenkinsRHD
Copy link
Contributor

*** BUILD #409 ***

@zyoung51
Copy link
Contributor Author

@RackHD/corecommitters Can you answer Winson's question above?

@jlongever
Copy link
Contributor

@WangWinson

http://rackhd.readthedocs.org/en/latest/devguide/index.html#api-versioning-conventions

Specifically:

8.3.3. API Version Guidelines
Use the following guide lines when determining if a new API version is needed.

The following changes require a new API version:

  • changing the semantic meaning of a URI route
  • removing a URI route

The following changes do not require a new API version:

  • adding an entirely new URI route
  • changing the query parameters (pagination, filtering, etc.) accepted by the URI route
  • changing the return values on error conditions
  • changing the data structure for a resource at a given URI

@jlongever
Copy link
Contributor

test this please

var controller = injector.get('Http.Services.Swagger').controller;
var nodes = injector.get('Http.Services.Api.Nodes');
var tags = injector.get('Http.Services.Api.Tags');
var _ = injector.get('_');

Choose a reason for hiding this comment

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

Redefinition of '_'.

@zyoung51 zyoung51 force-pushed the feature/node-tagging branch from c91e39d to a751e01 Compare February 19, 2016 19:34
@JenkinsRHD
Copy link
Contributor

*** BUILD #416 ***
Test Name: Http.Api.Tags "before all" hook: start HTTP server
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
    at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
    at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
    at spec/lib/api/1.1/tags-spec.js:41:19
    at b (domain.js:183:18)
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

Test Name: Http.Api.Tags "after all" hook: stop HTTP server
Error Details: Cannot read property 'find' of undefined
Stack Trace: TypeError: Cannot read property 'find' of undefined
    at spec/lib/api/1.1/tags-spec.js:62:27
    at b (domain.js:183:18)
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

@JenkinsRHD
Copy link
Contributor

*** BUILD #417 ***
Test Name: Http.Api.Config v2.0 "before all" hook: start HTTP server
Error Details: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.
Stack Trace: Error: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.
    at b (domain.js:183:18)
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

Test Name: Http.Api.Tags "before all" hook: start HTTP server
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
    at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
    at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
    at spec/lib/api/1.1/tags-spec.js:41:19
    at b (domain.js:183:18)
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

Test Name: Http.Api.Tags "after all" hook: stop HTTP server
Error Details: Cannot read property 'find' of undefined
Stack Trace: TypeError: Cannot read property 'find' of undefined
    at spec/lib/api/1.1/tags-spec.js:62:27
    at b (domain.js:183:18)
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

@WangWinson
Copy link
Contributor

Thanks @jlongever
👍

@jlongever
Copy link
Contributor

@zyoung51 assuming unit-test failures are due to on-core dependency: RackHD/on-core#88.

+1 when conflicts resolved.

Zack Young added 2 commits February 23, 2016 06:00
- Add 'tags' to nodes to identify groups of nodes by arbitrary tag names
- Add 1.1 and 2.0 paths for new /nodes and /tags routes.
@zyoung51 zyoung51 force-pushed the feature/node-tagging branch from a751e01 to 189e3f7 Compare February 23, 2016 14:32
@jlongever
Copy link
Contributor

test this please

@jlongever jlongever mentioned this pull request Feb 26, 2016
@jlongever
Copy link
Contributor

Closing this PR, new PR here resolving merge conflicts #154

@jlongever jlongever closed this Feb 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants