Git Product home page Git Product logo

build-tooltool's Introduction

build-tooltool's People

Contributors

bclary avatar djmitche avatar froydnj avatar garbas avatar glandium avatar jhford avatar mshal avatar rillian avatar simone-mozilla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

build-tooltool's Issues

Wiki changes

FYI: The following changes were made to this repository's wiki:

  • defacing spam has been removed

  • the wiki has been disabled, as it was not used

These were made as the result of a recent automated defacement of publically writeable wikis.

Build a UI to administer files

Tooltool admins should be able to do the following through the UI:

  • delete files uploaded accidentally (including deleting all instances of the files in all regions)
  • change file visibility ("oops, I uploaded that as PUBLIC")
  • force revalidation (if a file seems to be corrupted on S3, this will re-validate the hash and delete any non-matching files; replication will then fill in the gaps if possible)

Upload files to different keys than are used for downloads

Per #10, doing otherwise opens us up to race conditions where an attacker could upload an invalid file.

The idea here is that each pending upload corresponds to a specific, unique key, probably something like /uploads/<pending upload id>. The check_pending_upload task will copy that key to /sha512/<digest> if the latter does not exist, and then validate the result of the copy operation. In any case, it should delete the upload key after the URL has expired.

We should probably also have a task that looks for uploaded files that have no matching pending upload, and deletes them.

ISE on failed upload due to missing permissions

Via newrelic:

Traceback (most recent call last):
File "/data/www/relengapi/virtualenv/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request()
File "/data/www/relengapi/virtualenv/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args)
File "/data/www/relengapi/virtualenv/lib/python2.7/site-packages/newrelic-2.46.0.37/newrelic/hooks/framework_flask.py", line 40, in _nr_wrapper_handler_ return wrapped(*args, **kwargs)
File "/data/www/relengapi/virtualenv/lib/python2.7/site-packages/relengapi/lib/api.py", line 103, in replacement result = wrapped(*args, **kwargs)
File "/data/www/relengapi/virtualenv/lib/python2.7/site-packages/relengapi/blueprints/tooltool/__init__.py", line 140, in upload_batch if not p.get('tooltool.upload.{}'.format(v)).can():
AttributeError: 'NoneType' object has no attribute 'can'

Add all-in-one add-and-upload for pushing a single file to tooltool

All of my tooltool invocations push a single file to tooltool, and I never want the manifest until the upload is complete.

Can we make python tooltool.py upload --file=... Just Do The Right Thing, generating a file-specific manifest and uploading without all the add command staging?

Build a UI to upload files

A JS frontend can do all of the things required to upload a file -- read local files, calculate their sha512 hash, get an upload URL, and PUT to that URL. We should allow users to upload via the UI using those techniques.

Improve some methods so that they can be used in other code

Starting with https://bugzilla.mozilla.org/show_bug.cgi?id=1355731 we're starting to use pieces of tooltool in a mach command. And while doing that, we're hitting two inconveniences:

  • FileRecord.validate needs the file in the current directory, which means we need to os.chdir first (and os.chdir back to where we were before)
  • unpack_file needs the given path to have the file name that appears in the manifest, which prevents from just feeding it with a cache file directly (which is an improvement which would be useful for tooltool itself).

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.