aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-06-25models: Add a new error type for check-layerHEADmasterThomas Perrot
Defines a new ErrorType and ERROR_TYPE_CHOICES, in order to support this kind of errors. [YOCTO #14208] Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-13error-details: pull Bugzilla URL from project settingsKyle Russell
Signed-off-by: Kyle Russell <bkylerussell@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-13Import parser from the new python3 locationMichael Halstead
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-13Search on contains, enalble admin, and keep more error history.Michael Halstead
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-13Allow alternate settings, avoid out of memory conditionMichael Halstead
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-13Avoid errors caused by attempting to update referrers for objects that don't ↵Michael Halstead
exist. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-13purge.py: Create script that will purge databaseAmanda Brindle
The script will be run on a regular basis to get rid of old reports that we don't need. This will improve the performance of the application since the database has grown to a huge size. The script will remove reports older than thirty days if they have not been referred to by a host other than the Error Reporting Tool. The function details() in views.py will keep trick of the referer when a build failure report is accessed. If there is no referer, we will note that in the database in order to determine how often there is no referer. It's possible that crawlers will access reports with no referer; if that's the case, a lack of a referer should not determine whether we save an older report or not. Fixes [YOCTO #12332] Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-22Post/parser: Use bleach to sanitse XSS inputmaster-nextRichard Purdie
Instead of searching for "<", use bleach to sanity input to avoid any XSS issues. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-23Update to be compatible with python3.5Yi Fan Yu
mostly changed the way to access request.GET also tested on python2.7 to be backward compatible Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-23parser: make contains_tag ignore non-str fieldsYi Fan Yu
if `MACHINE` is set to False (in a selftest build), contains_tags should skip that field instead of searching for the character '<'. [YOCTO #14208] Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-12Add SPDX license headers to source filesMilan Shah
Post/* all ( except Post/migrations/* , __init__.py and templatetags/* ) have some sort of MIT headers; adding SPDX header to make it obvious. project/* & test-data/* all ( except __init__.py ) have some sort of MIT headers; adding SPDX header to make it obvious. This address bug #13530 https://bugzilla.yoctoproject.org/show_bug.cgi?id=13530 Signed-off-by: Milan Shah <mshah@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-23latest-errors: Use the key value instead of display value for filterMichael Wood
Make sure we use the filter key value instead of the display value for the filter data. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-23README: Update instructions to use 'migrate' instead of 'syncdb'Michael Wood
Newer django version means database creation and migration are no longer a two step process. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-23settings: Setup the default configuration so that it works out the boxMichael Wood
Setup the default configuration so that it works quickly out of the box for evaluation and testing purposes (sqlite is not a recommended database backend for this system). Fix a number of whitespace issues. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-23views/templates: Add support for display different type of errorsAníbal Limón
Now we have a set of different type of errors not only Recipe ones this change enables support for display these. Based on design done by Belen Barros [1]. [YOCTO #7583] [1] https://bugzilla.yoctoproject.org/attachment.cgi?id=3214 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-23parser: Add support for receive/store error_type.Aníbal Limón
For compatibility reasons if error_type isn't specified in the JSON payload use 'Recipe' error by default. [YOCTO #7584] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-23models: Build model add support for Error type.Aníbal Limón
In order to support other errors not only Recipe ones adds a ERROR_TYPE field to the Build model defaults to "Recipe". [YOCTO #7583] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-23migrations: 0003_auto_20150603_0913 Replace tabs for spacesAníbal Limón
When try to migrate using python3 it raises an exception because found tabs inside the migration. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-23models: Increase the TASK field lengthAníbal Limón
Now bitbake exception/errors can be published into ERW so TASK in bitbake is the command line executed. [YOCTO #7583] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-23urls: RedirectView, fix warnings about change of default value in django 1.9Aníbal Limón
RemovedInDjango19Warning: Default value of 'RedirectView.permanent' will change from True to False in Django 1.9. Set an explicit value to silence this warning. url(r'^$', RedirectView.as_view(pattern_name="main")), RemovedInDjango19Warning: Default value of 'RedirectView.permanent' will change from True to False in Django 1.9. Set an explicit value to silence this warning. url(r'^Errors/Search/Args/$', RedirectView.as_view(pattern_name="Post.views.search",query_string=True), {'mode':results_mode.SEARCH }), [YOCTO #9733] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-23requirements: Update requeriments for use 1.8 LTS Django version.Aníbal Limón
[YOCTO #9733] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-05error-details: Add recipe version to Error details side barMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-09-30parser: Add Unicode support to the error logMariano Lopez
If the server receives a error log with Unicode character in it, it will throw and internal server error, this is caused because the server doesn't try to convert everything to ASCII This patch changes the log encoding to UTF-8 so it will allow Unicode characters. [YOCTO #8225] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-06-23README: Add info on management command for culling database sizeMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-15Add RSS feeds for the latest errorsMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-11README: Update and clarifyMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-11management: Add command to cull the databaseMichael Wood
Adds a cron-able command to reduce the size of the database to a specified size. [YOCTO #6874] Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-05views: Remove redundant paginator mechanism0.3Michael Wood
We use the proper paginator from django now and always have an order_by set so this mechanism redundant. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-05views: Use none function rather than an invalid id to get an empty querysetMichael Wood
The empty queryset allows us to avoid an extra code path to produce a "no results" state. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-05models: Fail gracefully if we haven't yet generated LEV_DISTANCE dataMichael Wood
This can can happen if the data hasn't been generated by the migration yet or if this has been skipped. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-05migrations: Add a data migration function to generate the LEV_DISTANCEMichael Wood
This adds a migration path forward and back for migration of data in migration 0003 (add the LEV_DISTANCE field). Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-04Add migration for LEV_DISTANCE to support the similar errors featureMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-04latest-errors: Optimise the url resolution for each row's details linkMichael Wood
Instead of for each cell resolving the url do this per row instead. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-04tests: Move test links to run after each time data is addedMichael Wood
It's more useful to test this after data has been added as this will cause more code paths to be tested as it will be rendering the test data that has been added Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-04tests: Add check to see if the LEV distance value has been generatedMichael Wood
Also added test for 200 on urls for the SimilarTo, Build and Details Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-04Add a similar errors matching mechanismMichael Wood
This adds the feature to recognise if an error has been reported before. It matches it against the distance with an offset of bytes by using the first error in the database as the prime error. The accuracy is adjustable by setting SIMILAR_FAILURE_DISTANCE. If using the JSON response to a submission you will also get the number of the duplicates and a link to view them. [YOCTO #7798] Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-03-31css: Reduce the scope of the wrap behaviour to only data itemsMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-03-31css: re-indent some of the classes to match the rest of the fileMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-03-31css: Add a class for the build details to remove word wrapMichael Wood
We don't want to word wrap here because we often have long version names/git SHAs and urls. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-03-02tests: Add test to compare the payload with the data in the databaseMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-03-02parser: Add fall back for regex based parsingMichael Wood
Currently the branch, commit, recipe and recipe_version rely on being in a particular format so that they can be extracted by a regex. If this fails we should fall back and mark these fields just as "unknown" Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-03-02parser: Fix rename Machine varMichael Wood
This was accidentally renamed in refactoring the parser save routine and failed silently Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-02-27parser: Add back accidentally removed DATE setterMichael Wood
At some point this should be moved to the model definition Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-02-27error-details: Display link back field if it existsMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-02-27views: Add max_log_size response so that the client can avoid thisMichael Wood
The new send-error-report client can ask the server for the max_log_size so that it doesn't try to submit a log which is too large for it's current settings. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-02-27test: Make sure we delete the data between testsMichael Wood
Needed to do the before the test is run and check afterwards. Also remove unneeded delete as the deletion will cascade to the foreign key items. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-02-27parser: Simplify the orm Build object creationMichael Wood
Also update the error message when we can't parse the json payload Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-02-24views/tests: Add a user-agent path to switch payload decode pathsMichael Wood
To enable us to drop support for the URL encoded json payload and use the more conventional non-encoded application/json payload we add a switch on the client's http user agent, which will allow us to identify which type of payload is being submitted and pave the way for future changes. Also add tests to test this new path. Refactor tests so that they delete the data after running to enable retrieval without having to know the PK [YOCTO #7245] Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-02-24parser: Add optional LINK_BACK fieldMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-02-24migrations: Add new field for link backMichael Wood
This optional field is used to add link back information for errors where the build information is accessible such as from a CI system. Signed-off-by: Michael Wood <michael.g.wood@intel.com>