Page MenuHomeSoftware Heritage

Add low level API (WIP)
ClosedPublic

Authored by seirl on Wed, Oct 2, 7:34 PM.

Diff Detail

Repository
rDGRPH Graph service
Branch
lowlevel_api
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8154
Build 11751: tox-on-jenkinsJenkins
Build 11750: arc lint + arc unit

Event Timeline

seirl created this revision.Wed, Oct 2, 7:34 PM
seirl updated this revision to Diff 6951.Wed, Oct 2, 7:42 PM

typo fixes

seirl updated this revision to Diff 6956.Fri, Oct 4, 2:58 PM
  • rebase
  • graph.py: add 'deep' methods
seirl updated this revision to Diff 6962.Fri, Oct 4, 5:20 PM

Fix stderr

seirl updated this revision to Diff 6963.Fri, Oct 4, 5:23 PM

Refactor simple_traversal

This revision was not accepted when it landed; it landed in state Needs Review.Fri, Oct 4, 6:25 PM
This revision was automatically updated to reflect the committed changes.
seirl reopened this revision.Fri, Oct 4, 6:28 PM
seirl updated this revision to Diff 6968.Fri, Oct 4, 6:28 PM
  • backend: propagate java errors to the toplevel
zack requested changes to this revision.Sun, Oct 6, 11:41 AM
zack added a subscriber: zack.
zack added inline comments.
swh/graph/backend.py
127

why the explicit timeout here?
can't this fail for the wrong reason, e.g., when calling the leaves method on large graphs?

swh/graph/graph.py
13–20

this looks graphviz-specific, so it should go in swh.graph.dot instead

46

It's not clear to me why the first argument is called "parent_graph" (here, and everywhere in the module). Isn't it just the graph the various visitors are working on?

This revision now requires changes to proceed.Sun, Oct 6, 11:41 AM
zack added a comment.EditedSun, Oct 6, 11:42 AM

btw, I've tested this diff manually in tox and it does build fine

seirl added inline comments.Sun, Oct 6, 11:54 AM
swh/graph/backend.py
127

I'm gonna add a comment for the timeout.

No, this is only for opening the FIFO, not reading it, so it can't fail like that. The FIFO is opened on both sides at the beginning.

The problem is, if there is an exception in the java call thread and the FIFO is never created, this thread will block endlessly without timeout, because the FIFO has to be opened from both sides for the open(2) call to return. Adding a timeout for this open() call allows Java exceptions that happen between the Java call and the open() on the Java side to be propagated to the main thread.

seirl updated this revision to Diff 6987.Mon, Oct 7, 5:49 PM
  • rebase
  • graph: cosmetic fixes and comments
zack accepted this revision.Mon, Oct 7, 8:25 PM
This revision is now accepted and ready to land.Mon, Oct 7, 8:25 PM
seirl closed this revision.Tue, Oct 8, 1:26 PM