Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@ NOTES ON TESTING
----------------
Adding "?debug=1" shows how all changesets were identified, and shows what changesets Bugherder decided were affected by a backout.

Adding "?remap=1" allows you to divert output to the bzapi sandbox bugzilla at [landfill.bugzilla.org](https://://landfill.bugzilla.org/bzapi_sandbox/).
If you use this option, you will be presented with a table of all the bugs associated with changesets. You can then enter a bug number from bzapi that output will be sent to. You don't need to enter a new bug number for every single bug shown, but only those you do enter will be transmitted, other bugs will be ignored.

Bugherder will not check the existence of any bugs you enter - be careful! Each bug number entered must be unique - that **will** be checked, as apparently I can't follow my own instructions. You will probably want to review the pushlog - if the push for the only bug you entered was backed out, then nothing will be sent.

When testing target milestone setting, the equivalent bug in landfill must be filed in the *mcMerge Test Product* product, or the submission will fail.

There are various checkbox options at the bottom of the screen:
* an option to add [inbound] to some random bug whiteboards, to allow you to test it's removal on submission
* an option to add checkin-needed to some random bug whiteboards, to allow you to test it's removal on submission. Be careful of bugs with additional keywords - if they are not defined on landfill (and they probably won't be), the submission will fail
* an option to throw up an alert - hacky, I know - partway through the submission process, to allow you to jump over to the landfill bug, and mid-air Bugherder
* a useful option to ignore the real bug status, and set it to NEW, as you will likely be working with historic pushlogs when testing

If you do not enter any diversion bugs on the remap page, you will return to live mode, with changes going to [bugzilla.mozilla.org](https://bugzilla.mozilla.org/).


Running the Node.js static server locally
-----------------------------------------
Expand Down
1 change: 0 additions & 1 deletion bugherder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<script type="text/javascript" src="js/FlagLoader.js"></script>
<script type="text/javascript" src="js/ConfigurationData.js"></script>
<script type="text/javascript" src="js/BugData.js"></script>
<script type="text/javascript" src="js/Remapper.js"></script>
<script type="text/javascript" src="js/bugherder.js"></script>
<title>Bugherder</title>
</head>
Expand Down
169 changes: 0 additions & 169 deletions bugherder/js/Remapper.js

This file was deleted.

36 changes: 4 additions & 32 deletions bugherder/js/Step.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ function Step(name, callbacks, isBackout) {
this.statusChangeBugs = [];
this.haveComment = [];

var options = {};
if (Step.remaps.items > 0) {
options.url = "https://bugzilla-dev.allizom.org/rest";
}
this.unprivilegedLoader = bz.createClient(options);

constructAttachedBugs(false);
if (this.hasBackouts)
constructAttachedBugs(true);
Expand Down Expand Up @@ -186,9 +180,6 @@ Step.prototype.createBug = function Step_createBug(bugID, info) {
bug.flags[0].id = BugData.bugs[bugID].testsuiteFlagID;
}

if (bugID in Step.remaps) {
bug.id = Step.remaps[bugID];
}
return bug;
}

Expand All @@ -199,13 +190,11 @@ Step.prototype.createBug = function Step_createBug(bugID, info) {
Step.prototype.constructData = function Step_constructData() {
this.sendData = [];
for (var bug in this.bugInfo) {
if (Step.remaps.items == 0 || bug in Step.remaps) {
var info = this.bugInfo[bug];
var data = this.createBug(bug, info);
var info = this.bugInfo[bug];
var data = this.createBug(bug, info);

if (data)
this.sendData.push(data);
}
if (data)
this.sendData.push(data);
}
};

Expand All @@ -216,7 +205,6 @@ Step.prototype.onSubmitError = function Step_onSubmitError(where, msg, i) {
// - an invalid api key was supplied
// - the bug we were trying to load is a security bug (shouldn't happen, unless someone
// changed the bug underneath us after the initial bug data load)
// - a tester remapped to a non-existant bug on landfill, (they should know better :))
// If we've failed trying to get the time/token on our very first bug, let's just put it
// down to api key, and abandon this submit attempt
// If we failed in the i-1th bug too, again abandon all hope. (Did you change your password while bugherder was working?!?)
Expand Down Expand Up @@ -339,10 +327,6 @@ Step.prototype.getLastChangeAndToken = function Step_getLastChangeAndToken(i, ca


Step.prototype.submit = function Step_submit(i) {
// we start with an utterly unsophisticated hack for debugging/testing
if (Step.remaps.items > 0 && Step.remaps.midair)
alert('MID-AIR TIME!');

var self = this;
var callback = function Step_submitCallback(errmsg, data) {
if (errmsg)
Expand All @@ -368,16 +352,6 @@ Step.prototype.postSubmit = function Step_postSubmit(i) {
this.sent.push(sent);
var bugID = sent.id;

// If we were in remapping mode, we need to reverse the mapping!
for (var k in Step.remaps) {
if (k == 'items')
continue;
if (Step.remaps[k] == bugID) {
bugID = k;
break;
}
}

var info = this.bugInfo[bugID];

// Disallow resolving if we just resolved the bug
Expand Down Expand Up @@ -1014,8 +988,6 @@ Step.prototype.getHelpText = function Step_getHelpText() {
if (this.statusChangeBugs.length > 0 && Config.treeInfo[Config.treeName].unconditionalFlag)
helpText += '<br>- Submitted bugs will have ' + bugherder.statusFlag + ' set to "fixed"';

if (Step.remaps && 'items' in Step.remaps && Step.remaps.items > 0)
helpText += '<br><strong>Note: You are in debug mode. Only remap bugs will be submitted, and will be submitted to landfill.bugzilla.org!</strong>';
return helpText;
};

Expand Down
3 changes: 1 addition & 2 deletions bugherder/js/ViewerController.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"use strict";

var ViewerController = {
init: function vc_Init(remap, resume) {
this.remap = remap;
init: function vc_Init(resume) {
this.currentStep = -1;
this.maxStep = -1;
this.steps = [];
Expand Down
19 changes: 2 additions & 17 deletions bugherder/js/bugherder.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var bugherder = {
debug: false,
expand: false,
milestone: null,
remap: false,
resume: false,
tree: null,
trackingFlag: null,
Expand Down Expand Up @@ -376,25 +375,13 @@ var bugherder = {
return;
}

this.remaps = {items: 0};

if (this.remap)
Remapper.show();
else
this.showSteps();
},


onRemap: function mcM_onRemap(remaps) {
this.remaps = remaps;
this.showSteps();
},


showSteps: function mcM_showSteps() {
Step.remaps = this.remaps;
Viewer.expand = this.expand;
ViewerController.init(this.remap, this.resume);
ViewerController.init(this.resume);
Viewer.init();

// How many stages do we have?
Expand Down Expand Up @@ -471,8 +458,6 @@ var bugherder = {
this.debug = (paramsObj['debug'][0] == '1');
if ('expand' in paramsObj)
this.expand = (paramsObj['expand'][0] == '1');
if ('remap' in paramsObj)
this.remap = (paramsObj['remap'][0] == '1');
if ('resume' in paramsObj)
this.resume = (paramsObj['resume'][0] == '1');

Expand Down Expand Up @@ -538,7 +523,7 @@ var bugherder = {
}

// Maintain various parameters across page loads
var persisted = ['debug', 'expand', 'remap', 'resume'];
var persisted = ['debug', 'expand', 'resume'];
persisted.forEach(persist, this);

var newURL = document.location.href.split('?')[0];
Expand Down
1 change: 0 additions & 1 deletion test/SpecRunner.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<script type="text/javascript" src="../bugherder/js/FlagLoader.js"></script>
<script type="text/javascript" src="../bugherder/js/ConfigurationData.js"></script>
<script type="text/javascript" src="../bugherder/js/BugData.js"></script>
<script type="text/javascript" src="../bugherder/js/Remapper.js"></script>
<script type="text/javascript" src="../bugherder/js/bugherder.js"></script>

<!-- include your test files here... -->
Expand Down