Community
Participate
Working Groups
Platform is not determined (under linux at least) when using the bugzilla component. It says that the platform and OS are other. (It works when I connect to bugzilla using the web browser).
It works for me. Did you hit "Update" to get the options updated, e.g. in the search dialog or the query edit dialog?
I was having the problem when I entered a new bug (not search or update), so I don't think there is an update button. It seems to be an issue on both Linux and Windows (at least on our Installs :)
The "Update" button is on the first page of the New Bug Wizard page. To address it being hard to notice I just changed the label to: "Update Options from Bugzilla Server". Please try this and let me know if you see the Platform options as expected.
Please reopen if this isn't working for you.
Still not working. I also tested it on Chris's Windows machine, and it doesn't work their either. This is by no means a show stopper. If you point me to the right file in Mylar (Where you look this information up) I can try and debug it for you.
Is this in the Bug Editor? I assume that you are using eclipse.org, and that you have your Bugzilla setting set to 2.18? If I look at the following bug in the bug editor: Bugzilla Bug 109311: migrate folding to 3.2M3 APIs I see Hardware as "PC" and OS as "Windows XP". Are you saying that this fails to show them, or that it fails to determine them automatically?
It works fine if I view existing bug reports. But if I select "Add New Bugzilla Report", and then select "Update Options from Bugzilla Server", and finally select "Mylar". Then hit "Next", the OS and Platform are not auto-determined. It just says "Other". I can select Linux and PC. This is done automatically when I add a bug through the web interface. -ian
Thanks, I hadn't understood the problem originally. I'm marking this as helpwanted, and in case you're interested in taking a look the NewBugWizard is what determines that. However, I doubt that this could be implemented the same way as in the browser, which sends environment variables of your platform. Instead it Eclipse or environment variables would probably have to be queried to determine that.
I will take a look at this. note: Platform.getOS(); Platform.getOSARCH();
Ok, I am getting somewhere with this, but I don't know the Bugzilla spec very well. Do you know if the list of platforms and OSs bugzilla has is documented anywhere? I have extracted the ones it "actually" returns, but I don't know if this is official, or if this changes often? If I can't find a match, I will just set it to other, so things should generaly work. But I would like to know what has to change whenever a new OS gets added to the bugzilla spec.
I am assigning this to me so it shows up in my task lists. I should have a patch ready for tomorrow. It won't work in all cases (There are lots of special cases, such as Linux vs. Linux-GTK), but it is a start. As more cases come up, it gives us a place to add them. If it can't figure out the OS / Platform, it just sets it to "Other". Is there a set of tests I should run before I send in the patch?
Great that you picked this up! I really dobut that there is a specified list, but I expect that the current list you got from eclipse.org Bugzilla is the default that Bugzila ships with, so it's a good start, and defaulting to "Other" is sensible. Before submtting the patch you should always run "AllTests", and double-check the instructions on http://eclipse.org/mylar/dev.php for other conventions. Also, each pastch should come with a small unit test. What you could do is add a unit test that grabs the current hardware/os version, then runs the part of the wizard that resolves it, and verifies that that part of the dialog is set correctly. It may seem a bit redundant, but it would catch that code breaking.
Created attachment 30104 [details] Patch to determine hardware WOW! I am having way too many problems with JUnit right now. I applied the patch and I got some failures. I removed the patch, and still got failures. I reinstalled and the failures went away, re-applied the patch, failures came back, tried again, and it worked, tried again and it failed! Added a comment, and it worked, added another comment and it failed. ok, you get the picture. I was running Eclipse under vmware on my linux box (while linux was still working away), So I there may be some timing issues. Anyways, I ran all the test cases on my linux box and everything passed, so I really don't think this patch is causing the problems. If someone else can try this patch on their system, that would be great. I haven't written a JUnit test for it yet, because there realy isn't that much in the patch. (Plus, JUnit is not my friend right now). I will try and do that after I get some "real" work done. The patch can should be applied to AbstractWizardDataPage. I don't know if this is the best place for this, so feel free to refactor.
Note about my previous post: When I said everything passed, it was everything except the 4 original linux failures (see Bug# 116751). Also, the problems I was having on VMware were errors, not failures.
What were the failures? We've had race conditions with running the test suite in the past that were resolved, but it's possible that one of them could get triggered by a very slow execution (e.g. vmware).
They did not seem to be consistent. That was part of the frustration. I will run it again tomorrow (when I get back to my machine). Are you allowed to touch the mouse / do other things while the tests are running?
Yes, you should be able to do anything, other than select or type directly into the running Eclipse. I'm in the process of hardening the suite some more to race conditions. Let's pick this up again tomorrow (but note that I'll be offline after 10am). But it would be great to get this sorted out and get the tests all running on Linux, so I appreciate the effort.
I applied the patch and ran all the tests on a Windows machine (not VMWare) and it ran without a problem. The patch is probably a good start for the Hardware / OS attribute bug. The test case needs some thought, because it will run different on each platform. The race conditions seem to be another issue. Do you want to open a bug for that (or re-open one if you said it happened before )?
So are you still seeing test failures on VMWare? The latest changes to the test suite should have addressed the race condition that was coming up before, but perhaps not all of them. I'd really like to apply this patch for 0.4.3, but before doing so need the test case described in comment#12 to be added to the patch. Also could you please make the new patch according to the convention documented at: http://eclipse.org/mylar/dev.php (i.e. for the project, name as the project). That makes it way easier to apply.
Re: Test Failures: Things are working much better now. I ran the test on VMWare, with Eclipse running on my linux side as well. I started illustrator part way through the test and everything worked like a charm. Re: Current Bug Report: Sorry I missed the patch specs. I will get that fixed up. I will try to get a test case together, but it may take me a while (I have to figure out how to programmatically run through the wizard). However, I don't actually use the wizard in my patch. I just change the value on Bug Model. Shawn already had code to populate the wizard based on the model. Although I agree that a test case that actually checks the wizard is probably a good idea.
Are you still getting the same test failures on Linux? In order to help demonstrate how to write these kinds of tests I've applied your patch and created NewBugWizardTest. If you just get the right version of those two assertions running we'll be in business, and whenever this fails to run on some platform we have a chance of detecting a failure, and more importantly if a failure is ever reported by someone we'll be able to update the test. Note that on my Windows machine it currently correctly determines "PC", but fails to determine that it's Windows ("win32"). Also note that I added exception handling to the method, because otherwise it's failure would have made the wizard fail.
Ian, let me know if you plan on adding this test so that we can close out this report. Fyi both setting work properly with Bugzilla 2.20 on Windows :)
Created attachment 30655 [details] Test Case The long awaited test case :) Actually, my original patch was a little too clever, and it checked that the platform / os value that was being set, was actually a legal value. It did this by comparing the list of possible values, with the determined one. This caused a few problems for the tester, because the tester doesn't know what "legal values" are. I used some code from another test case to determine this. The patch is attached.
Patch applied. I added you to the @author list. Thanks for contributing this Ian, it's useful to have it working.