Coder Social home page Coder Social logo

oii's People

Contributors

adyork avatar ashepherd avatar joefutrelle avatar louisk130 avatar markanye avatar sgallager avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

oii's Issues

improve expiration semantics in workflow ORM

right now expiration policy is completely controlled by the client per-request for all products, which is not fine-grained enough.

instead it should be possible to control the policy per-product, as there is no intermediate granularity.

the simplest approach is to set an expiration time, which is probably easiest represented as a delta in seconds. the expire call can then check the current time of each product against its update time + the delta.

allowing an absolute time to be specified is probably unnecessary and would complicate the update process.

arbitrary timescale on dashboard metrics plots

Currently there are no GUI controls allowing the user to specify a time range for metrics plots. This ought to be handled using a Javascript library that provides interactive navigation through the time series.

mosaic spanning more than one file

currently dashboard mosaics are just of one file; the requested feature is viewing a mosaic for a time range that spans more than one file.

(IFCB) allow access to bins that aren't in the database

I think even if a bin isn't in the database it should still be viewable in the dashboard, at least via its direct links. Same thing with skipped bins.

I believe this is how V2 worked and even earlier versions of V3, but that something now is raising a 404 if the bin can't be found in the database.

workers will generate products even if dashboard will not accept them

A workflow that produces products will do so and then attempt to submit them to the dashboard, even if the dashboard is not configured with any data directory to hold the products. In that case CPU time is wasted if all works properly then the product which cannot be deposited will expire, then be re-generated, resubmitted, and fail repeatedly.

What's needed is an API call for the dashboard that will simply indicate whether or not it is accepting a specific kind of product.

switch all fixity to fast

checksums, while useful, should not delay accession. they can be computed later, asynchronously, as time permits.

display/plot features in dashboard

The dashboard now provides access to raw feature files, but no means of plotting them viewing them the way it is possible to plot and view ADC data.

workflow service mutex stage management broken under wakeup()

Batch accession is not working. After one job, wakeup fails, giving this message on the client side:

[2015-07-27 18:33:27,413: ERROR/MainProcess] Task oii.workflow.async.wakeup[ba007d77-0b8e-4cf3-a3cc-36f7fb87429f] raised unexpected: RuntimeError(u'mutex ifcb:acc:test in unknown state',)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/celery/app/trace.py", line 218, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/celery/app/trace.py", line 398, in __protected_call__
    return self.run(*args, **kwargs)
  File "/vagrant/oii/workflow/async.py", line 64, in func_wrapper
    func(*a,**kw)
  File "/vagrant/oii/ifcb2/workflow/batch_acc_worker.py", line 80, in acc_wakeup
    client.wakeup()
  File "/vagrant/oii/workflow/client.py", line 184, in __exit__
    raise RuntimeError("mutex %s in unknown state" % self.mutex_pid)
RuntimeError: mutex ifcb:acc:test in unknown state

This is a concurrency exception in the database. First a commit is attempted on a closed transaction, then key constraint violations start accumulating.

[Mon Jul 27 18:33:27.774500 2015] [:error] [pid 1572:tid 140193296103168] [remote 127.0.0.1:19538] InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (psycopg2.IntegrityError) duplicate key value violates unique constraint "products_pkey"
[Mon Jul 27 18:33:27.774507 2015] [:error] [pid 1572:tid 140193296103168] [remote 127.0.0.1:19538] DETAIL:  Key (id)=(15) already exists.
[Mon Jul 27 18:33:27.774511 2015] [:error] [pid 1572:tid 140193296103168] [remote 127.0.0.1:19538]  [SQL: 'INSERT INTO products (id, pid, state, event, message, ts, ttl, expires, priority) VALUES (%(id)s, %(pid)s, %(state)s, %(event)s, %(message)s, %(ts)s, %(ttl)s, %(expires)s, %(priority)s)'] [parameters: {'expires': None, 'pid': u'http://demi.whoi.edu/test/IFCB2_2007_182_021542_raw', 'ts': datetime.datetime(2015, 7, 27, 18, 33, 25, tzinfo=<UTC>), 'event': 'created', 'priority': 100, 'state': 'waiting', 'ttl': None, 'message': None, 'id': 15}]```

"add time series" in admin now a no-op

Haven't dug into the angular stuff, but the current behavior is that pressing the button doesn't do anything where I expect the GUI for editing a time series to appear.

atomic state transitions in workflow API are not atomic (SQLite)

I'm getting collision on supposedly atomic transactions. As far as I'm aware this is because I'm using an SQLite backend, which does not support row locking.

I will confirm that my row locking implementation works with PostgreSQL. To continue to support atomic transactions in the workflow web service API when it is backed with SQLite, I will need to provide an extra level of locking within the webapi layer.

can't delete dependencies in workflow ORM

products can be deleted and can expire, but their dependencies cannot. the only facility for deleting dependencies is low-level, and it's not available through the web API.

list of features hardcoded into plotting Javascript

Introduced in 2f57294

There's a FIXME-style comment in the code pointing this out:

Hard coded simply because I don't know / want to find out how to pull this from Python where the csv is read. This is easier

could cause issues when plotting datasets with different sets of features.

Make web services (workflow, dashboard) work with PostgreSQL

There's some SQLite specific code in our services right now, and my initial attempts to reconfigure those services to run on PostgreSQL have failed.

What happens at startup of e.g., the workflow service is that schema creation succeeds, then the web service correctly responds to the first request (I think) then fails on the second request. What's happening is that the PostgreSQL connection drops but the associated SQLAlchemy ORM session stays in the pool, so the next time it's used it dies with SSL errors (EOF, other conditions indicating a dropped connection that SQLAlchemy hasn't caught).

Reading examples on the web is more confusing than helpful because there is all kinds of request scope magic happening in Flask that is muddying the waters for me. This is one of those things where the solution is probably simple, but it's just not obvious on any level.

(ifcb) custom patch method for user admin may not be necessary

in 4ad9f81 I introduced a custom patch method for user admin because changes to users weren't "taking". That could have been related to the Restangular bug that was affecting time series in #68, and so the workaround for that bug may be a much simpler approach than what I ended up doing earlier.

accession without acquisition

In the case that instrument data has already been acquired and simply needs to go through accession, the dashboard needs to provide a worker that does that and can be initiated periodically.

problem revoking keychain item

When I attempt to revoke a keychain item, the database fails with:
InvalidRequestError: Object '<APIKey at 0x10c6b8350>' is already attached to session '2' (this is '1')

IFCB resolver bootstrapping fails under Celery blob worker

I have successfully run almost exactly the same code before, so I'm not sure why it's failing on the wf_tools branch, but I'm getting this exception in the blob worker trying to call parse_pid on a known good pid. The good news is that stack traces are now propagating to the database so I can track worker errors. The bad news is I've got an error to track.

Traceback (most recent call last):
  File "/home/ubuntu/dev/oii/workflow/client.py", line 117, in do_all_work
    callback(pid,job)
  File "/home/ubuntu/dev/oii/ifcb2/workflow/blob_worker.py", line 40, in extract_blobs
    parsed_pid = parse_pid(pid)
  File "/home/ubuntu/dev/oii/ifcb2/identifiers.py", line 23, in parse_pid
    return next(get_resolver().ifcb.pid(pid))
  File "/home/ubuntu/dev/oii/utils.py", line 80, in inner
    new_value = fn(*args,**kw)
  File "/home/ubuntu/dev/oii/ifcb2/__init__.py", line 38, in get_resolver
    return ldr.get_resolver(locate_resolver('ifcb.xml'))
  File "/home/ubuntu/dev/oii/ldr.py", line 734, in get_resolver
    return Resolver(locate_resolver(relative_path))
  File "/home/ubuntu/dev/oii/utils.py", line 80, in inner
    new_value = fn(*args,**kw)
  File "/home/ubuntu/dev/oii/ldr.py", line 731, in locate_resolver
    return search_path(relative_path)
  File "/home/ubuntu/dev/oii/utils.py", line 34, in search_path
    cands = [os.path.join(d,pathname_suffix) for d in sys.path]
  File "/usr/lib/python2.7/posixpath.py", line 75, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'

timeago is broken

The relative time reported for a bin in the bin view is now broken--it shows up blank.

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.