Repository navigation
DO NOT MERGE: Unexpected error help - #4716
Closed
erikerikson wants to merge 9 commits into
Closed
erikerikson wants to merge 9 commits into
erikerikson wants to merge 9 commits into
Conversation
1. Add a "PromiseTracker" to the Variables class. It provides tracking and reporting of pending variable resolutions during service populations. 2. Decompose populateObject and populateProperty into smaller pieces that are easier to understand. 3. Additionally, remove the immediate recursive resolution of variables, recursing only at the Object or Property entry point (when changes have been made). This avoids a problem where the resolved value, prior to being replaced in the containing object or value refers to itself and thereby is waiting on its own resolution before it will resolve itself. 4. Return the given value in warnIfNotFound so that it can chain.
``` ... $ npm run test-bare > [email protected] test-bare ... > node bin/test Variables #populateObject() significant variable usage corner cases file reading cases √ should reject population of an attribute not exported from a file 1) "after each" hook 1 passing (127ms) 1 failing 1) Variables #populateObject() significant variable usage corner cases file reading cases "after each" hook: Uncaught ServerlessError: Invalid variable syntax when referencing file "simple.js". Check if your javascript is returning the correct data. at getDeepValue.then (lib\classes\Variables.js:494:39) at tryCatcher (node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (node_modules\bluebird\js\release\promise.js:512:31) at Promise._settlePromise (node_modules\bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (node_modules\bluebird\js\release\promise.js:614:10) at Promise._settlePromises (node_modules\bluebird\js\release\promise.js:693:18) at Async._drainQueue (node_modules\bluebird\js\release\async.js:133:16) at Async._drainQueues (node_modules\bluebird\js\release\async.js:143:10) at Immediate.Async.drainQueues (node_modules\bluebird\js\release\async.js:17:14) 1 passing (129ms) 1 failing 1) Variables #populateObject() significant variable usage corner cases file reading cases "after each" hook: Uncaught ServerlessError: Invalid variable syntax when referencing file "simple.js". Check if your javascript is returning the correct data. at getDeepValue.then (lib\classes\Variables.js:494:39) at tryCatcher (node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (node_modules\bluebird\js\release\promise.js:512:31) at Promise._settlePromise (node_modules\bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (node_modules\bluebird\js\release\promise.js:614:10) at Promise._settlePromises (node_modules\bluebird\js\release\promise.js:693:18) at Async._drainQueue (node_modules\bluebird\js\release\async.js:133:16) at Async._drainQueues (node_modules\bluebird\js\release\async.js:143:10) at Immediate.Async.drainQueues (node_modules\bluebird\js\release\async.js:17:14) npm ERR! Windows_NT 10.0.16299 npm ERR! argv "...\node.exe" "...\node_modules\npm\bin\npm-cli.js" "run" "test-bare" npm ERR! node v6.11.4 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! [email protected] test-bare: `node bin/test` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] test-bare script 'node bin/test'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the serverless package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node bin/test npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs serverless npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls serverless npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! ...\npm-debug.log ```
Contributor
Author
|
What dumb thing am I doing? |
Contributor
Author
|
totally my f-up. sorry. |
Contributor
Author
|
unfortunately, my f-up was thinking this was my f-up. it is now ridiculously traced and it is acting as expected. I have removed everything that can be removed. |
This was referenced Feb 4, 2018
Contributor
Author
|
Was chasing a bad interaction between BbPromise.reduce and chai. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE
What did you implement:
This demonstrates an unexpected error for the purpose of obtaining help.
I've added
~/lib/classes/my.test.jsthat contains a single, simple test of a promise rejection.That test fails unexpectedly with odd results. The test itself succeeds. The afterEach call following that fails giving the reason of the expected rejection from the succeeding test as the basis of the failure.
related to: #4687