Created attachment 2502 [details] no-machine-set.png To reproduce: 1. Remove the MACHINE variable from the meta-yocto/conf/toasterconf.json file 2. Set up Toaster from scratch 3. When prompted to select the configuration file, select the toasterconf.json you edited in step 1 4. Create a Toaster project Outcome: in the project page, the machine is not set. The 'change' icon does not work, and you can start a build. Expected outcome: a warning message should be displayed in the project page, and all build controls should be disabled.
Created attachment 2506 [details] Design - Handling incomplete project configurations
(In reply to comment #1) > Created attachment 2506 [details] > Design - Handling incomplete project configurations The problem with this design is that it requires any page where building is available to know the *current* project's configuration, if you have changed the configuration in another tab or another user has done so, then the only way to update the current state of the build feature is to poll for a configuration change (sadly we can't support websockets with django/wsgi). This is do-able but it's not fool proof, you can end up with a race condition where the page hasn't updated yet and a machine has been unset and then you're still able to trigger a build. I think the only fully reliable way would be to check at the point of clicking build and then provide feedback.
(In reply to comment #2) > (In reply to comment #1) > > Created attachment 2506 [details] > > Design - Handling incomplete project configurations > > > I think the only fully reliable way would be to check at the point of > clicking build and then provide feedback. Ugh: this would be bit ugly. Let me see if we can come up with something better.
Some alternatives we have discussed: * A simple polling mechanism that returns if the project configuration is valid or not * Check on page load if the project configuration is valid. In the project page, the all layers page and the layer details page we would also need to check when you make a configuration change * Check when running Toaster if a default machine is set as part of the application configuration. If not complain (although we will still need to handle the case where people delete all layers from a project) This bug depends on bug 7329, so we still have time to think about how to do this.
Created attachment 2603 [details] Design - Handling incomplete project configurations Update the document to reflect changes brought in by the image customisation feature
I don't think this should be in progress review, so changing back to 'new' and moving to 2.2 (it's part of the UI cleaning). The problem still exists. If for whatever reason the toasterconf.json file you loaded at set up time does not have the MACHINE variable set, your Toaster projects will be created with no machine selected, and they still let you build. If no machine is selected for whatever reason, you should not be able to build anything.