{ "id": "98227", "key": "TIMOB-10215", "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": "13872", "description": "", "name": "Sprint 2012-16 Core", "archived": true, "released": true, "releaseDate": "2012-08-13" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-08-22T11:13:26.000+0000", "created": "2012-07-27T14:12:26.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "core", "qe-port" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2012-12-08T00:52:35.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": "10207", "name": "Tooling" } ], "description": "A runtime error can occur during JSCA file creation (a late step in the SDK build process) and yet not stop the build. This means that the SDK can then be packaged (zipped up) with a faulty .jsca file, which of course should not be allowed.\r\n\r\nInstead, if the JSCA file creation process contains an error, the build should fail hard.\r\n\r\nh3. Fail case / test case\r\n\r\n1. Open apidoc/Titanium/Titanium.yml in a text editor.\r\n2. Put a space before \"name: Titanium\" (i.e, put a space at the beginning of that line.) Of course that space does not belong there, but we're breaking the file on purpose.\r\n3. Save the file.\r\n4. Run {{python apidoc/docgen.py -f jsca}}. You'll see a runtime error fly by. This is just proof that there is something wrong with the JSCA file creation.\r\n5. Run {{scons}}. One of the last steps of the scons process will be \"Generating JSCA...\".\r\n6. In the fail case, the build will still say it succeeded, and the zip file will be packaged as if nothing happened.\r\n7. When testing the fix, the build *should fail* since an error is occurring (though not visible) during the JSCA file creation.\r\n8. Check in dist/ folder when the build fails: the relevant zip(s) should not be there.", "attachment": [], "flagged": false, "summary": "Tooling: SDK build should fail outright if JSCA file creation has a runtime error", "creator": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium SDK sources (titanium_mobile). Desktop OS is irrelevant.", "comment": { "comments": [ { "id": "213096", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR ready:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/2688", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-07T06:28:18.000+0000", "updated": "2012-08-07T06:28:18.000+0000" }, { "id": "213618", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "2_1_X PR:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/2707", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-09T12:18:48.000+0000", "updated": "2012-08-09T12:18:48.000+0000" }, { "id": "213762", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Shoulda been closed when 2_1_X PR went in.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-10T08:02:19.000+0000", "updated": "2012-08-10T08:02:19.000+0000" }, { "id": "215167", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 2_1_X\r\nAn -osx.zip still being created.\r\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-20T11:37:13.000+0000", "updated": "2012-08-20T11:37:13.000+0000" }, { "id": "215175", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here is the log:\r\n\r\n\r\nBUILD SUCCESSFUL\r\nTotal time: 8 minutes 14 seconds\r\nscons: Reading SConscript files ...\r\nscons: done reading SConscript files.\r\nscons: Building targets ...\r\npackage_sdk([\"dummy-sdk-target\"], [])\r\nPackaging MobileSDK (2.1.2)...\r\nGenerating JSCA...\r\n/usr/bin/python /Users/oromero/fromgit/titanium_mobile/apidoc/docgen.py -f jsca --stdout\r\nFailed to generate JSCA JSON. Output:\r\n[INFO] Parsing YAML files\r\n[ERROR] Exception occurred while processing /Users/oromero/fromgit/titanium_mobile/apidoc/Titanium/Titanium.yml:\r\nTraceback (most recent call last):\r\n File \"/Users/oromero/fromgit/titanium_mobile/apidoc/docgen.py\", line 614, in \r\n main()\r\n File \"/Users/oromero/fromgit/titanium_mobile/apidoc/docgen.py\", line 606, in main\r\n process_yaml()\r\n File \"/Users/oromero/fromgit/titanium_mobile/apidoc/docgen.py\", line 189, in process_yaml\r\n types = load_one_yaml(filepath)\r\n File \"/Users/oromero/fromgit/titanium_mobile/apidoc/docgen.py\", line 150, in load_one_yaml\r\n types = [the_type for the_type in yaml.load_all(f)]\r\n File \"build/bdist.macosx-10.8-intel/egg/yaml/__init__.py\", line 82, in load_all\r\n File \"build/bdist.macosx-10.8-intel/egg/yaml/constructor.py\", line 28, in check_data\r\n File \"build/bdist.macosx-10.8-intel/egg/yaml/composer.py\", line 18, in check_node\r\n File \"build/bdist.macosx-10.8-intel/egg/yaml/parser.py\", line 98, in check_event\r\n File \"build/bdist.macosx-10.8-intel/egg/yaml/parser.py\", line 174, in parse_document_start\r\nyaml.parser.ParserError: expected '', but found ''\r\n in \"/Users/oromero/fromgit/titanium_mobile/apidoc/Titanium/Titanium.yml\", line 3, column 1\r\n\r\nscons: *** [dummy-sdk-target] Explicit exit, status 1\r\nscons: building terminated because of errors.\r\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-20T11:45:26.000+0000", "updated": "2012-08-20T11:45:26.000+0000" }, { "id": "215182", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "It's not relevant if a partial .zip is there. The important thing is the build stopped running with an error. (You can compare it to older versions.)\r\n\r\nI've added a line to the instructions (very bottom) to reinforce it, however.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-20T12:03:40.000+0000", "updated": "2012-08-20T12:03:40.000+0000" }, { "id": "215190", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Actually, ignore me. I don't trust that our jenkins scripts will respect the exit code, so I'm going to change this to forcibly delete the zip. Standby.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-20T12:18:48.000+0000", "updated": "2012-08-20T12:18:48.000+0000" }, { "id": "215197", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Follow-up PR is ready:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/2783\r\n\r\nSomeone from Platform Engineering will likely be assigned this tomorrow, then after that (assuming it gets merged) QE can take their new look as well.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-20T13:51:13.000+0000", "updated": "2012-08-20T13:51:13.000+0000" }, { "id": "230538", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed.\nTested with:\nTitanium Studio, build: 3.0.0.201211301903\nTitanium SDK, build 3.0.0.v20121207103200\n\nThanks Bill", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-08T00:51:58.000+0000", "updated": "2012-12-08T00:51:58.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }