Code Monkey home page Code Monkey logo

bulktracker's People

Contributors

bsiegert avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

riastradh

bulktracker's Issues

http-only links in page templates

<a href="http://pkgsrc.se/{{.Category}}{{.Dir}}">{{.Category}}{{.Dir}}</a></dd>

the <a href="http://www.NetBSD.org/">NetBSD</a> package collection.

<a class="btn btn-primary btn-lg" role="button" href="http://www.pkgsrc.org/">Learn more about pkgsrc</a>

Would be nice to use scheme-relative URLs here, or HTTPS URLs.

Clean up older builds in the background

Criteria are to be defined.

The idea would be to have an HTTP endpoint to launch the cleanup. This can be triggered from a cronjob, for example. Or perhaps we have an internal trigger.

Use CloudMailin for incoming emails

  • write handler that speaks the cloudmailin format
  • unsubscribe App Engine inbound mail service
  • subscribe cloudmailin
  • remove App Engine inbound mail handler

Provide a hermetic testing script

There should be a way to run an end-to-end test (or something) that adds a build to the database and does not require net access.

Improve multi-column package display

There used to be a multicolumn category selector on the front page. I replaced this with the selector widget. It turns out (IMHO) that this is not a good replacement after all.

One problem was always the multi-column display and the way it rendered differently in browsers. Maybe the solution in fine is to simply go with CSS3 multi-column layout.

column-width: 12em

'All builds' page shows error instead of listing all builds

https://releng.netbsd.org/bulktracker/builds shows this error message:

DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see http://datatables.net/tn/7

That URL provides very nice instructions, telling me to look for the HTTP call that failed. In my case, it was:

https://releng.netbsd.org/bulktracker/undefinedjson/allbuilds/?_=1700781773151

The word undefined looks suspicious, and when I remove it, I get the actual JSON data.

Migrate off App Engine by January 2024

The Go runtime we use on App Engine classic will stop accepting new deploys on January 24, 2024.

There should be a production instance using the new SQL backend at that time. Then the App Engine version can forward to the new site.

The NetBSD Foundation has graciously accepted to host the instance! ๐ŸŽ‰

Link from bulk build page to original report

Sometimes there is more information in the machine-readable bulk report than bulktracker shows. How do I get back to the original machine-readable bulk report, or at least back to the mail-index page referencing it, from a bulk build page like https://releng.netbsd.org/bulktracker/build/645?

(I don't remember offhand whether bulktracker scrapes the page or reads the machine-readable report, but either way it would be nice to get a link to the machine-readable report.)

Cross-correlate single package

The "grid" code is a mess and should be rewritten from scratch.

However, an easy and useful case is tracking all build results of a single package. This should be easy.

Stop paginating

I pulled up a query, and got 10 results, and then buttons for pages. This breaks searching with browser find, and is generally awkward. I am guessing this is just a default trendy pattern and not intended.

This ticket asks to either just stop paginating, to add a "1000" option, and to add an "all" option and make it default. Or at least make 1000 defaullt.

Index results by build id and pkg id

The following index dramatically speeds up common queries:

CREATE INDEX results_i_build_pkg ON results (build_id, pkg_id);

It increases the size of the database by about 1/3, but compare, e.g., the GetResultsInCategory query (bottleneck of https://releng.netbsd.org/bulktracker/build/645/meta-pkgs):

  • Without index:

    % time sqlite3 ./BulkTracker.db.~1~ "select r.*, p.* from results r join pkgs p on (r.pkg_id == p.pkg_id) where p.category = 'meta-pkgs/' and r.build_id = 645"
    ...
    sqlite3 ./BulkTracker.db.~1~   2.32s user 0.40s system 99% cpu 2.732 total
    
  • With index:

    % time sqlite3 ./BulkTracker.db "select r.*, p.* from results r join pkgs p on (r.pkg_id == p.pkg_id) where p.category = 'meta-pkgs/' and r.build_id = 645"
    ...
    sqlite3 ./BulkTracker.db   0.01s user 0.01s system 98% cpu 0.015 total
    

GetSingleResultByPkgName (bottleneck of https://releng.netbsd.org/bulktracker/pkg/17227701):

  • Without index:

    % time sqlite3 ./BulkTracker.db.~1~ "select r.*, p.* from results r, pkgs p where r.build_id == 644 and r.pkg_id == p.pkg_id and r.pkg_name = 'libreoffice-24.2.1.2nb2'"                           
    17225614|644|7533|libreoffice-24.2.1.2nb2|2||3|7533|misc/|libreoffice
    sqlite3 ./BulkTracker.db.~1~   2.31s user 0.46s system 99% cpu 2.801 total
    
  • With index:

    % time sqlite3 ./BulkTracker.db "select r.*, p.* from results r, pkgs p where r.build_id == 644 and r.pkg_id == p.pkg_id and r.pkg_name = 'libreoffice-24.2.1.2nb2'"
    17225614|644|7533|libreoffice-24.2.1.2nb2|2||3|7533|misc/|libreoffice
    sqlite3 ./BulkTracker.db   0.02s user 0.01s system 97% cpu 0.024 total
    

Given the amount of CPU time mollari is spending in bulktracker, I think this couple hundred megabytes of space is worth it.

SQL queries?

Can I do SQL queries against the bulktracker database, or can I download a snapshot to load into sqlite3 for my own queries?

Upgrade to new App Engine Go SDK

If you're currently using the bare appengine packages
(that is, not these ones, imported via google.golang.org/appengine),
then you can use the aefix tool to help automate an upgrade to these packages.

Run go get google.golang.org/appengine/cmd/aefix to install it.

Feature request: query by MAINTAINER

Thanks for BulkTracker! As a person maintaining dozens of packages, I wish BulkTracker could help me tell at a glance whether anything I'm specifically responsible for is currently broken anywhere.

Upgrade to a Supported jQuery Release

Everything before jQuery 3 is no longer supported. There are probably vulnerabilities in the ancient version that BulkTracker uses.

  • add Migrate Plugin
  • verify nothing breaks
  • when safe, remove Migrate Plugin

sort categories down first

The list of categories reads across a line and then the next line. This is very unintuitive scanning as I expect columns like ls. Maybe it's just me, but I think aligning with ls sorting would be good.

Inconsistent logic for results.failed_deps

When ingesting reports, bulktracker stores results.failed_deps as a space-separated string:

pkgs[i].FailedDeps = strings.Join(f, " ")

But when generating pages, bulktracker parses results.failed_deps as a comma-separated string:

failedDeps := strings.Split(res.FailedDeps, ",")

This mismatch means that a result with more than one failed dependency shows nothing, because the space-separated string doesn't appear in any results.pkg_name, like in this example:

https://releng.netbsd.org/bulktracker/pkg/17257784

This should show mutt-2.2.13 and libreoffice-24.2.1.2nb2, but instead it's blank right now.


All that said, it might be better to use a separate table to obviate the need for formatting and parsing and make queries easier to write (with indices to speed up both directions -- find who's breaking a package, find which packages are broken by a package):

CREATE TABLE failed_deps (
    dependent INTEGER REFERENCES results,
    dependency INTEGER REFERENCES results,
    PRIMARY KEY(dependent, dependency)
) WITHOUT ROWID;
CREATE INDEX failed_deps_i_dependent ON failed_deps (dependent);
CREATE INDEX failed_deps_i_dependency ON failed_deps (dependency);

Use direct HTTP Get instead of urlfetch transport

Ideally, this should be done in a way that falls back to urlfetch, at least initially, to not break fetching of builds completely.

The "new" go112 runtime should support direct calls to http.Get just fine, I believe.

No new build summary records since 2014-11-13

As reported by a user: The latest build shown on the landing page is from 2014-11-13 (which, incidentally, is when the latest push happened). However, pkg entities (individual package results) are still being written. Find out what happened.

Daily Datastore quota limit reached

BulkTracker was updated to use "Cloud Firestore in Datastore Mode". Ever since then (I think), the app has been mostly unavailable.

The reason is that the "daily quota is exceeded", example:

2021/12/02 20:28:07 rpc error: code = ResourceExhausted desc = Quota exceeded.

Checking the Quotas page in Pantheon (https://console.cloud.google.com) says that there are no daily quotas, so this is both unexpected and concerning. I wish I knew what sort of daily quota I am exceeding.

For now, I disabled the Task Queue in Cloud Tasks, which should stop ingestion of new build results.

I probably should do a bulk deletion of data that is older than, say, one year. But even so:

  • WTF is the type of quota the app is exceeding and why?
  • Where can I track that particular quota?
  • Is this due to ingestion of new data?

And of course: How to mitigate and fix?

Record branch labels

AFAICS, the branch name is only mentioned in the subject lines. Filter it out and add it to build records.

Improve handling of bulk build reports

The red error bar saying "try recreating the index" is a pretty bad UI.

  • store the last fetch error in the database and surface it
  • use a custom queue to increase the time between fetches
  • for extra points: make the reindex show the status interactively.

Use a select2 element (w/ AJAX) for selecting packages

  • write an endpoint for select2 AJAX autocomplete -- ideally doing full string match on category/pkgname.
  • nuke the submenu thing on the home page, as it breaks in Chrome when the window is reasonably wide
  • replace text box with select2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.