{ "id": "131057", "key": "TIMOB-17046", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-20T21:36:28.000+0000", "created": "2014-05-30T05:16:21.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_cli", "qe-testadded" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [ { "id": "37984", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "127507", "key": "TIMOB-16617", "fields": { "summary": "Collect simple Titanium API usage statistics", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2014-06-27T20:59:25.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "With the introduction of TIMOB-16617, we can now collect Titanium API usage, however the data generated is greater than 8KB which is causing issues when forking the analytics send process.\r\n\r\nThe Titanium CLI needs to move the sending of analytics from the {{process.on('exit')}} event to a callback that is fired after the command finishes.\r\n\r\nWe also need to rework node-appc's analytics library so that the parent process writes the analytics events to disk, then forks the analytics send process with the minimal amount of data.", "attachment": [], "flagged": false, "summary": "CLI: Analytics fails to send if event data greater than 8KB", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "closedSprints": [ { "id": 125, "state": "closed", "name": "2014 Sprint 12 Tooling", "startDate": "2014-06-12T20:52:39.611Z", "endDate": "2014-06-21T00:00:00.000Z", "completeDate": "2014-06-23T23:24:41.234Z", "originBoardId": 100 } ], "comment": { "comments": [ { "id": "306968", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "node-appc master pull request: https://github.com/appcelerator/node-appc/pull/93\r\n\r\nTitanium CLI master pull request: https://github.com/appcelerator/titanium/pull/139\r\nTitanium CLI 3_3_X pull request: https://github.com/appcelerator/titanium/pull/140\r\n\r\nTo test, *you MUST build a Titanium SDK that has TIMOB-16617*, then build an app for various platforms:\r\n\r\n{code}\r\nti build -p android --build-only --config {cli:{analytics:{debug:true}}}\r\nti build -p ios --build-only --config {cli:{analytics:{debug:true}}}\r\nti build -p mobileweb --build-only --config {cli:{analytics:{debug:true}}}\r\n{code}", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-05-30T06:04:35.000+0000", "updated": "2014-05-30T06:04:35.000+0000" }, { "id": "309597", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Analytics are sent, but:\r\n\r\n{{ti config}} no longer shows the cli.sendAPIUsage variable initially, though once you set it with {{ti config cli.sendAPIUsage true}} you see the variable with {{ti config}}\r\n\r\n{{ti config}} never exits, nor does {{ti sdk select}} or {{ti build}} You have to press Ctrl-C to break out. It doesn't matter if you add additional arguments (like doing {{ti config cli.sendAPIUsage true}} you still have to Ctrl-C out). \r\n\r\nAdding --config \\{cli:\\{analytics: \\{debug:true}}} doesn't seem to do anything. With or without it, I had to add the console.log(payload) statement to analytics.js as described in the earlier comment to see any analytics output. ", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-06-18T15:35:20.000+0000", "updated": "2014-06-18T15:35:20.000+0000" }, { "id": "309614", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~skypanther] As with all Titanium CLI config options, if the config option does not explicitly exist, then the default is used.\r\n\r\nJust to be clear, you need to running the Titanium CLI from git with my changes and then put the node-appc from git (plus my changes) in the Titanium CLI's node_modules directory and make sure the npm dependencies are installed:\r\n\r\n{code}\r\ngit clone git@github.com:appcelerator/node-appc.git\r\ncd node-appc\r\ngit checkout --track origin/timob-17046\r\nnpm install\r\n\r\ncd ..\r\n\r\ngit clone git@github.com:appcelerator/titanium.git\r\ncd titanium\r\ngit checkout --track origin/timob-17046_3_3_X\r\nnpm install\r\nrm -rf node_modules/node-appc\r\ncp -r ../node-appc node_modules/\r\nsudo npm link\r\n{code}\r\n\r\nNow you should be able to run the CLI and the analytics will be sent correctly.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-06-18T16:54:15.000+0000", "updated": "2014-06-18T16:54:15.000+0000" }, { "id": "310021", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "So generate larger than 8KB of data, you must use a TiSDK that includes the PR from TIMOB-16617 and do a production/dist build.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-06-19T20:55:41.000+0000", "updated": "2014-06-19T20:55:41.000+0000" }, { "id": "310276", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Works as described", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-06-20T21:36:28.000+0000", "updated": "2014-06-20T21:36:28.000+0000" }, { "id": "311399", "author": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on:\r\nMac OSX 10.9.3\r\nAppcelerator Studio, build: 3.3.0.201406231625\r\nTitanium SDK, build: 3.3.0.v20140627094114\r\nTitanium CLI, build: 3.3.0-rc3\r\nAlloy: 1.4.0-rc2\r\n\r\nUsed KitchenSink to generate and send large Analytic data.\r\nData sent successfully.\r\nClosing.", "updateAuthor": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-27T20:59:11.000+0000", "updated": "2014-06-27T20:59:11.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }