aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/admin.go
Commit message (Collapse)AuthorAgeFilesLines
* dashboard/app: wire more admin handlersDmitry Vyukov2025-12-291-31/+0
| | | | | | | Make it possible 3 more admin handlers that look useful for future and safe. Now that we don't deploy the app from local machines, it's problematic to call them without this wiring. Remove one old handler that we don't need anymore.
* all: use min/max functionsDmitry Vyukov2025-01-171-8/+2
| | | | They are shorter, more readable, and don't require temp vars.
* dashboard: const attempts in db.RunInTransactionSabyrzhan Tasbolatov2024-10-281-2/+2
| | | | | | | | | | | | | | | Use a common number of attempts (10) everywhere in dashboard/app for db.RunInTransaction() with the custom wrapper runInTransaction(). This should fix the issues when the ErrConcurrentTransaction occurs after a default number of attempts (3). If the max. limit (10) is not enough, then it should hint on problem at the tx transaction function itself for the further debugging. For very valuable transactions in createBugForCrash(), reportCrash(), let's leave 30 attempts as it is currently. Fixes: https://github.com/google/syzkaller/issues/5441
* all: fix up context import after go fixDmitry Vyukov2024-04-261-1/+1
|
* all: go fix everythingDmitry Vyukov2024-04-261-1/+1
|
* dashboard: introduce a getNsConfig() helperAleksandr Nogikh2023-10-121-1/+1
| | | | | In many cases we want to just access the namespaces's config. Introduce a special helper function to keep code shorter and more conscise.
* dashboard: access config through contextAleksandr Nogikh2023-10-121-5/+5
| | | | | | | | | | | | | | | | | | | | | We used to have a single global `config` variable and access it throughout the whole dashboard application. However, this approach has been more and more complicated test writing -- sometimes we want the config to be only slightly different, so that it's not worth it adding new namespaces, sometimes we have to test how dashboard handles config changes over time. This has already led to a number of hacky contextWithXXX methods that mocked various parts of the global variable. The rest of the code had to sometimes still use `config` directly and sometimes invoke getXXX(c) methods. This is very inconsistent and prone to errors. With more and more situations where we need to patch the config appearing (see #4118), let's refactor the application to always access config via the getConfig(c) method. This allows us to uniformly patch the config and be sure that the non-patched copy is not accessible from anywhere else.
* dashboard: improve crash priority calculationAleksandr Nogikh2023-08-301-3/+10
| | | | | | | | If there's no config record for the manager, activeManager would return a nil pointer to ConfigManager. Assume the priority to be 0 in this case. Update the admin.go function that recalculates priorities.
* dashboard: add a method to refresh crash prioritiesAleksandr Nogikh2023-08-301-10/+47
| | | | | | | If we just deploy the previous commits, we can end up regenerating many more bug origin results than necessary. The problem is that we periodically (every repro retest) regenerate report priorities, and some of them might temporarily face priority boost due to the new formulae.
* dashboard: differentiate job invalidation and job restartAleksandr Nogikh2023-08-241-2/+2
| | | | | | | In some cases restarting the failed bisection does not make sense, because we know that the result will be the same. Let admins choose between invalidating the job and restarting it.
* all: use special placeholder for errorsTaras Madan2023-07-241-1/+1
|
* dashboard: allow admins to retry individual bisectionsSpace Meyer2023-06-121-34/+23
| | | | | | | | | | Changes to our rootfs, compilers or bisection logic regularly cause regressions in our bisection accuracy. Retrying them currently entails fiddling with the GCP datastore directly or mass deleting all failed bisections. This change will allow us to retry specific bisections with a single click.
* dashboard: don't use a separate JobFlags typeAleksandr Nogikh2023-05-251-1/+1
| | | | | | Use the JobDoneFlags from dashapi. Move the default string representation generation to JobDoneFlags.
* dashboard: add a method to reassign HeadReproLevelAleksandr Nogikh2023-05-191-0/+50
| | | | | There have been a few issues with HeadReproLevel consistency. Add a maintenance method that can be used to correct error in the database.
* dashboard: add an email send maintenance methodAleksandr Nogikh2023-04-071-0/+15
| | | | | This method enables an admin to send an arbitrary message on behalf of the bot.
* dashboard: add an admin method to refresh all bugsAleksandr Nogikh2023-02-161-0/+22
| | | | | | We'll need to invoke this to kick off periodic bug subsystem recalculation. Otherwise there's no chance to sort bugs by the last update.
* dashboard: add an admin function to restart failed bisectionsAleksandr Nogikh2023-01-191-0/+82
| | | | | | Sometimes bisections massively fail due to a problem in the bug bisection code / config. Add a code to reset all failed bisections in the specified namespace.
* dashboard: improve BugReporting update processAleksandr Nogikh2022-05-301-1/+4
| | | | | | | | Until #3161 is implemented, we still need to manually update the DB each time we create/delete Reporting objects. The existing code can only append missing items. Make it also support deleting and inserting them at arbitrary locations.
* dashboard/app: update to go116 (#2959)Taras Madan2022-01-051-2/+2
| | | | | | 1. Updated the "include"s. 2. No logs read API in the AppEngine anymore. Replaced by the GCP logging API. 3. Use "GO111MODULE=off gcloud beta app deploy ./dashboard/app/app.yaml --no-promote" to test new deployment. 4. Updated the documentation.
* dashboard/app: add helper function to update bug titlesDmitry Vyukov2021-03-011-27/+53
| | | | | | | | updateBugTitles adds missing MergedTitles/AltTitles to bugs. This can be used to migrate datastore to the new scheme introduced: by commit fd1036219797 ("dashboard/app: merge duplicate crashes"). Update #1575
* dashboard/app: show more detailed info about bisectionsDmitry Vyukov2020-10-221-4/+4
| | | | | | | | 1. Split cause/fix bisections in the bug table. 2. Show if bisection is inconclusive/unreliable in the bug table. 3. Show if bisection is unreliable on the bug page. Update #2098
* dashboard/app: refactor updateBugReportingBatchDmitry Vyukov2020-10-021-4/+7
| | | | | Refactor updateBugReportingBatch to be more generic. Useful helper for other bulk bug updates.
* dashboard: update to go111 runtimeAndrew Donnellan2020-01-291-1/+1
| | | | | | | | | The old go 1.9 App Engine runtime is now deprecated. Update to the go 1.11 runtime, which still allows us to use the old App Engine library (removed in the 1.12 runtime). Closes: #1461 ("dashboard: port app to go111/go112 runtime") Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* dashboard/app: import datastore as dbDmitry Vyukov2019-03-221-14/+14
| | | | | datastore is too long name for such widely used packages. Import it as db throughout. Nicely reduces line lengths.
* dashboard/app: add handler for config migrationDmitry Vyukov2019-03-171-2/+67
| | | | | | | | updateBugReporting adds missing reporting stages to bugs in a single namespace. Use with care. There is no undo. This can be used to migrate datastore to a new config with more reporting stages. This functionality is intentionally not connected to any handler. Before invoking it is recommented to stop all connected instances just in case.
* dashboard/app: add Log text entityDmitry Vyukov2019-03-171-0/+1
| | | | | | To store bisection logs. Update #501
* dashboard/app: use links instead of attachments in emailsDmitry Vyukov2018-03-251-7/+7
| | | | | As per discussion at: https://groups.google.com/d/msg/syzkaller/zYlQ-b-QPHQ/AJzpeObcBAAJ
* all: fix gometalinter warningsDmitry Vyukov2018-03-081-0/+2
| | | | Fix typos, non-canonical code, remove dead code, etc.
* dashboard/app: add drop namespace functionalityDmitry Vyukov2017-12-041-0/+120
dropNamespace drops all entities related to a single namespace. Use with care. There is no undo. This functionality is intentionally not connected to any handler. To use it, first make a backup of the datastore. Then, specify the target namespace in the ns variable, connect the function to a handler, invoke it and double check the output. Finally, set dryRun to false and invoke again.