Toolchain fixes
This is the MR for the similarly-named milestone, estimated time of 1 week.
Merge request reports
Activity
Most of the work is finished, the only issue left is #129 (closed)
oh and also @flavio.tarsetti I updated all dependencies in this branch so you'll have to do update your
node_modules
@jdiefenbaugh : with
npm install
?added 13 commits
-
1b0a4516...c58d2e7b - 7 commits from branch
master
- 69a0b182 - upgrade all deps, move to babel 7 packages & clean babel setup
- 963b2a95 - [js][tc] move toolchain typings to its own helpers file, fix #143 (closed)
- c119a6c9 - fix #130 (closed) & add tcmodal tests
- ebce0652 - [js][tc] fix #144 (closed) & add tests
- 4ca2c52a - [js][tc] change tc channel select into dropdown to show colors, closes #121 (closed)
- ba42bc0e - [js][tc] blocks are created w empty channel but w 1 i/o, first conn sets channel, closes #120 (closed)
Toggle commit list-
1b0a4516...c58d2e7b - 7 commits from branch
@jdiefenbaugh regarding #120 (closed) : There's an issue there: When the unsynchronized block is synchronized (with a connection to a dataset for example), it changes color and the synchronized channel is set in the block. But if the user deletes the connection, the newly synchronized block should loose it's "sync property" and therefore:
-
return to a black color
-
its synchronized channel property should return to "none" again instead of keeping a "dataset" Could you fix this first please ?
@jdiefenbaugh: and the toolchain should return in an invalid state if it was before (another issue here)
-
@jdiefenbaugh regarding the #132 (closed): I had an error that I am unable to reproduce but it seems to be a backend issue as it throws a 500 on the POST request to
layout
:[2018-10-05 14:50:21,356] ERROR in app: Exception on /layout [POST] Traceback (most recent call last): File "conda_env/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "conda_env/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "conda_env/lib/python3.6/site-packages/flask_restful/__init__.py", line 480, in wrapper resp = resource(*args, **kwargs) File "conda_env/lib/python3.6/site-packages/flask/views.py", line 84, in view return self.dispatch_request(*args, **kwargs) File "conda_env/lib/python3.6/site-packages/flask_restful/__init__.py", line 595, in dispatch_request resp = meth(*args, **kwargs) File "beat.editor/beat/editor/resources.py", line 79, in post diagram = obj.dot_diagram(is_layout=True) File "conda_env/lib/python3.6/site-packages/beat/core/toolchain.py", line 479, in dot_diagram for name, info in self.blocks.items(): _draw_block(root, name, info) File "conda_env/lib/python3.6/site-packages/beat/core/toolchain.py", line 446, in _draw_block color = channel_colors[info['synchronized_channel']] KeyError: '' 127.0.0.1 - - [05/Oct/2018 14:50:21] "POST /layout HTTP/1.1" 500 -
Okay so I fixed the first issue about sync channels. But the second one is more complex.
The issue is that blocks with an empty sync channel aren't valid in the toolchain layout code. There's alot of stuff in
beat.core
that expects filled sync channels for all blocks - this is basically what's happening with that POST error. Rather than changingbeat.core
to support this case, I think we should instead disable the Layout button when the toolchain is invalid. This means that the user can't layout any invalid toolchain, which I'm pretty sure is exactly what we want anyways, becausebeat.core
/graphviz can't be expected to handle invalid toolchains properly.What do you think @flavio.tarsetti ?
added 8 commits
- eb1e3688 - upgrade all deps, move to babel 7 packages & clean babel setup
- d9acbdd1 - [js][tc] move toolchain typings to its own helpers file, fix #143 (closed)
- 727ad08e - fix #130 (closed) & add tcmodal tests
- fc61d68e - [js][tc] fix #144 (closed) & add tests
- 460b8ddb - [js][tc] change tc channel select into dropdown to show colors, closes #121 (closed)
- 1b0a4516 - [js][tc] blocks are created w empty channel but w 1 i/o, first conn sets channel, closes #120 (closed)
- 31c314b7 - [js][tc] reset blocks sync channel when it has no conns to it, #120 (closed)
- 249b1121 - Merge remote changes
Toggle commit listI checked the first one is working.
Regarding your second issue: Ok let's go with disabling the Layout button with invalid toolchain. I'll wait for your fix on this one then.
By the way could you review !23 (merged) and merge it too. Thanks.
added 1 commit
- f8d4d571 - [js][tc] disable layout button when toolchain is invalid
assigned to @flavio.tarsetti
mentioned in commit 134e1a10